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]

[ob] e*.c white space


add blank line between decls and statements
2010-05-14  Michael Snyder  <msnyder@vmware.com>

	* elfread.c: White space.
	* environ.c: White space.
	* eval.c: White space.
	* event-loop.c: White space.
	* event-top.c: White space.
	* exceptions.c: White space.
	* exec.c: White space.
	* expprint.c: White space.

Index: elfread.c
===================================================================
RCS file: /cvs/src/src/gdb/elfread.c,v
retrieving revision 1.95
diff -u -p -r1.95 elfread.c
--- elfread.c	5 May 2010 23:44:19 -0000	1.95
+++ elfread.c	14 May 2010 18:34:34 -0000
@@ -425,6 +425,7 @@ elf_symtab_read (struct objfile *objfile
 		  /* Named Local variable in a Data section.
 		     Check its name for stabs-in-elf.  */
 		  int special_local_sect;
+
 		  if (strcmp ("Bbss.bss", sym->name) == 0)
 		    special_local_sect = SECT_OFF_BSS (objfile);
 		  else if (strcmp ("Ddata.data", sym->name) == 0)
@@ -889,6 +890,7 @@ elf_symfile_read (struct objfile *objfil
       if (debugfile)
 	{
 	  bfd *abfd = symfile_bfd_open (debugfile);
+
 	  symbol_file_add_separate (abfd, symfile_flags, objfile);
 	  xfree (debugfile);
 	}
Index: environ.c
===================================================================
RCS file: /cvs/src/src/gdb/environ.c,v
retrieving revision 1.19
diff -u -p -r1.19 environ.c
--- environ.c	1 Jan 2010 07:31:31 -0000	1.19
+++ environ.c	14 May 2010 18:34:34 -0000
@@ -81,6 +81,7 @@ init_environ (struct gdb_environ *e)
     {
       int len = strlen (e->vector[i]);
       char *new = (char *) xmalloc (len + 1);
+
       memcpy (new, e->vector[i], len + 1);
       e->vector[i] = new;
     }
Index: eval.c
===================================================================
RCS file: /cvs/src/src/gdb/eval.c,v
retrieving revision 1.133
diff -u -p -r1.133 eval.c
--- eval.c	11 May 2010 16:54:28 -0000	1.133
+++ eval.c	14 May 2010 18:34:34 -0000
@@ -162,6 +162,7 @@ struct value *
 evaluate_expression (struct expression *exp)
 {
   int pc = 0;
+
   return evaluate_subexp (NULL_TYPE, exp, &pc, EVAL_NORMAL);
 }
 
@@ -172,6 +173,7 @@ struct value *
 evaluate_type (struct expression *exp)
 {
   int pc = 0;
+
   return evaluate_subexp (NULL_TYPE, exp, &pc, EVAL_AVOID_SIDE_EFFECTS);
 }
 
@@ -196,6 +198,7 @@ extract_field_op (struct expression *exp
 {
   int tem;
   char *result;
+
   if (exp->elts[*subexp].opcode != STRUCTOP_STRUCT
       && exp->elts[*subexp].opcode != STRUCTOP_PTR)
     return NULL;
@@ -216,6 +219,7 @@ get_label (struct expression *exp, int *
       int pc = (*pos)++;
       char *name = &exp->elts[pc + 2].string;
       int tem = longest_to_int (exp->elts[pc + 1].longconst);
+
       (*pos) += 3 + BYTES_TO_EXP_ELEM (tem + 1);
       return name;
     }
@@ -237,6 +241,7 @@ evaluate_struct_tuple (struct value *str
   int fieldno = -1;
   int variantno = -1;
   int subfieldno = -1;
+
   while (--nargs >= 0)
     {
       int pc = *pos;
@@ -252,12 +257,14 @@ evaluate_struct_tuple (struct value *str
       do
 	{
 	  char *label = get_label (exp, &pc);
+
 	  if (label)
 	    {
 	      for (fieldno = 0; fieldno < TYPE_NFIELDS (struct_type);
 		   fieldno++)
 		{
 		  char *field_name = TYPE_FIELD_NAME (struct_type, fieldno);
+
 		  if (field_name != NULL && strcmp (field_name, label) == 0)
 		    {
 		      variantno = -1;
@@ -270,6 +277,7 @@ evaluate_struct_tuple (struct value *str
 		   fieldno++)
 		{
 		  char *field_name = TYPE_FIELD_NAME (struct_type, fieldno);
+
 		  field_type = TYPE_FIELD_TYPE (struct_type, fieldno);
 		  if ((field_name == 0 || *field_name == '\0')
 		      && TYPE_CODE (field_type) == TYPE_CODE_UNION)
@@ -381,6 +389,7 @@ init_array_element (struct value *array,
 {
   LONGEST index;
   int element_size = TYPE_LENGTH (value_type (element));
+
   if (exp->elts[*pos].opcode == BINOP_COMMA)
     {
       (*pos)++;
@@ -392,6 +401,7 @@ init_array_element (struct value *array,
   else if (exp->elts[*pos].opcode == BINOP_RANGE)
     {
       LONGEST low, high;
+
       (*pos)++;
       low = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside));
       high = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside));
@@ -464,6 +474,7 @@ unop_promote (const struct language_defn
 	     it needs to modify this function.  */
 	  {
 	    struct type *builtin_int = builtin_type (gdbarch)->builtin_int;
+
 	    if (TYPE_LENGTH (type1) < TYPE_LENGTH (builtin_int))
 	      *arg1 = value_cast (builtin_int, *arg1);
 	  }
@@ -848,6 +859,7 @@ evaluate_subexp_standard (struct type *e
 	  && TYPE_CODE (type) == TYPE_CODE_STRUCT)
 	{
 	  struct value *rec = allocate_value (expect_type);
+
 	  memset (value_contents_raw (rec), '\0', TYPE_LENGTH (type));
 	  return evaluate_struct_tuple (rec, exp, pos, noside, nargs);
 	}
@@ -860,6 +872,7 @@ evaluate_subexp_standard (struct type *e
 	  struct value *array = allocate_value (expect_type);
 	  int element_size = TYPE_LENGTH (check_typedef (element_type));
 	  LONGEST low_bound, high_bound, index;
+
 	  if (get_discrete_bounds (range_type, &low_bound, &high_bound) < 0)
 	    {
 	      low_bound = 0;
@@ -871,6 +884,7 @@ evaluate_subexp_standard (struct type *e
 	    {
 	      struct value *element;
 	      int index_pc = 0;
+
 	      if (exp->elts[*pos].opcode == BINOP_RANGE)
 		{
 		  index_pc = ++(*pos);
@@ -882,6 +896,7 @@ evaluate_subexp_standard (struct type *e
 	      if (index_pc)
 		{
 		  int continue_pc = *pos;
+
 		  *pos = index_pc;
 		  index = init_array_element (array, element, exp, pos, noside,
 					      low_bound, high_bound);
@@ -924,6 +939,7 @@ evaluate_subexp_standard (struct type *e
 	      LONGEST range_low, range_high;
 	      struct type *range_low_type, *range_high_type;
 	      struct value *elem_val;
+
 	      if (exp->elts[*pos].opcode == BINOP_RANGE)
 		{
 		  (*pos)++;
@@ -968,6 +984,7 @@ evaluate_subexp_standard (struct type *e
 	      for (; range_low <= range_high; range_low++)
 		{
 		  int bit_index = (unsigned) range_low % TARGET_CHAR_BIT;
+
 		  if (gdbarch_bits_big_endian (exp->gdbarch))
 		    bit_index = TARGET_CHAR_BIT - 1 - bit_index;
 		  valaddr[(unsigned) range_low / TARGET_CHAR_BIT]
@@ -991,9 +1008,10 @@ evaluate_subexp_standard (struct type *e
       {
 	struct value *array = evaluate_subexp (NULL_TYPE, exp, pos, noside);
 	int lowbound
-	= value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside));
+	  = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside));
 	int upper
-	= value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside));
+	  = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside));
+
 	if (noside == EVAL_SKIP)
 	  goto nosideret;
 	return value_slice (array, lowbound, upper - lowbound + 1);
@@ -1003,9 +1021,10 @@ evaluate_subexp_standard (struct type *e
       {
 	struct value *array = evaluate_subexp (NULL_TYPE, exp, pos, noside);
 	int lowbound
-	= value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside));
+	  = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside));
 	int length
-	= value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside));
+	  = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside));
+
 	return value_slice (array, lowbound, length);
       }
 
@@ -1101,6 +1120,7 @@ evaluate_subexp_standard (struct type *e
 	if (gnu_runtime)
 	  {
 	    struct type *type = selector_type;
+
 	    type = lookup_function_type (type);
 	    type = lookup_pointer_type (type);
 	    type = lookup_function_type (type);
@@ -1286,6 +1306,7 @@ evaluate_subexp_standard (struct type *e
 	       it. */
 
 	    struct type *type = value_type (called_method);
+
 	    if (type && TYPE_CODE (type) == TYPE_CODE_PTR)
 	      type = TYPE_TARGET_TYPE (type);
 	    type = TYPE_TARGET_TYPE (type);
@@ -1367,6 +1388,7 @@ evaluate_subexp_standard (struct type *e
 	  if (noside == EVAL_AVOID_SIDE_EFFECTS)
 	    {
 	      struct type *method_type = check_typedef (value_type (arg1));
+
 	      arg1 = value_zero (method_type, not_lval);
 	    }
 	  else
@@ -1458,6 +1480,7 @@ evaluate_subexp_standard (struct type *e
           /* Save the function position and move pos so that the arguments
              can be evaluated.  */
           int func_name_len;
+
           save_pos1 = *pos;
           tem = 1;
 
@@ -1567,6 +1590,7 @@ evaluate_subexp_standard (struct type *e
 	    /* Non-C++ case -- or no overload resolution */
 	    {
 	      struct value *temp = arg2;
+
 	      argvec[0] = value_struct_elt (&temp, argvec + 1, tstr,
 					    &static_memfuncp,
 					    op == STRUCTOP_STRUCT
@@ -1773,6 +1797,7 @@ evaluate_subexp_standard (struct type *e
       else
 	{
 	  struct value *temp = arg1;
+
 	  return value_struct_elt (&temp, NULL, &exp->elts[pc + 2].string,
 				   NULL, "structure");
 	}
@@ -1818,6 +1843,7 @@ evaluate_subexp_standard (struct type *e
       else
 	{
 	  struct value *temp = arg1;
+
 	  return value_struct_elt (&temp, NULL, &exp->elts[pc + 2].string,
 				   NULL, "structure pointer");
 	}
@@ -2501,6 +2527,7 @@ evaluate_subexp_standard (struct type *e
       else
 	{
 	  struct value *retvalp = evaluate_subexp_for_address (exp, pos, noside);
+
 	  return retvalp;
 	}
 
@@ -2559,6 +2586,7 @@ evaluate_subexp_standard (struct type *e
       else
 	{
 	  CORE_ADDR tls_addr;
+
 	  tls_addr = target_translate_tls_address (exp->elts[pc + 1].objfile,
 						   value_as_address (arg1));
 	  return value_at_lazy (exp->elts[pc + 2].type, tls_addr);
@@ -2579,6 +2607,7 @@ evaluate_subexp_standard (struct type *e
 	  else
 	    {
 	      struct value *tmp = arg1;
+
 	      arg2 = value_one (value_type (arg1), not_lval);
 	      binop_promote (exp->language_defn, exp->gdbarch, &tmp, &arg2);
 	      arg2 = value_binop (tmp, arg2, BINOP_ADD);
@@ -2602,6 +2631,7 @@ evaluate_subexp_standard (struct type *e
 	  else
 	    {
 	      struct value *tmp = arg1;
+
 	      arg2 = value_one (value_type (arg1), not_lval);
 	      binop_promote (exp->language_defn, exp->gdbarch, &tmp, &arg2);
 	      arg2 = value_binop (tmp, arg2, BINOP_SUB);
@@ -2625,6 +2655,7 @@ evaluate_subexp_standard (struct type *e
 	  else
 	    {
 	      struct value *tmp = arg1;
+
 	      arg2 = value_one (value_type (arg1), not_lval);
 	      binop_promote (exp->language_defn, exp->gdbarch, &tmp, &arg2);
 	      arg2 = value_binop (tmp, arg2, BINOP_ADD);
@@ -2649,6 +2680,7 @@ evaluate_subexp_standard (struct type *e
 	  else
 	    {
 	      struct value *tmp = arg1;
+
 	      arg2 = value_one (value_type (arg1), not_lval);
 	      binop_promote (exp->language_defn, exp->gdbarch, &tmp, &arg2);
 	      arg2 = value_binop (tmp, arg2, BINOP_SUB);
@@ -2675,6 +2707,7 @@ evaluate_subexp_standard (struct type *e
       else if (noside == EVAL_AVOID_SIDE_EFFECTS)
 	{
 	  struct type *type = exp->elts[pc + 1].type;
+
 	  /* If this is a typedef, then find its immediate target.  We
 	     use check_typedef to resolve stubs, but we ignore its
 	     result because we do not want to dig past all
@@ -2757,7 +2790,7 @@ evaluate_subexp_for_address (struct expr
       if (noside == EVAL_AVOID_SIDE_EFFECTS)
 	{
 	  struct type *type =
-	  lookup_pointer_type (SYMBOL_TYPE (var));
+	    lookup_pointer_type (SYMBOL_TYPE (var));
 	  enum address_class sym_class = SYMBOL_CLASS (var);
 
 	  if (sym_class == LOC_CONST
@@ -2907,6 +2940,7 @@ parse_and_eval_type (char *p, int length
 {
   char *tmp = (char *) alloca (length + 4);
   struct expression *expr;
+
   tmp[0] = '(';
   memcpy (tmp + 1, p, length);
   tmp[length + 1] = ')';
Index: event-loop.c
===================================================================
RCS file: /cvs/src/src/gdb/event-loop.c,v
retrieving revision 1.43
diff -u -p -r1.43 event-loop.c
--- event-loop.c	3 May 2010 20:58:21 -0000	1.43
+++ event-loop.c	14 May 2010 18:34:34 -0000
@@ -858,8 +858,8 @@ gdb_wait_for_event (int block)
   else
     {
       struct timeval select_timeout;
-
       struct timeval *timeout_p;
+
       if (block)
 	timeout_p = gdb_notifier.timeout_valid
 	  ? &gdb_notifier.select_timeout : NULL;
Index: event-top.c
===================================================================
RCS file: /cvs/src/src/gdb/event-top.c,v
retrieving revision 1.70
diff -u -p -r1.70 event-top.c
--- event-top.c	1 Jan 2010 07:31:31 -0000	1.70
+++ event-top.c	14 May 2010 18:34:34 -0000
@@ -504,6 +504,7 @@ command_handler (char *command)
     {
 #ifdef HAVE_SBRK
       char *lim = (char *) sbrk (0);
+
       space_at_cmd_start = lim - lim_at_start;
 #endif
     }
@@ -556,7 +557,6 @@ command_line_handler (char *rl)
   char *nline;
   char got_eof = 0;
 
-
   int repeat = (instream == stdin);
 
   if (annotation_level > 1 && instream == stdin)
@@ -990,6 +990,7 @@ static void
 async_stop_sig (gdb_client_data arg)
 {
   char *prompt = get_prompt ();
+
 #if STOP_SIGNAL == SIGTSTP
   signal (SIGTSTP, SIG_DFL);
 #if HAVE_SIGPROCMASK
Index: exceptions.c
===================================================================
RCS file: /cvs/src/src/gdb/exceptions.c,v
retrieving revision 1.37
diff -u -p -r1.37 exceptions.c
--- exceptions.c	2 May 2010 23:52:14 -0000	1.37
+++ exceptions.c	14 May 2010 18:34:34 -0000
@@ -104,6 +104,7 @@ static void
 catcher_pop (void)
 {
   struct catcher *old_catcher = current_catcher;
+
   current_catcher = old_catcher->prev;
 
   /* Restore the cleanup chain, the error/quit messages, and the uiout
@@ -174,6 +175,7 @@ exceptions_state_mc (enum catcher_action
 	case CATCH_ITER:
 	  {
 	    struct gdb_exception exception = *current_catcher->exception;
+
 	    if (current_catcher->mask & RETURN_MASK (exception.reason))
 	      {
 		/* Exit normally if this catcher can handle this
@@ -243,6 +245,7 @@ void
 deprecated_throw_reason (enum return_reason reason)
 {
   struct gdb_exception exception;
+
   memset (&exception, 0, sizeof exception);
 
   exception.reason = reason;
@@ -299,6 +302,7 @@ print_exception (struct ui_file *file, s
      as that way the MI's behavior is preserved.  */
   const char *start;
   const char *end;
+
   for (start = e.message; start != NULL; start = end)
     {
       end = strchr (start, '\n');
@@ -412,6 +416,7 @@ void
 throw_error (enum errors error, const char *fmt, ...)
 {
   va_list args;
+
   va_start (args, fmt);
   throw_it (RETURN_ERROR, error, fmt, args);
   va_end (args);
@@ -457,6 +462,7 @@ catch_exception (struct ui_out *uiout,
 		 return_mask mask)
 {
   volatile struct gdb_exception exception;
+
   TRY_CATCH (exception, mask)
     {
       (*func) (uiout, func_args);
@@ -473,6 +479,7 @@ catch_exceptions_with_msg (struct ui_out
 {
   volatile struct gdb_exception exception;
   volatile int val = 0;
+
   TRY_CATCH (exception, mask)
     {
       val = (*func) (uiout, func_args);
@@ -505,6 +512,7 @@ catch_errors (catch_errors_ftype *func, 
 {
   volatile int val = 0;
   volatile struct gdb_exception exception;
+
   TRY_CATCH (exception, mask)
     {
       val = func (func_args);
@@ -520,6 +528,7 @@ catch_command_errors (catch_command_erro
 		      char *arg, int from_tty, return_mask mask)
 {
   volatile struct gdb_exception e;
+
   TRY_CATCH (e, mask)
     {
       command (arg, from_tty);
Index: exec.c
===================================================================
RCS file: /cvs/src/src/gdb/exec.c,v
retrieving revision 1.98
diff -u -p -r1.98 exec.c
--- exec.c	4 May 2010 08:47:13 -0000	1.98
+++ exec.c	14 May 2010 18:34:34 -0000
@@ -224,6 +224,7 @@ exec_file_attach (char *filename, int fr
       if (scratch_chan < 0)
 	{
 	  char *exename = alloca (strlen (filename) + 5);
+
 	  strcat (strcpy (exename, filename), ".exe");
 	  scratch_chan = openp (getenv ("PATH"), OPF_TRY_CWD_FIRST, exename,
 	     write_files ? O_RDWR | O_BINARY : O_RDONLY | O_BINARY,
@@ -458,6 +459,7 @@ add_target_sections (struct target_secti
   if (count > 0)
     {
       int space = resize_section_table (table, count);
+
       memcpy (table->sections + space,
 	      sections, count * sizeof (sections[0]));
 
@@ -477,7 +479,6 @@ void
 remove_target_sections (bfd *abfd)
 {
   struct target_section *src, *dest;
-
   struct target_section_table *table = current_target_sections;
 
   dest = table->sections;
Index: expprint.c
===================================================================
RCS file: /cvs/src/src/gdb/expprint.c,v
retrieving revision 1.43
diff -u -p -r1.43 expprint.c
--- expprint.c	7 May 2010 14:46:26 -0000	1.43
+++ expprint.c	14 May 2010 18:34:34 -0000
@@ -42,6 +42,7 @@ void
 print_expression (struct expression *exp, struct ui_file *stream)
 {
   int pc = 0;
+
   print_subexp (exp, &pc, stream, PREC_NULL);
 }
 
@@ -96,6 +97,7 @@ print_subexp_standard (struct expression
     case OP_LONG:
       {
 	struct value_print_options opts;
+
 	get_raw_print_options (&opts);
 	(*pos) += 3;
 	value_print (value_from_longest (exp->elts[pc + 1].type,
@@ -107,6 +109,7 @@ print_subexp_standard (struct expression
     case OP_DOUBLE:
       {
 	struct value_print_options opts;
+
 	get_raw_print_options (&opts);
 	(*pos) += 3;
 	value_print (value_from_double (exp->elts[pc + 1].type,
@@ -118,6 +121,7 @@ print_subexp_standard (struct expression
     case OP_VAR_VALUE:
       {
 	struct block *b;
+
 	(*pos) += 3;
 	b = exp->elts[pc + 1].block;
 	if (b != NULL
@@ -140,6 +144,7 @@ print_subexp_standard (struct expression
     case OP_REGISTER:
       {
 	const char *name = &exp->elts[pc + 2].string;
+
 	(*pos) += 3 + BYTES_TO_EXP_ELEM (exp->elts[pc + 1].longconst + 1);
 	fprintf_filtered (stream, "$%s", name);
 	return;
@@ -181,6 +186,7 @@ print_subexp_standard (struct expression
     case OP_STRING:
       {
 	struct value_print_options opts;
+
 	nargs = longest_to_int (exp->elts[pc + 1].longconst);
 	(*pos) += 3 + BYTES_TO_EXP_ELEM (nargs + 1);
 	/* LA_PRINT_STRING will print using the current repeat count threshold.
@@ -202,6 +208,7 @@ print_subexp_standard (struct expression
     case OP_OBJC_NSSTRING:	/* Objective-C Foundation Class NSString constant.  */
       {
 	struct value_print_options opts;
+
 	nargs = longest_to_int (exp->elts[pc + 1].longconst);
 	(*pos) += 3 + BYTES_TO_EXP_ELEM (nargs + 1);
 	fputs_filtered ("@\"", stream);
@@ -215,6 +222,7 @@ print_subexp_standard (struct expression
     case OP_OBJC_MSGCALL:
       {			/* Objective C message (method) call.  */
 	char *selector;
+
 	(*pos) += 3;
 	nargs = longest_to_int (exp->elts[pc + 2].longconst);
 	fprintf_unfiltered (stream, "[");
@@ -228,6 +236,7 @@ print_subexp_standard (struct expression
 	if (nargs)
 	  {
 	    char *s, *nextS;
+
 	    s = alloca (strlen (selector) + 1);
 	    strcpy (s, selector);
 	    for (tem = 0; tem < nargs; tem++)
@@ -291,6 +300,7 @@ print_subexp_standard (struct expression
       if (tem > 0)
 	{
 	  struct value_print_options opts;
+
 	  get_user_print_options (&opts);
 	  LA_PRINT_STRING (stream, builtin_type (exp->gdbarch)->builtin_char,
 			   tempstr, nargs - 1, NULL, 0, &opts);

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