This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ob] c*.c, white space


Michael Snyder wrote:
add blank line between decls and statements

Sorry, here's the patch:



2010-05-13  Michael Snyder  <msnyder@vmware.com>

	* charset.c: White space.
	* c-lang.c: White space.
	* cli-out.c: White space.
	* coffread.c: White space.
	* complaints.c: White space.
	* completer.c: White space.
	* corefile.c: White space.
	* corelow.c: White space.
	* cp-abi.c: White space.
	* cp-namespace.c: White space.
	* cp-support.c: White space.
	* cp-valprint.c: White space.
	* c-typeprint.c: White space.
	* c-valprint.c: White space.

Index: charset.c
===================================================================
RCS file: /cvs/src/src/gdb/charset.c,v
retrieving revision 1.32
diff -u -p -r1.32 charset.c
--- charset.c	6 May 2010 18:07:08 -0000	1.32
+++ charset.c	13 May 2010 23:50:10 -0000
@@ -167,6 +167,7 @@ iconv (iconv_t utf_flag, const char **in
       /* In all other cases we simply copy input bytes to the
 	 output.  */
       size_t amt = *inbytesleft;
+
       if (amt > *outbytesleft)
 	amt = *outbytesleft;
       memcpy (*outbuf, *inbuf, amt);
@@ -312,6 +313,7 @@ validate (struct gdbarch *gdbarch)
   const char *host_cset = host_charset ();
   const char *target_cset = target_charset (gdbarch);
   const char *target_wide_cset = target_wide_charset_name;
+
   if (!strcmp (target_wide_cset, "auto"))
     target_wide_cset = gdbarch_auto_wide_charset (gdbarch);
 
@@ -634,10 +636,10 @@ wchar_iterate (struct wchar_iterator *it
       size_t orig_in = iter->bytes;
       size_t out_avail = out_request * sizeof (gdb_wchar_t);
       size_t num;
-
       size_t r = iconv (iter->desc,
 			(ICONV_CONST char **) &iter->input, &iter->bytes,
 			&outptr, &out_avail);
+
       if (r == (size_t) -1)
 	{
 	  switch (errno)
Index: c-lang.c
===================================================================
RCS file: /cvs/src/src/gdb/c-lang.c,v
retrieving revision 1.84
diff -u -p -r1.84 c-lang.c
--- c-lang.c	6 May 2010 23:36:39 -0000	1.84
+++ c-lang.c	13 May 2010 23:50:10 -0000
@@ -179,6 +179,7 @@ print_wchar (gdb_wint_t w, const gdb_byt
 	     int quoter, int *need_escapep)
 {
   int need_escape = *need_escapep;
+
   *need_escapep = 0;
   if (gdb_iswprint (w) && (!need_escape || (!gdb_iswdigit (w)
 					    && w != LCST ('8')
@@ -223,6 +224,7 @@ print_wchar (gdb_wint_t w, const gdb_byt
 	      {
 		char octal[30];
 		ULONGEST value;
+
 		value = extract_unsigned_integer (&orig[i], width, byte_order);
 		/* If the value fits in 3 octal digits, print it that
 		   way.  Otherwise, print it as a hex escape.  */
@@ -236,6 +238,7 @@ print_wchar (gdb_wint_t w, const gdb_byt
 	    while (i < orig_len)
 	      {
 		char octal[5];
+
 		sprintf (octal, "\\%.3o", orig[i] & 0xff);
 		append_string_as_wide (octal, output);
 		++i;
@@ -424,6 +427,7 @@ c_printstr (struct ui_file *stream, stru
   if (length == -1)
     {
       unsigned long current_char = 1;
+
       for (i = 0; current_char; ++i)
 	{
 	  QUIT;
@@ -504,6 +508,7 @@ c_printstr (struct ui_file *stream, stru
 		/* Painful gyrations.  */
 		int j;
 		char *s = xstrprintf (_(" <repeats %u times>"), reps);
+
 		for (j = 0; s[j]; ++j)
 		  {
 		    gdb_wchar_t w = gdb_btowc (s[j]);
@@ -881,6 +886,7 @@ convert_escape (struct type *type, const
     case 'U':
       {
 	int length = *p == 'u' ? 4 : 8;
+
 	ADVANCE;
 	if (!isxdigit (*p))
 	  error (_("\\u used with no following hex digits"));
@@ -908,6 +914,7 @@ parse_one_string (struct obstack *output
   while (data < limit)
     {
       char *p = data;
+
       /* Look for next escape, or the end of the input.  */
       while (p < limit && *p != '\\')
 	++p;
@@ -1021,6 +1028,7 @@ evaluate_subexp_c (struct type *expect_t
 	else
 	  {
 	    int i;
+
 	    /* Write the terminating character.  */
 	    for (i = 0; i < TYPE_LENGTH (type); ++i)
 	      obstack_1grow (&output, 0);
@@ -1107,6 +1115,7 @@ c_language_arch_info (struct gdbarch *gd
 		      struct language_arch_info *lai)
 {
   const struct builtin_type *builtin = builtin_type (gdbarch);
+
   lai->string_char_type = builtin->builtin_char;
   lai->primitive_type_vector
     = GDBARCH_OBSTACK_CALLOC (gdbarch, nr_c_primitive_types + 1,
@@ -1213,6 +1222,7 @@ cplus_language_arch_info (struct gdbarch
 			  struct language_arch_info *lai)
 {
   const struct builtin_type *builtin = builtin_type (gdbarch);
+
   lai->string_char_type = builtin->builtin_char;
   lai->primitive_type_vector
     = GDBARCH_OBSTACK_CALLOC (gdbarch, nr_cplus_primitive_types + 1,
Index: cli-out.c
===================================================================
RCS file: /cvs/src/src/gdb/cli-out.c,v
retrieving revision 1.29
diff -u -p -r1.29 cli-out.c
--- cli-out.c	2 May 2010 21:14:59 -0000	1.29
+++ cli-out.c	13 May 2010 23:50:10 -0000
@@ -50,6 +50,7 @@ cli_table_begin (struct ui_out *uiout, i
 		 const char *tblid)
 {
   cli_out_data *data = ui_out_data (uiout);
+
   if (nr_rows == 0)
     data->suppress_output = 1;
   else
@@ -64,6 +65,7 @@ static void
 cli_table_body (struct ui_out *uiout)
 {
   cli_out_data *data = ui_out_data (uiout);
+
   if (data->suppress_output)
     return;
   /* first, close the table header line */
@@ -76,6 +78,7 @@ static void
 cli_table_end (struct ui_out *uiout)
 {
   cli_out_data *data = ui_out_data (uiout);
+
   data->suppress_output = 0;
 }
 
@@ -87,6 +90,7 @@ cli_table_header (struct ui_out *uiout, 
 		  const char *colhdr)
 {
   cli_out_data *data = ui_out_data (uiout);
+
   if (data->suppress_output)
     return;
 
@@ -104,6 +108,7 @@ cli_begin (struct ui_out *uiout,
 	   const char *id)
 {
   cli_out_data *data = ui_out_data (uiout);
+
   if (data->suppress_output)
     return;
 }
@@ -116,6 +121,7 @@ cli_end (struct ui_out *uiout,
 	 int level)
 {
   cli_out_data *data = ui_out_data (uiout);
+
   if (data->suppress_output)
     return;
 }
@@ -127,9 +133,9 @@ cli_field_int (struct ui_out *uiout, int
 	       enum ui_align alignment,
 	       const char *fldname, int value)
 {
-  char buffer[20];		/* FIXME: how many chars long a %d can become? */
-
+  char buffer[20];	/* FIXME: how many chars long a %d can become? */
   cli_out_data *data = ui_out_data (uiout);
+
   if (data->suppress_output)
     return;
   sprintf (buffer, "%d", value);
@@ -147,6 +153,7 @@ cli_field_skip (struct ui_out *uiout, in
 		const char *fldname)
 {
   cli_out_data *data = ui_out_data (uiout);
+
   if (data->suppress_output)
     return;
 
@@ -168,8 +175,8 @@ cli_field_string (struct ui_out *uiout,
 {
   int before = 0;
   int after = 0;
-
   cli_out_data *data = ui_out_data (uiout);
+
   if (data->suppress_output)
     return;
 
@@ -217,6 +224,7 @@ cli_field_fmt (struct ui_out *uiout, int
 	       va_list args)
 {
   cli_out_data *data = ui_out_data (uiout);
+
   if (data->suppress_output)
     return;
 
@@ -230,6 +238,7 @@ static void
 cli_spaces (struct ui_out *uiout, int numspaces)
 {
   cli_out_data *data = ui_out_data (uiout);
+
   if (data->suppress_output)
     return;
   print_spaces_filtered (numspaces, data->stream);
@@ -239,6 +248,7 @@ static void
 cli_text (struct ui_out *uiout, const char *string)
 {
   cli_out_data *data = ui_out_data (uiout);
+
   if (data->suppress_output)
     return;
   fputs_filtered (string, data->stream);
@@ -249,6 +259,7 @@ cli_message (struct ui_out *uiout, int v
 	     const char *format, va_list args)
 {
   cli_out_data *data = ui_out_data (uiout);
+
   if (data->suppress_output)
     return;
   if (ui_out_get_verblvl (uiout) >= verbosity)
@@ -259,6 +270,7 @@ static void
 cli_wrap_hint (struct ui_out *uiout, char *identstring)
 {
   cli_out_data *data = ui_out_data (uiout);
+
   if (data->suppress_output)
     return;
   wrap_here (identstring);
@@ -268,6 +280,7 @@ static void
 cli_flush (struct ui_out *uiout)
 {
   cli_out_data *data = ui_out_data (uiout);
+
   gdb_flush (data->stream);
 }
 
@@ -275,6 +288,7 @@ static int
 cli_redirect (struct ui_out *uiout, struct ui_file *outstream)
 {
   cli_out_data *data = ui_out_data (uiout);
+
   if (outstream != NULL)
     {
       data->original_stream = data->stream;
@@ -315,6 +329,7 @@ static void
 field_separator (void)
 {
   cli_out_data *data = ui_out_data (uiout);
+
   fputc_filtered (' ', data->stream);
 }
 
@@ -360,8 +375,8 @@ struct ui_out *
 cli_out_new (struct ui_file *stream)
 {
   int flags = ui_source_list;
-
   cli_out_data *data = XMALLOC (cli_out_data);
+
   cli_out_data_ctor (data, stream);
   return ui_out_new (&cli_ui_out_impl, data, flags);
 }
@@ -371,6 +386,7 @@ cli_out_set_stream (struct ui_out *uiout
 {
   cli_out_data *data = ui_out_data (uiout);
   struct ui_file *old = data->stream;
+
   data->stream = stream;
   return old;
 }
Index: coffread.c
===================================================================
RCS file: /cvs/src/src/gdb/coffread.c,v
retrieving revision 1.107
diff -u -p -r1.107 coffread.c
--- coffread.c	5 May 2010 23:44:19 -0000	1.107
+++ coffread.c	13 May 2010 23:50:10 -0000
@@ -260,6 +260,7 @@ static void
 find_targ_sec (bfd *abfd, asection *sect, void *obj)
 {
   struct find_targ_sec_arg *args = (struct find_targ_sec_arg *) obj;
+
   if (sect->target_index == args->targ_index)
     *args->resultp = sect;
 }
@@ -282,6 +283,7 @@ static int
 cs_to_section (struct coff_symbol *cs, struct objfile *objfile)
 {
   asection *sect = cs_to_bfd_section (cs, objfile);
+
   if (sect == NULL)
     return SECT_OFF_TEXT (objfile);
   return sect->index;
@@ -414,6 +416,7 @@ record_minimal_symbol (struct coff_symbo
 		       struct objfile *objfile)
 {
   struct bfd_section *bfd_section;
+
   /* We don't want TDESC entry points in the minimal symbol table */
   if (cs->c_name[0] == '@')
     return NULL;
@@ -644,6 +647,7 @@ coff_symfile_read (struct objfile *objfi
       if (debugfile)
 	{
 	  bfd *abfd = symfile_bfd_open (debugfile);
+
 	  symbol_file_add_separate (abfd, symfile_flags, objfile);
 	  xfree (debugfile);
 	}
@@ -779,6 +783,7 @@ coff_symtab_read (long symtab_offset, un
 	{
 	  /* Record all functions -- external and static -- in minsyms. */
 	  int section = cs_to_section (cs, objfile);
+
 	  tmpaddr = cs->c_value + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
 	  record_minimal_symbol (cs, tmpaddr, mst_text, section, objfile);
 
@@ -884,6 +889,7 @@ coff_symtab_read (long symtab_offset, un
 		/* This is a common symbol.  See if the target
 		   environment knows where it has been relocated to.  */
 		CORE_ADDR reladdr;
+
 		if (target_lookup_symbol (cs->c_name, &reladdr))
 		  {
 		    /* Error in lookup; ignore symbol.  */
@@ -908,6 +914,7 @@ coff_symtab_read (long symtab_offset, un
 	    else
 	      {
 		asection *bfd_section = cs_to_bfd_section (cs, objfile);
+
 		sec = cs_to_section (cs, objfile);
 		tmpaddr = cs->c_value;
  		/* Statics in a PE file also get relocated */
@@ -949,6 +956,7 @@ coff_symtab_read (long symtab_offset, un
 	    if (SDB_TYPE (cs->c_type))
 	      {
 		struct symbol *sym;
+
 		sym = process_coff_symbol
 		  (cs, &main_aux, objfile);
 		SYMBOL_VALUE (sym) = tmpaddr;
@@ -1497,8 +1505,8 @@ process_coff_symbol (struct coff_symbol 
 		     struct objfile *objfile)
 {
   struct symbol *sym
-  = (struct symbol *) obstack_alloc (&objfile->objfile_obstack,
-				     sizeof (struct symbol));
+    = (struct symbol *) obstack_alloc (&objfile->objfile_obstack,
+				       sizeof (struct symbol));
   char *name;
 
   memset (sym, 0, sizeof (struct symbol));
@@ -2098,6 +2106,7 @@ coff_read_enum_type (int index, int leng
       for (; j < syms->nsyms; j++, n++)
 	{
 	  struct symbol *xsym = syms->symbol[j];
+
 	  SYMBOL_TYPE (xsym) = type;
 	  TYPE_FIELD_NAME (type, n) = SYMBOL_LINKAGE_NAME (xsym);
 	  SET_FIELD_BITPOS (TYPE_FIELD (type, n), SYMBOL_VALUE (xsym));
Index: complaints.c
===================================================================
RCS file: /cvs/src/src/gdb/complaints.c,v
retrieving revision 1.30
diff -u -p -r1.30 complaints.c
--- complaints.c	2 May 2010 21:14:59 -0000	1.30
+++ complaints.c	13 May 2010 23:50:10 -0000
@@ -171,6 +171,7 @@ vcomplaint (struct complaints **c, const
   struct complaints *complaints = get_complaints (c);
   struct complain *complaint = find_complaint (complaints, file, line, fmt);
   enum complaint_series series;
+
   gdb_assert (complaints != NULL);
 
   complaint->counter++;
@@ -243,6 +244,7 @@ void
 complaint (struct complaints **complaints, const char *fmt, ...)
 {
   va_list args;
+
   va_start (args, fmt);
   vcomplaint (complaints, NULL/*file*/, 0/*line*/, fmt, args);
   va_end (args);
Index: completer.c
===================================================================
RCS file: /cvs/src/src/gdb/completer.c,v
retrieving revision 1.38
diff -u -p -r1.38 completer.c
--- completer.c	6 May 2010 19:41:11 -0000	1.38
+++ completer.c	13 May 2010 23:50:10 -0000
@@ -126,6 +126,7 @@ filename_completer (struct cmd_list_elem
   while (1)
     {
       char *p, *q;
+
       p = rl_filename_completion_function (text, subsequent_name);
       if (return_val_used >= return_val_alloced)
 	{
@@ -389,6 +390,7 @@ add_struct_fields (struct type *type, in
   for (i = TYPE_NFN_FIELDS (type) - 1; i >= 0; --i)
     {
       char *name = TYPE_FN_FIELDLIST_NAME (type, i);
+
       if (name && ! strncmp (name, fieldname, namelen))
 	{
 	  if (!computed_type_name)
@@ -783,7 +785,8 @@ command_completer (struct cmd_list_eleme
 char *
 gdb_completion_word_break_characters (void)
 {
-  char ** list;
+  char **list;
+
   list = complete_line_internal (rl_line_buffer, rl_line_buffer, rl_point,
 				 handle_brkchars);
   gdb_assert (list == NULL);
Index: corefile.c
===================================================================
RCS file: /cvs/src/src/gdb/corefile.c,v
retrieving revision 1.57
diff -u -p -r1.57 corefile.c
--- corefile.c	6 May 2010 22:50:09 -0000	1.57
+++ corefile.c	13 May 2010 23:50:10 -0000
@@ -232,6 +232,7 @@ void
 read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len)
 {
   int status;
+
   status = target_read_memory (memaddr, myaddr, len);
   if (status != 0)
     memory_error (status, memaddr);
@@ -243,6 +244,7 @@ void
 read_stack (CORE_ADDR memaddr, gdb_byte *myaddr, int len)
 {
   int status;
+
   status = target_read_stack (memaddr, myaddr, len);
   if (status != 0)
     memory_error (status, memaddr);
@@ -286,11 +288,13 @@ do_captured_read_memory_integer (void *d
    if successful.  */
 
 int
-safe_read_memory_integer (CORE_ADDR memaddr, int len, enum bfd_endian byte_order,
+safe_read_memory_integer (CORE_ADDR memaddr, int len, 
+			  enum bfd_endian byte_order,
 			  LONGEST *return_value)
 {
   int status;
   struct captured_read_memory_integer_arguments args;
+
   args.memaddr = memaddr;
   args.len = len;
   args.byte_order = byte_order;
@@ -352,6 +356,7 @@ CORE_ADDR
 read_memory_typed_address (CORE_ADDR addr, struct type *type)
 {
   gdb_byte *buf = alloca (TYPE_LENGTH (type));
+
   read_memory (addr, buf, TYPE_LENGTH (type));
   return extract_typed_address (buf, type);
 }
@@ -361,6 +366,7 @@ void
 write_memory (CORE_ADDR memaddr, const bfd_byte *myaddr, int len)
 {
   int status;
+
   status = target_write_memory (memaddr, myaddr, len);
   if (status != 0)
     memory_error (status, memaddr);
@@ -368,20 +374,24 @@ write_memory (CORE_ADDR memaddr, const b
 
 /* Store VALUE at ADDR in the inferior as a LEN-byte unsigned integer.  */
 void
-write_memory_unsigned_integer (CORE_ADDR addr, int len, enum bfd_endian byte_order,
+write_memory_unsigned_integer (CORE_ADDR addr, int len, 
+			       enum bfd_endian byte_order,
 			       ULONGEST value)
 {
   gdb_byte *buf = alloca (len);
+
   store_unsigned_integer (buf, len, byte_order, value);
   write_memory (addr, buf, len);
 }
 
 /* Store VALUE at ADDR in the inferior as a LEN-byte signed integer.  */
 void
-write_memory_signed_integer (CORE_ADDR addr, int len, enum bfd_endian byte_order,
+write_memory_signed_integer (CORE_ADDR addr, int len, 
+			     enum bfd_endian byte_order,
 			     LONGEST value)
 {
   gdb_byte *buf = alloca (len);
+
   store_signed_integer (buf, len, byte_order, value);
   write_memory (addr, buf, len);
 }
@@ -424,6 +434,7 @@ void
 _initialize_core (void)
 {
   struct cmd_list_element *c;
+
   c = add_cmd ("core-file", class_files, core_file_command, _("\
 Use FILE as core dump for examining memory and registers.\n\
 No arg means have no core file.  This command has been superseded by the\n\
Index: corelow.c
===================================================================
RCS file: /cvs/src/src/gdb/corelow.c,v
retrieving revision 1.99
diff -u -p -r1.99 corelow.c
--- corelow.c	5 May 2010 19:53:54 -0000	1.99
+++ corelow.c	13 May 2010 23:50:11 -0000
@@ -418,6 +418,7 @@ core_open (char *filename, int from_tty)
 	 usually happen, but we're dealing with input here, which can
 	 always be broken in different ways.  */
       struct thread_info *thread = first_thread_of_process (-1);
+
       if (thread == NULL)
 	{
 	  inferior_appeared (current_inferior (), CORELOW_PID);
@@ -764,8 +765,8 @@ core_xfer_partial (struct target_ops *op
 
 	  struct bfd_section *section;
 	  bfd_size_type size;
-
 	  char sectionstr[100];
+
 	  xsnprintf (sectionstr, sizeof sectionstr, "SPU/%s", annex);
 
 	  section = bfd_get_section_by_name (core_bfd, sectionstr);
@@ -792,6 +793,7 @@ core_xfer_partial (struct target_ops *op
 	{
 	  /* NULL annex requests list of all present spuids.  */
 	  struct spuid_list list;
+
 	  list.buf = readbuf;
 	  list.offset = offset;
 	  list.len = len;
@@ -856,6 +858,7 @@ core_pid_to_str (struct target_ops *ops,
       && gdbarch_core_pid_to_str_p (core_gdbarch))
     {
       char *ret = gdbarch_core_pid_to_str (core_gdbarch, ptid);
+
       if (ret != NULL)
 	return ret;
     }
Index: cp-abi.c
===================================================================
RCS file: /cvs/src/src/gdb/cp-abi.c,v
retrieving revision 1.25
diff -u -p -r1.25 cp-abi.c
--- cp-abi.c	1 Jan 2010 07:31:30 -0000	1.25
+++ cp-abi.c	13 May 2010 23:50:11 -0000
@@ -92,6 +92,7 @@ value_rtti_type (struct value *v, int *f
 {
   struct type *ret = NULL;
   struct gdb_exception e;
+
   if ((current_cp_abi.rtti_type) == NULL)
     return NULL;
   TRY_CATCH (e, RETURN_MASK_ERROR)
@@ -238,8 +239,8 @@ list_cp_abis (int from_tty)
 {
   struct cleanup *cleanup_chain;
   int i;
-  ui_out_text (uiout, "The available C++ ABIs are:\n");
 
+  ui_out_text (uiout, "The available C++ ABIs are:\n");
   cleanup_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "cp-abi-list");
   for (i = 0; i < num_cp_abis; i++)
     {
Index: cp-namespace.c
===================================================================
RCS file: /cvs/src/src/gdb/cp-namespace.c,v
retrieving revision 1.41
diff -u -p -r1.41 cp-namespace.c
--- cp-namespace.c	7 May 2010 01:12:12 -0000	1.41
+++ cp-namespace.c	13 May 2010 23:50:11 -0000
@@ -264,6 +264,7 @@ cp_lookup_symbol_in_namespace (const cha
     {
       char *concatenated_name = alloca (strlen (namespace) + 2 +
                                         strlen (name) + 1);
+
       strcpy (concatenated_name, namespace);
       strcat (concatenated_name, "::");
       strcat (concatenated_name, name);
@@ -577,6 +578,7 @@ cp_lookup_nested_type (struct type *pare
 	                                                    nested_name,
 	                                                    block,
 	                                                    VAR_DOMAIN);
+
 	if (sym == NULL || SYMBOL_CLASS (sym) != LOC_TYPEDEF)
 	  return NULL;
 	else
@@ -644,6 +646,7 @@ cp_lookup_transparent_type_loop (const c
     {
       struct type *retval
 	= cp_lookup_transparent_type_loop (name, scope, scope_length + 2);
+
       if (retval != NULL)
 	return retval;
     }
@@ -876,6 +879,7 @@ static void
 maintenance_cplus_namespace (char *args, int from_tty)
 {
   struct objfile *objfile;
+
   printf_unfiltered (_("Possible namespaces:\n"));
   ALL_OBJFILES (objfile)
     {
Index: cp-support.c
===================================================================
RCS file: /cvs/src/src/gdb/cp-support.c,v
retrieving revision 1.39
diff -u -p -r1.39 cp-support.c
--- cp-support.c	7 May 2010 14:46:26 -0000	1.39
+++ cp-support.c	13 May 2010 23:50:11 -0000
@@ -715,13 +715,13 @@ static void
 make_symbol_overload_list_namespace (const char *func_name,
                                      const char *namespace)
 {
-
   if (namespace[0] == '\0')
     make_symbol_overload_list_qualified (func_name);
   else
     {
       char *concatenated_name
 	= alloca (strlen (namespace) + 2 + strlen (func_name) + 1);
+
       strcpy (concatenated_name, namespace);
       strcat (concatenated_name, "::");
       strcat (concatenated_name, func_name);
@@ -996,18 +996,20 @@ cp_validate_operator (const char *input)
   if (strncmp (p, "operator", 8) == 0)
     {
       int valid = 0;
-      p += 8;
 
+      p += 8;
       SKIP_SPACE (p);
       for (i = 0; i < sizeof (operator_tokens) / sizeof (operator_tokens[0]);
 	   ++i)
 	{
 	  int length = strlen (operator_tokens[i]);
+
 	  /* By using strncmp here, we MUST have operator_tokens ordered!
 	     See additional notes where operator_tokens is defined above.  */
 	  if (strncmp (p, operator_tokens[i], length) == 0)
 	    {
 	      const char *op = p;
+
 	      valid = 1;
 	      p += length;
 
Index: cp-valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/cp-valprint.c,v
retrieving revision 1.67
diff -u -p -r1.67 cp-valprint.c
--- cp-valprint.c	22 Apr 2010 20:12:07 -0000	1.67
+++ cp-valprint.c	13 May 2010 23:50:11 -0000
@@ -198,6 +198,7 @@ cp_print_value_fields (struct type *type
 	    {
 	      stat_array_obstack_initial_size =
 		obstack_object_size (&dont_print_stat_array_obstack);
+
 	      last_set_recurse = recurse;
 	    }
 	}
@@ -280,6 +281,7 @@ cp_print_value_fields (struct type *type
 	      else
 		{
 		  struct value_print_options opts = *options;
+
 		  opts.deref_ref = 0;
 		  v = value_from_longest
 		    (TYPE_FIELD_TYPE (type, i), 
@@ -298,6 +300,7 @@ cp_print_value_fields (struct type *type
 	      else if (field_is_static (&TYPE_FIELD (type, i)))
 		{
 		  struct value *v = value_static_field (type, i);
+
 		  if (v == NULL)
 		    fputs_filtered ("<optimized out>", stream);
 		  else
@@ -307,6 +310,7 @@ cp_print_value_fields (struct type *type
 	      else
 		{
 		  struct value_print_options opts = *options;
+
 		  opts.deref_ref = 0;
 		  val_print (TYPE_FIELD_TYPE (type, i),
 			     valaddr, offset + TYPE_FIELD_BITPOS (type, i) / 8,
@@ -374,7 +378,8 @@ cp_print_value_fields_rtti (struct type 
 			    CORE_ADDR address,
 			    struct ui_file *stream, int recurse,
 			    const struct value_print_options *options,
-			    struct type **dont_print_vb, int dont_print_statmem)
+			    struct type **dont_print_vb, 
+			    int dont_print_statmem)
 {
   struct value *value;
   int full, top, using_enc;
@@ -462,6 +467,7 @@ cp_print_value (struct type *type, struc
 	    {
 	      /* FIXME (alloca): unsafe if baseclass is really really large. */
 	      gdb_byte *buf = alloca (TYPE_LENGTH (baseclass));
+
 	      base_valaddr = buf;
 	      if (target_read_memory (address + boffset, buf,
 				      TYPE_LENGTH (baseclass)) != 0)
@@ -697,6 +703,7 @@ cp_print_class_member (const gdb_byte *v
   if (domain != NULL)
     {
       char *name;
+
       fputs_filtered (prefix, stream);
       name = type_name_no_tag (domain);
       if (name)
Index: c-typeprint.c
===================================================================
RCS file: /cvs/src/src/gdb/c-typeprint.c,v
retrieving revision 1.55
diff -u -p -r1.55 c-typeprint.c
--- c-typeprint.c	31 Mar 2010 00:48:29 -0000	1.55
+++ c-typeprint.c	13 May 2010 23:50:11 -0000
@@ -233,6 +233,7 @@ c_type_print_varspec_prefix (struct type
 			     int show, int passed_a_ptr, int need_post_space)
 {
   char *name;
+
   if (type == 0)
     return;
 
@@ -919,6 +920,7 @@ c_type_print_base (struct type *type, st
 	      struct fn_field *f = TYPE_FN_FIELDLIST1 (type, i);
 	      int len2 = TYPE_FN_FIELDLIST_LENGTH (type, i);
 	      int j;
+
 	      for (j = 0; j < len2; j++)
 		if (!TYPE_FN_FIELD_ARTIFICIAL (f, j))
 		  real_len++;
@@ -934,13 +936,14 @@ c_type_print_base (struct type *type, st
 	      char *method_name = TYPE_FN_FIELDLIST_NAME (type, i);
 	      char *name = type_name_no_tag (type);
 	      int is_constructor = name && strcmp (method_name, name) == 0;
+
 	      for (j = 0; j < len2; j++)
 		{
 		  char *physname = TYPE_FN_FIELD_PHYSNAME (f, j);
 		  int is_full_physname_constructor =
-		   is_constructor_name (physname) 
-		   || is_destructor_name (physname)
-		   || method_name[0] == '~';
+		    is_constructor_name (physname) 
+		    || is_destructor_name (physname)
+		    || method_name[0] == '~';
 
 		  /* Do not print out artificial methods.  */
 		  if (TYPE_FN_FIELD_ARTIFICIAL (f, j))
@@ -1013,6 +1016,7 @@ c_type_print_base (struct type *type, st
 			{
 			  int staticp = TYPE_FN_FIELD_STATIC_P (f, j);
 			  struct type *mtype = TYPE_FN_FIELD_TYPE (f, j);
+
 			  cp_type_print_method_args (mtype,
 						     "",
 						     method_name,
@@ -1034,6 +1038,7 @@ c_type_print_base (struct type *type, st
 		      if (p != NULL)
 			{
 			  int length = p - demangled_no_class;
+
 			  demangled_no_static = (char *) xmalloc (length + 1);
 			  strncpy (demangled_no_static, demangled_no_class, length);
 			  *(demangled_no_static + length) = '\0';
Index: c-valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/c-valprint.c,v
retrieving revision 1.67
diff -u -p -r1.67 c-valprint.c
--- c-valprint.c	2 Feb 2010 16:45:16 -0000	1.67
+++ c-valprint.c	13 May 2010 23:50:11 -0000
@@ -254,6 +254,7 @@ c_val_print (struct type *type, const gd
 	     -fvtable_thunks.  (Otherwise, look under TYPE_CODE_STRUCT.) */
 	  CORE_ADDR addr
 	    = extract_typed_address (valaddr + embedded_offset, type);
+
 	  print_function_pointer_address (gdbarch, addr, stream,
 					  options->addressprint);
 	  break;
@@ -343,6 +344,7 @@ c_val_print (struct type *type, const gd
 	{
 	  CORE_ADDR addr
 	    = extract_typed_address (valaddr + embedded_offset, type);
+
 	  fprintf_filtered (stream, "@");
 	  fputs_filtered (paddress (gdbarch, addr), stream);
 	  if (options->deref_ref)
@@ -354,9 +356,10 @@ c_val_print (struct type *type, const gd
 	  if (TYPE_CODE (elttype) != TYPE_CODE_UNDEF)
 	    {
 	      struct value *deref_val =
-	      value_at
-	      (TYPE_TARGET_TYPE (type),
-	       unpack_pointer (type, valaddr + embedded_offset));
+		value_at
+		(TYPE_TARGET_TYPE (type),
+		 unpack_pointer (type, valaddr + embedded_offset));
+
 	      common_val_print (deref_val, stream, recurse, options,
 				current_language);
 	    }
@@ -481,6 +484,7 @@ c_val_print (struct type *type, const gd
       if (options->format || options->output_format)
 	{
 	  struct value_print_options opts = *options;
+
 	  opts.format = (options->format ? options->format
 			 : options->output_format);
 	  print_scalar_formatted (valaddr + embedded_offset, type,

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]