gdb: fix some indentation issues
authorSimon Marchi <simon.marchi@polymtl.ca>
Thu, 27 May 2021 19:01:28 +0000 (15:01 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Thu, 27 May 2021 19:01:28 +0000 (15:01 -0400)
I wrote a small script to spot a pattern of indentation mistakes I saw
happened in breakpoint.c.  And while at it I ran it on all files and
fixed what I found.  No behavior changes intended, just indentation and
addition / removal of curly braces.

gdb/ChangeLog:

* Fix some indentation mistakes throughout.

gdbserver/ChangeLog:

* Fix some indentation mistakes throughout.

Change-Id: Ia01990c26c38e83a243d8f33da1d494f16315c6e

29 files changed:
gdb/ChangeLog
gdb/aarch64-tdep.c
gdb/aix-thread.c
gdb/arm-fbsd-tdep.c
gdb/arm-tdep.c
gdb/breakpoint.c
gdb/ctfread.c
gdb/gdbtypes.c
gdb/go32-nat.c
gdb/guile/scm-pretty-print.c
gdb/hppa-linux-tdep.c
gdb/i386-tdep.c
gdb/mi/mi-symbol-cmds.c
gdb/nat/aarch64-sve-linux-ptrace.c
gdb/nios2-tdep.c
gdb/ppc-sysv-tdep.c
gdb/python/py-framefilter.c
gdb/python/py-prettyprint.c
gdb/rs6000-tdep.c
gdb/s390-tdep.c
gdb/stack.c
gdb/symtab.c
gdb/target-float.c
gdb/tracepoint.c
gdb/v850-tdep.c
gdb/windows-tdep.c
gdb/xcoffread.c
gdbserver/ChangeLog
gdbserver/linux-s390-low.cc

index 66a16df8c9523ead5ed27298c171ee348ecf8821..fa3940c2c0d7f1e0fda9c0eabc31c99549fdd0ea 100644 (file)
@@ -1,3 +1,7 @@
+2021-05-27  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * Fix some indentation mistakes throughout.
+
 2021-05-27  Simon Marchi  <simon.marchi@polymtl.ca>
 
        * breakpoint.h (iterate_over_bp_locations): Remove.  Update
index 44833eb94d3387784942614c1b7bedac28161c52..202b02108744b13fb93fb46441941740be35fc1f 100644 (file)
@@ -3663,11 +3663,11 @@ When on, AArch64 specific debugging is enabled."),
          { \
            unsigned int mem_len = LENGTH; \
            if (mem_len) \
-           { \
-             MEMS =  XNEWVEC (struct aarch64_mem_r, mem_len);  \
-             memcpy(&MEMS->len, &RECORD_BUF[0], \
-                    sizeof(struct aarch64_mem_r) * LENGTH); \
-           } \
+             { \
+               MEMS =  XNEWVEC (struct aarch64_mem_r, mem_len);  \
+               memcpy(&MEMS->len, &RECORD_BUF[0], \
+                      sizeof(struct aarch64_mem_r) * LENGTH); \
+             } \
          } \
          while (0)
 
index 889cb65fdcdb84af5da9e600f5218e18f4500c05..d4147466c00763237112566fc159d3fb72bd97a4 100644 (file)
@@ -707,14 +707,14 @@ get_signaled_thread (void)
   tid_t ktid = 0;
 
   while (1)
-  {
-    if (getthrds (inferior_ptid.pid (), &thrinf, 
-                 sizeof (thrinf), &ktid, 1) != 1)
-      break;
+    {
+      if (getthrds (inferior_ptid.pid (), &thrinf,
+                   sizeof (thrinf), &ktid, 1) != 1)
+       break;
 
-    if (thrinf.ti_cursig == SIGTRAP)
-      return thrinf.ti_tid;
-  }
+      if (thrinf.ti_cursig == SIGTRAP)
+       return thrinf.ti_tid;
+    }
 
   /* Didn't find any thread stopped on a SIGTRAP signal.  */
   return 0;
index 508e36360df89953962140a9d7744ab36c899bac..3a179184550d18f3bbdc1f7b18c4efc4808fa5b3 100644 (file)
@@ -187,10 +187,10 @@ arm_fbsd_read_description_auxv (struct target_ops *target)
       if (arm_hwcap & HWCAP_NEON)
        return aarch32_read_description ();
       else if ((arm_hwcap & (HWCAP_VFPv3 | HWCAP_VFPD32))
-         == (HWCAP_VFPv3 | HWCAP_VFPD32))
+              == (HWCAP_VFPv3 | HWCAP_VFPD32))
        return arm_read_description (ARM_FP_TYPE_VFPV3);
       else
-      return arm_read_description (ARM_FP_TYPE_VFPV2);
+       return arm_read_description (ARM_FP_TYPE_VFPV2);
     }
 
   return nullptr;
index 7f56d00f55674a94392f8e17b52710a0a8b04208..f8da6388047c527ccbabfc7488f397d11a481d5d 100644 (file)
@@ -9697,11 +9697,11 @@ vfp - VFP co-processor."),
          { \
            unsigned int mem_len = LENGTH; \
            if (mem_len) \
-           { \
-             MEMS =  XNEWVEC (struct arm_mem_r, mem_len);  \
-             memcpy(&MEMS->len, &RECORD_BUF[0], \
-                    sizeof(struct arm_mem_r) * LENGTH); \
-           } \
+             { \
+               MEMS =  XNEWVEC (struct arm_mem_r, mem_len);  \
+               memcpy(&MEMS->len, &RECORD_BUF[0], \
+                      sizeof(struct arm_mem_r) * LENGTH); \
+             } \
          } \
          while (0)
 
@@ -9997,19 +9997,19 @@ arm_record_extension_space (insn_decode_record *arm_insn_r)
     {
       /* Handle MLA(S) and MUL(S).  */
       if (in_inclusive_range (insn_op1, 0U, 3U))
-      {
-       record_buf[0] = bits (arm_insn_r->arm_insn, 12, 15);
-       record_buf[1] = ARM_PS_REGNUM;
-       arm_insn_r->reg_rec_count = 2;
-      }
+       {
+         record_buf[0] = bits (arm_insn_r->arm_insn, 12, 15);
+         record_buf[1] = ARM_PS_REGNUM;
+         arm_insn_r->reg_rec_count = 2;
+       }
       else if (in_inclusive_range (insn_op1, 4U, 15U))
-      {
-       /* Handle SMLAL(S), SMULL(S), UMLAL(S), UMULL(S).  */
-       record_buf[0] = bits (arm_insn_r->arm_insn, 16, 19);
-       record_buf[1] = bits (arm_insn_r->arm_insn, 12, 15);
-       record_buf[2] = ARM_PS_REGNUM;
-       arm_insn_r->reg_rec_count = 3;
-      }
+       {
+         /* Handle SMLAL(S), SMULL(S), UMLAL(S), UMULL(S).  */
+         record_buf[0] = bits (arm_insn_r->arm_insn, 16, 19);
+         record_buf[1] = bits (arm_insn_r->arm_insn, 12, 15);
+         record_buf[2] = ARM_PS_REGNUM;
+         arm_insn_r->reg_rec_count = 3;
+       }
     }
 
   opcode1 = bits (arm_insn_r->arm_insn, 26, 27);
@@ -11100,10 +11100,10 @@ arm_record_b_bl (insn_decode_record *arm_insn_r)
   /* Note: BLX(1) doesnt fall here but instead it falls into
      extension space.  */
   if (bit (arm_insn_r->arm_insn, 24))
-  {
-    record_buf[0] = ARM_LR_REGNUM;
-    arm_insn_r->reg_rec_count = 1;
-  }
+    {
+      record_buf[0] = ARM_LR_REGNUM;
+      arm_insn_r->reg_rec_count = 1;
+    }
 
   REG_ALLOC (arm_insn_r->arm_regs, arm_insn_r->reg_rec_count, record_buf);
 
index 4d5c0dd5982017755298b798402d81b05e35868e..fd98ded8e7575b9523274cc2b96e005d3c6dfbd8 100644 (file)
@@ -1605,28 +1605,29 @@ breakpoint_xfer_memory (gdb_byte *readbuf, gdb_byte *writebuf,
   /* Now do full processing of the found relevant range of elements.  */
 
   for (bc = bc_l; bc < bp_locations.size (); bc++)
-  {
-    struct bp_location *bl = bp_locations[bc];
+    {
+      struct bp_location *bl = bp_locations[bc];
 
-    /* bp_location array has BL->OWNER always non-NULL.  */
-    if (bl->owner->type == bp_none)
-      warning (_("reading through apparently deleted breakpoint #%d?"),
-              bl->owner->number);
+      /* bp_location array has BL->OWNER always non-NULL.  */
+      if (bl->owner->type == bp_none)
+       warning (_("reading through apparently deleted breakpoint #%d?"),
+                bl->owner->number);
 
-    /* Performance optimization: any further element can no longer affect BUF
-       content.  */
+      /* Performance optimization: any further element can no longer affect BUF
+        content.  */
 
-    if (bl->address >= bp_locations_placed_address_before_address_max
-       && memaddr + len <= (bl->address
-                            - bp_locations_placed_address_before_address_max))
-      break;
+      if (bl->address >= bp_locations_placed_address_before_address_max
+         && (memaddr + len
+             <= (bl->address
+                 - bp_locations_placed_address_before_address_max)))
+       break;
 
-    if (!bp_location_has_shadow (bl))
-      continue;
+      if (!bp_location_has_shadow (bl))
+       continue;
 
-    one_breakpoint_xfer_memory (readbuf, writebuf, writebuf_org,
-                               memaddr, len, &bl->target_info, bl->gdbarch);
-  }
+      one_breakpoint_xfer_memory (readbuf, writebuf, writebuf_org,
+                                 memaddr, len, &bl->target_info, bl->gdbarch);
+    }
 }
 
 /* See breakpoint.h.  */
@@ -3079,10 +3080,9 @@ remove_breakpoints (void)
   int val = 0;
 
   for (bp_location *bl : all_bp_locations ())
-  {
     if (bl->inserted && !is_tracepoint (bl->owner))
       val |= remove_breakpoint (bl);
-  }
+
   return val;
 }
 
@@ -3116,17 +3116,17 @@ remove_breakpoints_inf (inferior *inf)
   int val;
 
   for (bp_location *bl : all_bp_locations ())
-  {
-    if (bl->pspace != inf->pspace)
-      continue;
+    {
+      if (bl->pspace != inf->pspace)
+       continue;
 
-    if (bl->inserted && !bl->target_info.persist)
-      {
-       val = remove_breakpoint (bl);
-       if (val != 0)
-         return;
-      }
-  }
+      if (bl->inserted && !bl->target_info.persist)
+       {
+         val = remove_breakpoint (bl);
+         if (val != 0)
+           return;
+       }
+    }
 }
 
 static int internal_breakpoint_number = -1;
@@ -3612,107 +3612,107 @@ update_breakpoints_after_exec (void)
       gdb_assert (!bploc->inserted);
 
   for (breakpoint *b : all_breakpoints_safe ())
-  {
-    if (b->pspace != current_program_space)
-      continue;
-
-    /* Solib breakpoints must be explicitly reset after an exec().  */
-    if (b->type == bp_shlib_event)
-      {
-       delete_breakpoint (b);
+    {
+      if (b->pspace != current_program_space)
        continue;
-      }
 
-    /* JIT breakpoints must be explicitly reset after an exec().  */
-    if (b->type == bp_jit_event)
-      {
-       delete_breakpoint (b);
-       continue;
-      }
+      /* Solib breakpoints must be explicitly reset after an exec().  */
+      if (b->type == bp_shlib_event)
+       {
+         delete_breakpoint (b);
+         continue;
+       }
 
-    /* Thread event breakpoints must be set anew after an exec(),
-       as must overlay event and longjmp master breakpoints.  */
-    if (b->type == bp_thread_event || b->type == bp_overlay_event
-       || b->type == bp_longjmp_master || b->type == bp_std_terminate_master
-       || b->type == bp_exception_master)
-      {
-       delete_breakpoint (b);
-       continue;
-      }
+      /* JIT breakpoints must be explicitly reset after an exec().  */
+      if (b->type == bp_jit_event)
+       {
+         delete_breakpoint (b);
+         continue;
+       }
 
-    /* Step-resume breakpoints are meaningless after an exec().  */
-    if (b->type == bp_step_resume || b->type == bp_hp_step_resume)
-      {
-       delete_breakpoint (b);
-       continue;
-      }
+      /* Thread event breakpoints must be set anew after an exec(),
+        as must overlay event and longjmp master breakpoints.  */
+      if (b->type == bp_thread_event || b->type == bp_overlay_event
+         || b->type == bp_longjmp_master || b->type == bp_std_terminate_master
+         || b->type == bp_exception_master)
+       {
+         delete_breakpoint (b);
+         continue;
+       }
 
-    /* Just like single-step breakpoints.  */
-    if (b->type == bp_single_step)
-      {
-       delete_breakpoint (b);
-       continue;
-      }
+      /* Step-resume breakpoints are meaningless after an exec().  */
+      if (b->type == bp_step_resume || b->type == bp_hp_step_resume)
+       {
+         delete_breakpoint (b);
+         continue;
+       }
 
-    /* Longjmp and longjmp-resume breakpoints are also meaningless
-       after an exec.  */
-    if (b->type == bp_longjmp || b->type == bp_longjmp_resume
-       || b->type == bp_longjmp_call_dummy
-       || b->type == bp_exception || b->type == bp_exception_resume)
-      {
-       delete_breakpoint (b);
-       continue;
-      }
+      /* Just like single-step breakpoints.  */
+      if (b->type == bp_single_step)
+       {
+         delete_breakpoint (b);
+         continue;
+       }
 
-    if (b->type == bp_catchpoint)
-      {
-       /* For now, none of the bp_catchpoint breakpoints need to
-          do anything at this point.  In the future, if some of
-          the catchpoints need to something, we will need to add
-          a new method, and call this method from here.  */
-       continue;
-      }
+      /* Longjmp and longjmp-resume breakpoints are also meaningless
+        after an exec.  */
+      if (b->type == bp_longjmp || b->type == bp_longjmp_resume
+         || b->type == bp_longjmp_call_dummy
+         || b->type == bp_exception || b->type == bp_exception_resume)
+       {
+         delete_breakpoint (b);
+         continue;
+       }
 
-    /* bp_finish is a special case.  The only way we ought to be able
-       to see one of these when an exec() has happened, is if the user
-       caught a vfork, and then said "finish".  Ordinarily a finish just
-       carries them to the call-site of the current callee, by setting
-       a temporary bp there and resuming.  But in this case, the finish
-       will carry them entirely through the vfork & exec.
-
-       We don't want to allow a bp_finish to remain inserted now.  But
-       we can't safely delete it, 'cause finish_command has a handle to
-       the bp on a bpstat, and will later want to delete it.  There's a
-       chance (and I've seen it happen) that if we delete the bp_finish
-       here, that its storage will get reused by the time finish_command
-       gets 'round to deleting the "use to be a bp_finish" breakpoint.
-       We really must allow finish_command to delete a bp_finish.
-
-       In the absence of a general solution for the "how do we know
-       it's safe to delete something others may have handles to?"
-       problem, what we'll do here is just uninsert the bp_finish, and
-       let finish_command delete it.
-
-       (We know the bp_finish is "doomed" in the sense that it's
-       momentary, and will be deleted as soon as finish_command sees
-       the inferior stopped.  So it doesn't matter that the bp's
-       address is probably bogus in the new a.out, unlike e.g., the
-       solib breakpoints.)  */
-
-    if (b->type == bp_finish)
-      {
-       continue;
-      }
+      if (b->type == bp_catchpoint)
+       {
+         /* For now, none of the bp_catchpoint breakpoints need to
+            do anything at this point.  In the future, if some of
+            the catchpoints need to something, we will need to add
+            a new method, and call this method from here.  */
+         continue;
+       }
 
-    /* Without a symbolic address, we have little hope of the
-       pre-exec() address meaning the same thing in the post-exec()
-       a.out.  */
-    if (breakpoint_event_location_empty_p (b))
-      {
-       delete_breakpoint (b);
-       continue;
-      }
-  }
+      /* bp_finish is a special case.  The only way we ought to be able
+        to see one of these when an exec() has happened, is if the user
+        caught a vfork, and then said "finish".  Ordinarily a finish just
+        carries them to the call-site of the current callee, by setting
+        a temporary bp there and resuming.  But in this case, the finish
+        will carry them entirely through the vfork & exec.
+
+        We don't want to allow a bp_finish to remain inserted now.  But
+        we can't safely delete it, 'cause finish_command has a handle to
+        the bp on a bpstat, and will later want to delete it.  There's a
+        chance (and I've seen it happen) that if we delete the bp_finish
+        here, that its storage will get reused by the time finish_command
+        gets 'round to deleting the "use to be a bp_finish" breakpoint.
+        We really must allow finish_command to delete a bp_finish.
+
+        In the absence of a general solution for the "how do we know
+        it's safe to delete something others may have handles to?"
+        problem, what we'll do here is just uninsert the bp_finish, and
+        let finish_command delete it.
+
+        (We know the bp_finish is "doomed" in the sense that it's
+        momentary, and will be deleted as soon as finish_command sees
+        the inferior stopped.  So it doesn't matter that the bp's
+        address is probably bogus in the new a.out, unlike e.g., the
+        solib breakpoints.)  */
+
+      if (b->type == bp_finish)
+       {
+         continue;
+       }
+
+      /* Without a symbolic address, we have little hope of the
+        pre-exec() address meaning the same thing in the post-exec()
+        a.out.  */
+      if (breakpoint_event_location_empty_p (b))
+       {
+         delete_breakpoint (b);
+         continue;
+       }
+    }
 }
 
 int
@@ -3728,22 +3728,22 @@ detach_breakpoints (ptid_t ptid)
   /* Set inferior_ptid; remove_breakpoint_1 uses this global.  */
   inferior_ptid = ptid;
   for (bp_location *bl : all_bp_locations ())
-  {
-    if (bl->pspace != inf->pspace)
-      continue;
-
-    /* This function must physically remove breakpoints locations
-       from the specified ptid, without modifying the breakpoint
-       package's state.  Locations of type bp_loc_other are only
-       maintained at GDB side.  So, there is no need to remove
-       these bp_loc_other locations.  Moreover, removing these
-       would modify the breakpoint package's state.  */
-    if (bl->loc_type == bp_loc_other)
-      continue;
-
-    if (bl->inserted)
-      val |= remove_breakpoint_1 (bl, DETACH_BREAKPOINT);
-  }
+    {
+      if (bl->pspace != inf->pspace)
+       continue;
+
+      /* This function must physically remove breakpoints locations
+        from the specified ptid, without modifying the breakpoint
+        package's state.  Locations of type bp_loc_other are only
+        maintained at GDB side.  So, there is no need to remove
+        these bp_loc_other locations.  Moreover, removing these
+        would modify the breakpoint package's state.  */
+      if (bl->loc_type == bp_loc_other)
+       continue;
+
+      if (bl->inserted)
+       val |= remove_breakpoint_1 (bl, DETACH_BREAKPOINT);
+    }
 
   return val;
 }
@@ -3952,83 +3952,83 @@ breakpoint_init_inferior (enum inf_context context)
   mark_breakpoints_out ();
 
   for (breakpoint *b : all_breakpoints_safe ())
-  {
-    if (b->loc && b->loc->pspace != pspace)
-      continue;
+    {
+      if (b->loc && b->loc->pspace != pspace)
+       continue;
 
-    switch (b->type)
-      {
-      case bp_call_dummy:
-      case bp_longjmp_call_dummy:
+      switch (b->type)
+       {
+       case bp_call_dummy:
+       case bp_longjmp_call_dummy:
 
-       /* If the call dummy breakpoint is at the entry point it will
-          cause problems when the inferior is rerun, so we better get
-          rid of it.  */
+         /* If the call dummy breakpoint is at the entry point it will
+            cause problems when the inferior is rerun, so we better get
+            rid of it.  */
 
-      case bp_watchpoint_scope:
+       case bp_watchpoint_scope:
 
-       /* Also get rid of scope breakpoints.  */
+         /* Also get rid of scope breakpoints.  */
 
-      case bp_shlib_event:
+       case bp_shlib_event:
 
-       /* Also remove solib event breakpoints.  Their addresses may
-          have changed since the last time we ran the program.
-          Actually we may now be debugging against different target;
-          and so the solib backend that installed this breakpoint may
-          not be used in by the target.  E.g.,
+         /* Also remove solib event breakpoints.  Their addresses may
+            have changed since the last time we ran the program.
+            Actually we may now be debugging against different target;
+            and so the solib backend that installed this breakpoint may
+            not be used in by the target.  E.g.,
 
-          (gdb) file prog-linux
-          (gdb) run               # native linux target
-          ...
-          (gdb) kill
-          (gdb) file prog-win.exe
-          (gdb) tar rem :9999     # remote Windows gdbserver.
-       */
+            (gdb) file prog-linux
+            (gdb) run               # native linux target
+            ...
+            (gdb) kill
+            (gdb) file prog-win.exe
+            (gdb) tar rem :9999     # remote Windows gdbserver.
+         */
 
-      case bp_step_resume:
+       case bp_step_resume:
 
-       /* Also remove step-resume breakpoints.  */
+         /* Also remove step-resume breakpoints.  */
 
-      case bp_single_step:
+       case bp_single_step:
 
-       /* Also remove single-step breakpoints.  */
+         /* Also remove single-step breakpoints.  */
 
-       delete_breakpoint (b);
-       break;
+         delete_breakpoint (b);
+         break;
 
-      case bp_watchpoint:
-      case bp_hardware_watchpoint:
-      case bp_read_watchpoint:
-      case bp_access_watchpoint:
-       {
-         struct watchpoint *w = (struct watchpoint *) b;
+       case bp_watchpoint:
+       case bp_hardware_watchpoint:
+       case bp_read_watchpoint:
+       case bp_access_watchpoint:
+         {
+           struct watchpoint *w = (struct watchpoint *) b;
 
-         /* Likewise for watchpoints on local expressions.  */
-         if (w->exp_valid_block != NULL)
-           delete_breakpoint (b);
-         else
-           {
-             /* Get rid of existing locations, which are no longer
-                valid.  New ones will be created in
-                update_watchpoint, when the inferior is restarted.
-                The next update_global_location_list call will
-                garbage collect them.  */
-             b->loc = NULL;
-
-             if (context == inf_starting)
-               {
-                 /* Reset val field to force reread of starting value in
-                    insert_breakpoints.  */
-                 w->val.reset (nullptr);
-                 w->val_valid = false;
-               }
-           }
+           /* Likewise for watchpoints on local expressions.  */
+           if (w->exp_valid_block != NULL)
+             delete_breakpoint (b);
+           else
+             {
+               /* Get rid of existing locations, which are no longer
+                  valid.  New ones will be created in
+                  update_watchpoint, when the inferior is restarted.
+                  The next update_global_location_list call will
+                  garbage collect them.  */
+               b->loc = NULL;
+
+               if (context == inf_starting)
+                 {
+                   /* Reset val field to force reread of starting value in
+                      insert_breakpoints.  */
+                   w->val.reset (nullptr);
+                   w->val_valid = false;
+                 }
+             }
+         }
+         break;
+       default:
+         break;
        }
-       break;
-      default:
-       break;
-      }
-  }
+    }
 
   /* Get rid of the moribund locations.  */
   for (bp_location *bl : moribund_locations)
@@ -7394,11 +7394,11 @@ enable_overlay_breakpoints (void)
 {
   for (breakpoint *b : all_breakpoints ())
     if (b->type == bp_overlay_event)
-    {
-      b->enable_state = bp_enabled;
-      update_global_location_list (UGLL_MAY_INSERT);
-      overlay_events_enabled = 1;
-    }
+      {
+       b->enable_state = bp_enabled;
+       update_global_location_list (UGLL_MAY_INSERT);
+       overlay_events_enabled = 1;
+      }
 }
 
 void
@@ -7406,11 +7406,11 @@ disable_overlay_breakpoints (void)
 {
   for (breakpoint *b : all_breakpoints ())
     if (b->type == bp_overlay_event)
-    {
-      b->enable_state = bp_disabled;
-      update_global_location_list (UGLL_DONT_INSERT);
-      overlay_events_enabled = 0;
-    }
+      {
+       b->enable_state = bp_disabled;
+       update_global_location_list (UGLL_DONT_INSERT);
+       overlay_events_enabled = 0;
+      }
 }
 
 /* Set an active std::terminate breakpoint for each std::terminate
@@ -7546,27 +7546,27 @@ void
 disable_breakpoints_in_shlibs (void)
 {
   for (bp_location *loc : all_bp_locations ())
-  {
-    /* ALL_BP_LOCATIONS bp_location has LOC->OWNER always non-NULL.  */
-    struct breakpoint *b = loc->owner;
-
-    /* We apply the check to all breakpoints, including disabled for
-       those with loc->duplicate set.  This is so that when breakpoint
-       becomes enabled, or the duplicate is removed, gdb will try to
-       insert all breakpoints.  If we don't set shlib_disabled here,
-       we'll try to insert those breakpoints and fail.  */
-    if (((b->type == bp_breakpoint)
-        || (b->type == bp_jit_event)
-        || (b->type == bp_hardware_breakpoint)
-        || (is_tracepoint (b)))
-       && loc->pspace == current_program_space
-       && !loc->shlib_disabled
-       && solib_name_from_address (loc->pspace, loc->address)
-       )
-      {
-       loc->shlib_disabled = 1;
-      }
-  }
+    {
+      /* ALL_BP_LOCATIONS bp_location has LOC->OWNER always non-NULL.  */
+      struct breakpoint *b = loc->owner;
+
+      /* We apply the check to all breakpoints, including disabled for
+        those with loc->duplicate set.  This is so that when breakpoint
+        becomes enabled, or the duplicate is removed, gdb will try to
+        insert all breakpoints.  If we don't set shlib_disabled here,
+        we'll try to insert those breakpoints and fail.  */
+      if (((b->type == bp_breakpoint)
+          || (b->type == bp_jit_event)
+          || (b->type == bp_hardware_breakpoint)
+          || (is_tracepoint (b)))
+         && loc->pspace == current_program_space
+         && !loc->shlib_disabled
+         && solib_name_from_address (loc->pspace, loc->address)
+         )
+       {
+         loc->shlib_disabled = 1;
+       }
+    }
 }
 
 /* Disable any breakpoints and tracepoints that are in SOLIB upon
@@ -7579,39 +7579,39 @@ disable_breakpoints_in_unloaded_shlib (struct so_list *solib)
   int disabled_shlib_breaks = 0;
 
   for (bp_location *loc : all_bp_locations ())
-  {
-    /* ALL_BP_LOCATIONS bp_location has LOC->OWNER always non-NULL.  */
-    struct breakpoint *b = loc->owner;
-
-    if (solib->pspace == loc->pspace
-       && !loc->shlib_disabled
-       && (((b->type == bp_breakpoint
-             || b->type == bp_jit_event
-             || b->type == bp_hardware_breakpoint)
-            && (loc->loc_type == bp_loc_hardware_breakpoint
-                || loc->loc_type == bp_loc_software_breakpoint))
-           || is_tracepoint (b))
-       && solib_contains_address_p (solib, loc->address))
-      {
-       loc->shlib_disabled = 1;
-       /* At this point, we cannot rely on remove_breakpoint
-          succeeding so we must mark the breakpoint as not inserted
-          to prevent future errors occurring in remove_breakpoints.  */
-       loc->inserted = 0;
-
-       /* This may cause duplicate notifications for the same breakpoint.  */
-       gdb::observers::breakpoint_modified.notify (b);
-
-       if (!disabled_shlib_breaks)
-         {
-           target_terminal::ours_for_output ();
-           warning (_("Temporarily disabling breakpoints "
-                      "for unloaded shared library \"%s\""),
-                    solib->so_name);
-         }
-       disabled_shlib_breaks = 1;
-      }
-  }
+    {
+      /* ALL_BP_LOCATIONS bp_location has LOC->OWNER always non-NULL.  */
+      struct breakpoint *b = loc->owner;
+
+      if (solib->pspace == loc->pspace
+         && !loc->shlib_disabled
+         && (((b->type == bp_breakpoint
+               || b->type == bp_jit_event
+               || b->type == bp_hardware_breakpoint)
+              && (loc->loc_type == bp_loc_hardware_breakpoint
+                  || loc->loc_type == bp_loc_software_breakpoint))
+             || is_tracepoint (b))
+         && solib_contains_address_p (solib, loc->address))
+       {
+         loc->shlib_disabled = 1;
+         /* At this point, we cannot rely on remove_breakpoint
+            succeeding so we must mark the breakpoint as not inserted
+            to prevent future errors occurring in remove_breakpoints.  */
+         loc->inserted = 0;
+
+         /* This may cause duplicate notifications for the same breakpoint.  */
+         gdb::observers::breakpoint_modified.notify (b);
+
+         if (!disabled_shlib_breaks)
+           {
+             target_terminal::ours_for_output ();
+             warning (_("Temporarily disabling breakpoints "
+                        "for unloaded shared library \"%s\""),
+                      solib->so_name);
+           }
+         disabled_shlib_breaks = 1;
+       }
+    }
 }
 
 /* Disable any breakpoints and tracepoints in OBJFILE upon
@@ -7975,22 +7975,22 @@ breakpoint_hit_catch_solib (const struct bp_location *bl,
     return 1;
 
   for (breakpoint *other : all_breakpoints ())
-  {
-    if (other == bl->owner)
-      continue;
+    {
+      if (other == bl->owner)
+       continue;
 
-    if (other->type != bp_shlib_event)
-      continue;
+      if (other->type != bp_shlib_event)
+       continue;
 
-    if (self->pspace != NULL && other->pspace != self->pspace)
-      continue;
+      if (self->pspace != NULL && other->pspace != self->pspace)
+       continue;
 
-    for (bp_location *other_bl : other->locations ())
-      {
-       if (other->ops->breakpoint_hit (other_bl, aspace, bp_addr, ws))
-         return 1;
-      }
-  }
+      for (bp_location *other_bl : other->locations ())
+       {
+         if (other->ops->breakpoint_hit (other_bl, aspace, bp_addr, ws))
+           return 1;
+       }
+    }
 
   return 0;
 }
@@ -13174,10 +13174,10 @@ delete_breakpoint (struct breakpoint *bpt)
 
   for (breakpoint *b : all_breakpoints ())
     if (b->next == bpt)
-    {
-      b->next = bpt->next;
-      break;
-    }
+      {
+       b->next = bpt->next;
+       break;
+      }
 
   /* Be sure no bpstat's are pointing at the breakpoint after it's
      been freed.  */
@@ -13913,33 +13913,33 @@ set_ignore_count (int bptnum, int count, int from_tty)
 
   for (breakpoint *b : all_breakpoints ())
     if (b->number == bptnum)
-    {
-      if (is_tracepoint (b))
-       {
-         if (from_tty && count != 0)
-           printf_filtered (_("Ignore count ignored for tracepoint %d."),
-                            bptnum);
-         return;
-       }
-      
-      b->ignore_count = count;
-      if (from_tty)
-       {
-         if (count == 0)
-           printf_filtered (_("Will stop next time "
-                              "breakpoint %d is reached."),
-                            bptnum);
-         else if (count == 1)
-           printf_filtered (_("Will ignore next crossing of breakpoint %d."),
-                            bptnum);
-         else
-           printf_filtered (_("Will ignore next %d "
-                              "crossings of breakpoint %d."),
-                            count, bptnum);
-       }
-      gdb::observers::breakpoint_modified.notify (b);
-      return;
-    }
+      {
+       if (is_tracepoint (b))
+         {
+           if (from_tty && count != 0)
+             printf_filtered (_("Ignore count ignored for tracepoint %d."),
+                              bptnum);
+           return;
+         }
+
+       b->ignore_count = count;
+       if (from_tty)
+         {
+           if (count == 0)
+             printf_filtered (_("Will stop next time "
+                                "breakpoint %d is reached."),
+                              bptnum);
+           else if (count == 1)
+             printf_filtered (_("Will ignore next crossing of breakpoint %d."),
+                              bptnum);
+           else
+             printf_filtered (_("Will ignore next %d "
+                                "crossings of breakpoint %d."),
+                              count, bptnum);
+         }
+       gdb::observers::breakpoint_modified.notify (b);
+       return;
+      }
 
   error (_("No breakpoint number %d."), bptnum);
 }
@@ -14846,10 +14846,10 @@ trace_pass_command (const char *args, int from_tty)
        error (_("Junk at end of arguments."));
 
       for (breakpoint *b : all_tracepoints ())
-      {
-       t1 = (struct tracepoint *) b;
-       trace_pass_set_count (t1, count, from_tty);
-      }
+       {
+         t1 = (struct tracepoint *) b;
+         trace_pass_set_count (t1, count, from_tty);
+       }
     }
   else if (*args == '\0')
     {
@@ -14931,9 +14931,7 @@ get_tracepoint_by_number (const char **arg,
 
   for (breakpoint *t : all_tracepoints ())
     if (t->number == tpnum)
-    {
       return (struct tracepoint *) t;
-    }
 
   printf_unfiltered ("No tracepoint number %d.\n", tpnum);
   return NULL;
@@ -14968,25 +14966,25 @@ save_breakpoints (const char *filename, int from_tty,
 
   /* See if we have anything to save.  */
   for (breakpoint *tp : all_breakpoints ())
-  {
-    /* Skip internal and momentary breakpoints.  */
-    if (!user_breakpoint_p (tp))
-      continue;
+    {
+      /* Skip internal and momentary breakpoints.  */
+      if (!user_breakpoint_p (tp))
+       continue;
 
-    /* If we have a filter, only save the breakpoints it accepts.  */
-    if (filter && !filter (tp))
-      continue;
+      /* If we have a filter, only save the breakpoints it accepts.  */
+      if (filter && !filter (tp))
+       continue;
 
-    any = 1;
+      any = 1;
 
-    if (is_tracepoint (tp))
-      {
-       extra_trace_bits = 1;
+      if (is_tracepoint (tp))
+       {
+         extra_trace_bits = 1;
 
-       /* We can stop searching.  */
-       break;
-      }
-  }
+         /* We can stop searching.  */
+         break;
+       }
+    }
 
   if (!any)
     {
@@ -15006,65 +15004,65 @@ save_breakpoints (const char *filename, int from_tty,
     save_trace_state_variables (&fp);
 
   for (breakpoint *tp : all_breakpoints ())
-  {
-    /* Skip internal and momentary breakpoints.  */
-    if (!user_breakpoint_p (tp))
-      continue;
+    {
+      /* Skip internal and momentary breakpoints.  */
+      if (!user_breakpoint_p (tp))
+       continue;
 
-    /* If we have a filter, only save the breakpoints it accepts.  */
-    if (filter && !filter (tp))
-      continue;
+      /* If we have a filter, only save the breakpoints it accepts.  */
+      if (filter && !filter (tp))
+       continue;
 
-    tp->ops->print_recreate (tp, &fp);
+      tp->ops->print_recreate (tp, &fp);
 
-    /* Note, we can't rely on tp->number for anything, as we can't
-       assume the recreated breakpoint numbers will match.  Use $bpnum
-       instead.  */
+      /* Note, we can't rely on tp->number for anything, as we can't
+        assume the recreated breakpoint numbers will match.  Use $bpnum
+        instead.  */
 
-    if (tp->cond_string)
-      fp.printf ("  condition $bpnum %s\n", tp->cond_string);
+      if (tp->cond_string)
+       fp.printf ("  condition $bpnum %s\n", tp->cond_string);
 
-    if (tp->ignore_count)
-      fp.printf ("  ignore $bpnum %d\n", tp->ignore_count);
+      if (tp->ignore_count)
+       fp.printf ("  ignore $bpnum %d\n", tp->ignore_count);
 
-    if (tp->type != bp_dprintf && tp->commands)
-      {
-       fp.puts ("  commands\n");
-       
-       current_uiout->redirect (&fp);
-       try
-         {
-           print_command_lines (current_uiout, tp->commands.get (), 2);
-         }
-       catch (const gdb_exception &ex)
-         {
-         current_uiout->redirect (NULL);
-           throw;
-         }
+      if (tp->type != bp_dprintf && tp->commands)
+       {
+         fp.puts ("  commands\n");
 
-       current_uiout->redirect (NULL);
-       fp.puts ("  end\n");
-      }
+         current_uiout->redirect (&fp);
+         try
+           {
+             print_command_lines (current_uiout, tp->commands.get (), 2);
+           }
+         catch (const gdb_exception &ex)
+           {
+           current_uiout->redirect (NULL);
+             throw;
+           }
 
-    if (tp->enable_state == bp_disabled)
-      fp.puts ("disable $bpnum\n");
+         current_uiout->redirect (NULL);
+         fp.puts ("  end\n");
+       }
 
-    /* If this is a multi-location breakpoint, check if the locations
-       should be individually disabled.  Watchpoint locations are
-       special, and not user visible.  */
-    if (!is_watchpoint (tp) && tp->loc && tp->loc->next)
-      {
-       int n = 1;
+      if (tp->enable_state == bp_disabled)
+       fp.puts ("disable $bpnum\n");
 
-       for (bp_location *loc : tp->locations ())
-         {
-           if (!loc->enabled)
-             fp.printf ("disable $bpnum.%d\n", n);
+      /* If this is a multi-location breakpoint, check if the locations
+        should be individually disabled.  Watchpoint locations are
+        special, and not user visible.  */
+      if (!is_watchpoint (tp) && tp->loc && tp->loc->next)
+       {
+         int n = 1;
 
-           n++;
-         }
-      }
-  }
+         for (bp_location *loc : tp->locations ())
+           {
+             if (!loc->enabled)
+               fp.printf ("disable $bpnum.%d\n", n);
+
+             n++;
+           }
+       }
+    }
 
   if (extra_trace_bits && *default_collect)
     fp.printf ("set default-collect %s\n", default_collect);
index 23e859a3b1ce92e9dff6d2b7c26a6cd289420d8b..ef730df9f0b100e8d243c3c7766cbc539f0954d4 100644 (file)
@@ -1150,10 +1150,10 @@ ctf_add_var_cb (const char *name, ctf_id_t id, void *arg)
       case CTF_K_UNION:
       case CTF_K_ENUM:
        if (type == nullptr)
-       {
-         complaint (_("ctf_add_var_cb: %s has NO type (%ld)"), name, id);
-         type = objfile_type (ccp->of)->builtin_error;
-       }
+         {
+           complaint (_("ctf_add_var_cb: %s has NO type (%ld)"), name, id);
+           type = objfile_type (ccp->of)->builtin_error;
+         }
        sym = new (&ccp->of->objfile_obstack) symbol;
        OBJSTAT (ccp->of, n_syms++);
        SYMBOL_TYPE (sym) = type;
index 84c4f34cf30f0780f74608e5aa7968f99a51c97e..dbc82f0a4ac41a7123e8dd598cd45a0b6016fcdd 100644 (file)
@@ -4792,11 +4792,13 @@ rank_one_type (struct type *parm, struct type *arg, struct value *value)
     return (sum_ranks (rank_one_type (TYPE_TARGET_TYPE (parm), arg, NULL),
                       REFERENCE_SEE_THROUGH_BADNESS));
   if (overload_debug)
-  /* Debugging only.  */
-    fprintf_filtered (gdb_stderr,
-                     "------ Arg is %s [%d], parm is %s [%d]\n",
-                     arg->name (), arg->code (),
-                     parm->name (), parm->code ());
+    {
+      /* Debugging only.  */
+      fprintf_filtered (gdb_stderr,
+                       "------ Arg is %s [%d], parm is %s [%d]\n",
+                       arg->name (), arg->code (),
+                       parm->name (), parm->code ());
+    }
 
   /* x -> y means arg of type x being supplied for parameter of type y.  */
 
index 5aae3405f6e1431d535626316c486d9e3646628b..093ed9e792ecea07bebacd27032c8f9454674bcd 100644 (file)
@@ -401,18 +401,18 @@ go32_nat_target::resume (ptid_t ptid, int step, enum gdb_signal siggnal)
   resume_is_step = step;
 
   if (siggnal != GDB_SIGNAL_0 && siggnal != GDB_SIGNAL_TRAP)
-  {
-    for (i = 0, resume_signal = -1;
-        excepn_map[i].gdb_sig != GDB_SIGNAL_LAST; i++)
-      if (excepn_map[i].gdb_sig == siggnal)
-      {
-       resume_signal = excepn_map[i].djgpp_excepno;
-       break;
-      }
-    if (resume_signal == -1)
-      printf_unfiltered ("Cannot deliver signal %s on this platform.\n",
-                        gdb_signal_to_name (siggnal));
-  }
+    {
+      for (i = 0, resume_signal = -1;
+          excepn_map[i].gdb_sig != GDB_SIGNAL_LAST; i++)
+       if (excepn_map[i].gdb_sig == siggnal)
+         {
+           resume_signal = excepn_map[i].djgpp_excepno;
+           break;
+         }
+      if (resume_signal == -1)
+       printf_unfiltered ("Cannot deliver signal %s on this platform.\n",
+                          gdb_signal_to_name (siggnal));
+    }
 }
 
 static char child_cwd[FILENAME_MAX];
@@ -872,14 +872,14 @@ device_mode (int fd, int raw_p)
     newmode &= ~0x20;
 
   if (oldmode & 0x80)  /* Only for character dev.  */
-  {
-    regs.x.ax = 0x4401;
-    regs.x.bx = fd;
-    regs.x.dx = newmode & 0xff;   /* Force upper byte zero, else it fails.  */
-    __dpmi_int (0x21, &regs);
-    if (regs.x.flags & 1)
-      return -1;
-  }
+    {
+      regs.x.ax = 0x4401;
+      regs.x.bx = fd;
+      regs.x.dx = newmode & 0xff;   /* Force upper byte zero, else it fails.  */
+      __dpmi_int (0x21, &regs);
+      if (regs.x.flags & 1)
+       return -1;
+    }
   return (oldmode & 0x20) == 0x20;
 }
 
@@ -909,24 +909,24 @@ go32_nat_target::terminal_info (const char *args, int from_tty)
 
 #if __DJGPP_MINOR__ > 2
   if (child_cmd.redirection)
-  {
-    int i;
-
-    for (i = 0; i < DBG_HANDLES; i++)
     {
-      if (child_cmd.redirection[i]->file_name)
-       printf_unfiltered ("\tFile handle %d is redirected to `%s'.\n",
-                          i, child_cmd.redirection[i]->file_name);
-      else if (_get_dev_info (child_cmd.redirection[i]->inf_handle) == -1)
-       printf_unfiltered
-         ("\tFile handle %d appears to be closed by inferior.\n", i);
-      /* Mask off the raw/cooked bit when comparing device info words.  */
-      else if ((_get_dev_info (child_cmd.redirection[i]->inf_handle) & 0xdf)
-              != (_get_dev_info (i) & 0xdf))
-       printf_unfiltered
-         ("\tFile handle %d appears to be redirected by inferior.\n", i);
+      int i;
+
+      for (i = 0; i < DBG_HANDLES; i++)
+       {
+         if (child_cmd.redirection[i]->file_name)
+           printf_unfiltered ("\tFile handle %d is redirected to `%s'.\n",
+                              i, child_cmd.redirection[i]->file_name);
+         else if (_get_dev_info (child_cmd.redirection[i]->inf_handle) == -1)
+           printf_unfiltered
+             ("\tFile handle %d appears to be closed by inferior.\n", i);
+         /* Mask off the raw/cooked bit when comparing device info words.  */
+         else if ((_get_dev_info (child_cmd.redirection[i]->inf_handle) & 0xdf)
+                  != (_get_dev_info (i) & 0xdf))
+           printf_unfiltered
+             ("\tFile handle %d appears to be redirected by inferior.\n", i);
+       }
     }
-  }
 #endif
 }
 
@@ -936,19 +936,19 @@ go32_nat_target::terminal_inferior ()
   /* Redirect standard handles as child wants them.  */
   errno = 0;
   if (redir_to_child (&child_cmd) == -1)
-  {
-    redir_to_debugger (&child_cmd);
-    error (_("Cannot redirect standard handles for program: %s."),
-          safe_strerror (errno));
-  }
+    {
+      redir_to_debugger (&child_cmd);
+      error (_("Cannot redirect standard handles for program: %s."),
+            safe_strerror (errno));
+    }
   /* Set the console device of the inferior to whatever mode
      (raw or cooked) we found it last time.  */
   if (terminal_is_ours)
-  {
-    if (inf_mode_valid)
-      device_mode (0, inf_terminal_mode);
-    terminal_is_ours = 0;
-  }
+    {
+      if (inf_mode_valid)
+       device_mode (0, inf_terminal_mode);
+      terminal_is_ours = 0;
+    }
 }
 
 void
@@ -957,25 +957,25 @@ go32_nat_target::terminal_ours ()
   /* Switch to cooked mode on the gdb terminal and save the inferior
      terminal mode to be restored when it is resumed.  */
   if (!terminal_is_ours)
-  {
-    inf_terminal_mode = device_mode (0, 0);
-    if (inf_terminal_mode != -1)
-      inf_mode_valid = 1;
-    else
-      /* If device_mode returned -1, we don't know what happens with
-        handle 0 anymore, so make the info invalid.  */
-      inf_mode_valid = 0;
-    terminal_is_ours = 1;
-
-    /* Restore debugger's standard handles.  */
-    errno = 0;
-    if (redir_to_debugger (&child_cmd) == -1)
     {
-      redir_to_child (&child_cmd);
-      error (_("Cannot redirect standard handles for debugger: %s."),
-            safe_strerror (errno));
+      inf_terminal_mode = device_mode (0, 0);
+      if (inf_terminal_mode != -1)
+       inf_mode_valid = 1;
+      else
+       /* If device_mode returned -1, we don't know what happens with
+          handle 0 anymore, so make the info invalid.  */
+       inf_mode_valid = 0;
+      terminal_is_ours = 1;
+
+      /* Restore debugger's standard handles.  */
+      errno = 0;
+      if (redir_to_debugger (&child_cmd) == -1)
+       {
+         redir_to_child (&child_cmd);
+         error (_("Cannot redirect standard handles for debugger: %s."),
+                safe_strerror (errno));
+       }
     }
-  }
 }
 
 void
index 2dd7798a9a1d2d2af283f58cbeac90e2bf116629..96a3ef584c9b2ac09ddc7ed17d8cb6e8a2722158 100644 (file)
@@ -824,10 +824,10 @@ ppscm_print_children (SCM printer, enum display_hint hint,
         2. Arrays.  Always print a ",".
         3. Other.  Always print a ",".  */
       if (i == 0)
-      {
-       if (!printed_nothing)
-         fputs_filtered (" = ", stream);
-      }
+       {
+         if (!printed_nothing)
+           fputs_filtered (" = ", stream);
+       }
       else if (! is_map || i % 2 == 0)
        fputs_filtered (pretty ? "," : ", ", stream);
 
index ff07b7d2d4c3e82d993a0f4c4c0af4d6487232af..a4d1ceeeeb86d949166b2d07dcece7e77ff822e3 100644 (file)
@@ -174,9 +174,7 @@ hppa_linux_sigtramp_find_sigcontext (struct gdbarch *gdbarch, CORE_ADDR pc)
          sp = pc - pcoffs[attempt];
        }
       else
-      {
        return 0;
-      }
     }
 
   /* sp + sfoffs[try] points to a struct rt_sigframe, which contains
index 5e6769ae9130ef2abf83c9c66fd41b7c80436c84..7f9405ce3dd46c8dfc1fbca97e0212a03ed60936 100644 (file)
@@ -4967,10 +4967,8 @@ static int i386_record_floats (struct gdbarch *gdbarch,
   else if (I386_SAVE_FPU_ENV_REG_STACK == iregnum)
     {
       for (i = I387_ST0_REGNUM (tdep); i <= I387_FOP_REGNUM (tdep); i++)
-      {
        if (record_full_arch_list_add_reg (ir->regcache, i))
          return -1;
-      }
     }
   else if ((iregnum >= I387_ST0_REGNUM (tdep)) &&
           (iregnum <= I387_FOP_REGNUM (tdep)))
index 159e7d31039c953f0c96505c8b5892a5eab11cc0..0d7efbc94131f5a93e1f2d5e6472c4a0536442c7 100644 (file)
@@ -55,11 +55,11 @@ mi_cmd_symbol_list_lines (const char *command, char **argv, int argc)
   ui_out_emit_list list_emitter (uiout, "lines");
   if (SYMTAB_LINETABLE (s) != NULL && SYMTAB_LINETABLE (s)->nitems > 0)
     for (i = 0; i < SYMTAB_LINETABLE (s)->nitems; i++)
-    {
-      ui_out_emit_tuple tuple_emitter (uiout, NULL);
-      uiout->field_core_addr ("pc", gdbarch, SYMTAB_LINETABLE (s)->item[i].pc);
-      uiout->field_signed ("line", SYMTAB_LINETABLE (s)->item[i].line);
-    }
+      {
+       ui_out_emit_tuple tuple_emitter (uiout, NULL);
+       uiout->field_core_addr ("pc", gdbarch, SYMTAB_LINETABLE (s)->item[i].pc);
+       uiout->field_signed ("line", SYMTAB_LINETABLE (s)->item[i].line);
+      }
 }
 
 /* Used by the -symbol-info-* and -symbol-info-module-* commands to print
index f344f9225d87036f49f342f31c3b8f9de81717d7..8b162cd35a35bff243bec0a6ca41b36413fb09c3 100644 (file)
@@ -100,17 +100,17 @@ aarch64_sve_set_vq (int tid, struct reg_buffer_common *reg_buf)
      inferior function call, and the VG register comes after the Z
      registers.  */
   if (reg_buf->get_register_status (AARCH64_SVE_VG_REGNUM) != REG_VALID)
-  {
-    /* If vg is not available yet, fetch it from ptrace.  The VG value from
-       ptrace is likely the correct one.  */
-    uint64_t vq = aarch64_sve_get_vq (tid);
+    {
+      /* If vg is not available yet, fetch it from ptrace.  The VG value from
+        ptrace is likely the correct one.  */
+      uint64_t vq = aarch64_sve_get_vq (tid);
 
-    /* If something went wrong, just bail out.  */
-    if (vq == 0)
-      return false;
+      /* If something went wrong, just bail out.  */
+      if (vq == 0)
+       return false;
 
-    reg_vg = sve_vg_from_vq (vq);
-  }
+      reg_vg = sve_vg_from_vq (vq);
+    }
   else
     reg_buf->raw_collect (AARCH64_SVE_VG_REGNUM, &reg_vg);
 
index 6dce09c8094c6862869092eaad45e2547903b563..5d4ab5dc071271c224488f9445b9a1fb396b66dd 100644 (file)
@@ -249,15 +249,15 @@ nios2_setup_default (struct nios2_unwind_cache *cache)
   int i;
 
   for (i = 0; i < NIOS2_NUM_REGS; i++)
-  {
-    /* All registers start off holding their previous values.  */
-    cache->reg_value[i].reg    = i;
-    cache->reg_value[i].offset = 0;
-
-    /* All registers start off not saved.  */
-    cache->reg_saved[i].basereg = -1;
-    cache->reg_saved[i].addr    = 0;
-  }
+    {
+      /* All registers start off holding their previous values.  */
+      cache->reg_value[i].reg    = i;
+      cache->reg_value[i].offset = 0;
+
+      /* All registers start off not saved.  */
+      cache->reg_saved[i].basereg = -1;
+      cache->reg_saved[i].addr    = 0;
+    }
 }
 
 /* Initialize the unwind cache.  */
@@ -1244,16 +1244,16 @@ nios2_analyze_prologue (struct gdbarch *gdbarch, const CORE_ADDR start_pc,
       enum branch_condition cond;
 
       if (pc == current_pc)
-      {
-       /* When we reach the current PC we must save the current
-          register state (for the backtrace) but keep analysing
-          because there might be more to find out (eg. is this an
-          exception handler).  */
-       memcpy (temp_value, value, sizeof (temp_value));
-       value = temp_value;
-       if (nios2_debug)
-         fprintf_unfiltered (gdb_stdlog, "*");
-      }
+       {
+         /* When we reach the current PC we must save the current
+            register state (for the backtrace) but keep analysing
+            because there might be more to find out (eg. is this an
+            exception handler).  */
+         memcpy (temp_value, value, sizeof (temp_value));
+         value = temp_value;
+         if (nios2_debug)
+           fprintf_unfiltered (gdb_stdlog, "*");
+       }
 
       op = nios2_fetch_insn (gdbarch, pc, &insn);
 
index 64b3c56e10c54c88b53d5a8eac723ce3a1e84a55..c83d47c258aaf9e3d360e4f668b9ef065f471b39 100644 (file)
@@ -276,10 +276,10 @@ ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
                      /* 32-bit decimal floats are right aligned in the
                         doubleword.  */
                      if (TYPE_LENGTH (type) == 4)
-                     {
-                       memcpy (regval + 4, val, 4);
-                       p = regval;
-                     }
+                       {
+                         memcpy (regval + 4, val, 4);
+                         p = regval;
+                       }
                      else
                        p = val;
 
index 18071982e201d2b357d5277ff38a55999865cde3..54ac907a83897086ad06fd6cbc70e99a1c3a5bc4 100644 (file)
@@ -780,16 +780,16 @@ py_print_frame (PyObject *filter, frame_filter_flags flags,
 
   get_user_print_options (&opts);
   if (print_frame_info)
-  {
-    gdb::optional<enum print_what> user_frame_info_print_what;
-
-    get_user_print_what_frame_info (&user_frame_info_print_what);
-    if (!out->is_mi_like_p () && user_frame_info_print_what.has_value ())
-      {
-       /* Use the specific frame information desired by the user.  */
-       print_what = *user_frame_info_print_what;
-      }
-  }
+    {
+      gdb::optional<enum print_what> user_frame_info_print_what;
+
+      get_user_print_what_frame_info (&user_frame_info_print_what);
+      if (!out->is_mi_like_p () && user_frame_info_print_what.has_value ())
+       {
+         /* Use the specific frame information desired by the user.  */
+         print_what = *user_frame_info_print_what;
+       }
+    }
 
   /* Get the underlying frame.  This is needed to determine GDB
   architecture, and also, in the cases of frame variables/arguments to
index fef4dcd66fbba79aebaa468bbfb369eec16f841c..fe33747ca2192c0ec0a68bc4016b573c430866cf 100644 (file)
@@ -437,10 +437,10 @@ print_children (PyObject *printer, const char *hint,
         2. Arrays.  Always print a ",".
         3. Other.  Always print a ",".  */
       if (i == 0)
-      {
-       if (!is_py_none)
-         fputs_filtered (" = ", stream);
-      }
+       {
+         if (!is_py_none)
+           fputs_filtered (" = ", stream);
+       }
       else if (! is_map || i % 2 == 0)
        fputs_filtered (pretty ? "," : ", ", stream);
 
index 57dbe5b3273c4a2a4009d8d6ffa780f2ddddc7b9..d45a15c16ca1be6854ea9b829ead0be0bb6e9f6c 100644 (file)
@@ -1065,9 +1065,12 @@ ppc_displaced_step_fixup (struct gdbarch *gdbarch,
   else if ((insn & BP_MASK) == BP_INSN)
     regcache_cooked_write_unsigned (regs, gdbarch_pc_regnum (gdbarch), from);
   else
-  /* Handle any other instructions that do not fit in the categories above.  */
-    regcache_cooked_write_unsigned (regs, gdbarch_pc_regnum (gdbarch),
-                                   from + offset);
+    {
+      /* Handle any other instructions that do not fit in the categories
+         above.  */
+      regcache_cooked_write_unsigned (regs, gdbarch_pc_regnum (gdbarch),
+                                     from + offset);
+    }
 }
 
 /* Implementation of gdbarch_displaced_step_prepare.  */
index 1bd770a3cc3d6bff4f5d5171d86ac3c34db441e3..4905bcab36e450e14f1d4e476fb9c7c8e9d7b4ad 100644 (file)
@@ -7143,12 +7143,12 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
      cause GDB to crash with an internal error when the user tries to set
      an unsupported OSABI.  */
   if (!tdesc_has_registers (tdesc))
-  {
-    if (info.bfd_arch_info->mach == bfd_mach_s390_31)
-      tdesc = tdesc_s390_linux32;
-    else
-      tdesc = tdesc_s390x_linux64;
-  }
+    {
+      if (info.bfd_arch_info->mach == bfd_mach_s390_31)
+       tdesc = tdesc_s390_linux32;
+      else
+       tdesc = tdesc_s390x_linux64;
+    }
   tdep->tdesc = tdesc;
 
   /* Check any target description for validity.  */
index 66a4610199327629bc8d06946283950e6fbad3c8..a38fa4d8082769a5846b9d82922545cfa189360d 100644 (file)
@@ -1005,11 +1005,11 @@ print_pc (struct ui_out *uiout, struct gdbarch *gdbarch, frame_info *frame,
 
   std::string flags = gdbarch_get_pc_address_flags (gdbarch, frame, pc);
   if (!flags.empty ())
-  {
-    uiout->text (" [");
-    uiout->field_string ("addr_flags", flags);
-    uiout->text ("]");
-  }
+    {
+      uiout->text (" [");
+      uiout->field_string ("addr_flags", flags);
+      uiout->text ("]");
+    }
 }
 
 /* See stack.h.  */
@@ -1927,7 +1927,7 @@ public:
     struct frame_info *fid;
 
     if (args == NULL)
-    error (_("Missing address argument to view a frame"));
+      error (_("Missing address argument to view a frame"));
 
     gdb_argv argv (args);
 
index 655b3dabf62d1c3cff64aac5e98dab4c96af3bb9..cacf2d3c5553a7788df13c1c2e0d6a15120959a0 100644 (file)
@@ -5637,55 +5637,55 @@ default_collect_symbol_completion_matches_break_on
   if (mode == complete_symbol_mode::LINESPEC)
     sym_text = text;
   else
-  {
-    const char *p;
-    char quote_found;
-    const char *quote_pos = NULL;
+    {
+      const char *p;
+      char quote_found;
+      const char *quote_pos = NULL;
 
-    /* First see if this is a quoted string.  */
-    quote_found = '\0';
-    for (p = text; *p != '\0'; ++p)
-      {
-       if (quote_found != '\0')
-         {
-           if (*p == quote_found)
-             /* Found close quote.  */
-             quote_found = '\0';
-           else if (*p == '\\' && p[1] == quote_found)
-             /* A backslash followed by the quote character
-                doesn't end the string.  */
-             ++p;
-         }
-       else if (*p == '\'' || *p == '"')
-         {
-           quote_found = *p;
-           quote_pos = p;
-         }
-      }
-    if (quote_found == '\'')
-      /* A string within single quotes can be a symbol, so complete on it.  */
-      sym_text = quote_pos + 1;
-    else if (quote_found == '"')
-      /* A double-quoted string is never a symbol, nor does it make sense
-        to complete it any other way.  */
-      {
-       return;
-      }
-    else
-      {
-       /* It is not a quoted string.  Break it based on the characters
-          which are in symbols.  */
-       while (p > text)
-         {
-           if (isalnum (p[-1]) || p[-1] == '_' || p[-1] == '\0'
-               || p[-1] == ':' || strchr (break_on, p[-1]) != NULL)
-             --p;
-           else
-             break;
-         }
-       sym_text = p;
-      }
-  }
+      /* First see if this is a quoted string.  */
+      quote_found = '\0';
+      for (p = text; *p != '\0'; ++p)
+       {
+         if (quote_found != '\0')
+           {
+             if (*p == quote_found)
+               /* Found close quote.  */
+               quote_found = '\0';
+             else if (*p == '\\' && p[1] == quote_found)
+               /* A backslash followed by the quote character
+                  doesn't end the string.  */
+               ++p;
+           }
+         else if (*p == '\'' || *p == '"')
+           {
+             quote_found = *p;
+             quote_pos = p;
+           }
+       }
+      if (quote_found == '\'')
+       /* A string within single quotes can be a symbol, so complete on it.  */
+       sym_text = quote_pos + 1;
+      else if (quote_found == '"')
+       /* A double-quoted string is never a symbol, nor does it make sense
+          to complete it any other way.  */
+       {
+         return;
+       }
+      else
+       {
+         /* It is not a quoted string.  Break it based on the characters
+            which are in symbols.  */
+         while (p > text)
+           {
+             if (isalnum (p[-1]) || p[-1] == '_' || p[-1] == '\0'
+                 || p[-1] == ':' || strchr (break_on, p[-1]) != NULL)
+               --p;
+             else
+               break;
+           }
+         sym_text = p;
+       }
+    }
 
   lookup_name_info lookup_name (sym_text, name_match_type, true);
 
@@ -5874,46 +5874,46 @@ collect_file_symbol_completion_matches (completion_tracker &tracker,
   if (mode == complete_symbol_mode::LINESPEC)
     sym_text = text;
   else
-  {
-    const char *p;
-    char quote_found;
-    const char *quote_pos = NULL;
+    {
+      const char *p;
+      char quote_found;
+      const char *quote_pos = NULL;
 
-    /* First see if this is a quoted string.  */
-    quote_found = '\0';
-    for (p = text; *p != '\0'; ++p)
-      {
-       if (quote_found != '\0')
-         {
-           if (*p == quote_found)
-             /* Found close quote.  */
-             quote_found = '\0';
-           else if (*p == '\\' && p[1] == quote_found)
-             /* A backslash followed by the quote character
-                doesn't end the string.  */
-             ++p;
-         }
-       else if (*p == '\'' || *p == '"')
-         {
-           quote_found = *p;
-           quote_pos = p;
-         }
-      }
-    if (quote_found == '\'')
-      /* A string within single quotes can be a symbol, so complete on it.  */
-      sym_text = quote_pos + 1;
-    else if (quote_found == '"')
-      /* A double-quoted string is never a symbol, nor does it make sense
-        to complete it any other way.  */
-      {
-       return;
-      }
-    else
-      {
-       /* Not a quoted string.  */
-       sym_text = language_search_unquoted_string (text, p);
-      }
-  }
+      /* First see if this is a quoted string.  */
+      quote_found = '\0';
+      for (p = text; *p != '\0'; ++p)
+       {
+         if (quote_found != '\0')
+           {
+             if (*p == quote_found)
+               /* Found close quote.  */
+               quote_found = '\0';
+             else if (*p == '\\' && p[1] == quote_found)
+               /* A backslash followed by the quote character
+                  doesn't end the string.  */
+               ++p;
+           }
+         else if (*p == '\'' || *p == '"')
+           {
+             quote_found = *p;
+             quote_pos = p;
+           }
+       }
+      if (quote_found == '\'')
+       /* A string within single quotes can be a symbol, so complete on it.  */
+       sym_text = quote_pos + 1;
+      else if (quote_found == '"')
+       /* A double-quoted string is never a symbol, nor does it make sense
+          to complete it any other way.  */
+       {
+         return;
+       }
+      else
+       {
+         /* Not a quoted string.  */
+         sym_text = language_search_unquoted_string (text, p);
+       }
+    }
 
   lookup_name_info lookup_name (sym_text, name_match_type, true);
 
index 692af592e1570c401b57a228bd56e3a156df3644..86d40d87b388d6ad78fb00a345c47937da5ced11 100644 (file)
@@ -2451,11 +2451,11 @@ target_float_convert (const gdb_byte *from, const struct type *from_type,
 
   /* Convert between two different formats in the same category.  */
   if (!target_float_same_format_p (from_type, to_type))
-  {
-    const target_float_ops *ops = get_target_float_ops (from_type, to_type);
-    ops->convert (from, from_type, to, to_type);
-    return;
-  }
+    {
+      const target_float_ops *ops = get_target_float_ops (from_type, to_type);
+      ops->convert (from, from_type, to, to_type);
+      return;
+    }
 
   /* The floating-point formats match, so we simply copy the data, ensuring
      possible padding bytes in the target buffer are zeroed out.  */
index cb8b4cbd0728bed3af74be73af747dbe468786e0..f88968afbcfc5d13b43bd3cea8dde9c999fbe1b5 100644 (file)
@@ -2267,7 +2267,7 @@ tfind_command_1 (const char *args, int from_tty)
     { /* TFIND with no args means find NEXT trace frame.  */
       if (traceframe_number == -1)
        frameno = 0;    /* "next" is first one.  */
-       else
+      else
        frameno = traceframe_number + 1;
     }
   else if (0 == strcmp (args, "-"))
@@ -2408,11 +2408,13 @@ tfind_line_command (const char *args, int from_tty)
        }
       }
     else
-    /* Is there any case in which we get here, and have an address
-       which the user would want to see?  If we have debugging
-       symbols and no line numbers?  */
-    error (_("Line number %d is out of range for \"%s\"."),
-          sal.line, symtab_to_filename_for_display (sal.symtab));
+      {
+       /* Is there any case in which we get here, and have an address
+          which the user would want to see?  If we have debugging
+          symbols and no line numbers?  */
+       error (_("Line number %d is out of range for \"%s\"."),
+              sal.line, symtab_to_filename_for_display (sal.symtab));
+      }
 
   /* Find within range of stated line.  */
   if (args && *args)
index 1c46e29ebd102f7118ff73d4a26221f3d3fe1898..5114c1bd2d26c8770107eec170b97a38f43cf4bb 100644 (file)
@@ -1025,12 +1025,14 @@ v850_push_dummy_call (struct gdbarch *gdbarch,
   if (gdbarch_tdep (gdbarch)->abi == V850_ABI_RH850)
     stack_offset = 0;
   else
-  /* The offset onto the stack at which we will start copying parameters
-     (after the registers are used up) begins at 16 rather than at zero.
-     That's how the ABI is defined, though there's no indication that these
-     16 bytes are used for anything, not even for saving incoming
-     argument registers.  */
-  stack_offset = 16;
+    {
+      /* The offset onto the stack at which we will start copying parameters
+        (after the registers are used up) begins at 16 rather than at zero.
+        That's how the ABI is defined, though there's no indication that these
+        16 bytes are used for anything, not even for saving incoming
+        argument registers.  */
+      stack_offset = 16;
+    }
 
   /* Now make space on the stack for the args.  */
   for (argnum = 0; argnum < nargs; argnum++)
index 88601e106f57617cc6aad2cd7c9298ee85ad8f5b..ca854390b7e4835fe1dfaf7f58c133b712a77012 100644 (file)
@@ -761,10 +761,10 @@ create_enum (struct gdbarch *gdbarch, int bit, const char *name,
   type->set_is_unsigned (true);
 
   for (i = 0; i < count; i++)
-  {
-    TYPE_FIELD_NAME (type, i) = values[i].name;
-    SET_FIELD_ENUMVAL (type->field (i), values[i].value);
-  }
+    {
+      TYPE_FIELD_NAME (type, i) = values[i].name;
+      SET_FIELD_ENUMVAL (type->field (i), values[i].value);
+    }
 
   return type;
 }
index 368572797f6415b615864737a5cd911fc54c990e..a854d4daf3740619aee1cdd87b1676e99154fd60 100644 (file)
@@ -482,7 +482,8 @@ arrange_linetable (struct linetable *oldLineTb)
   newline = 0;
   if (oldLineTb->item[0].line != 0)
     for (newline = 0;
-    newline < oldLineTb->nitems && oldLineTb->item[newline].line; ++newline)
+        newline < oldLineTb->nitems && oldLineTb->item[newline].line;
+        ++newline)
       newLineTb->item[newline] = oldLineTb->item[newline];
 
   /* Now copy function lines one by one.  */
@@ -1165,20 +1166,20 @@ read_xcoff_symtab (struct objfile *objfile, legacy_psymtab *pst)
             to 32(0x20). So we need to read the first function auxiliary entry
             which contains the size. */
          if (cs->c_naux > 1 && ISFCN (cs->c_type))
-         {
-           /* a function entry point.  */
+           {
+             /* a function entry point.  */
 
-           fcn_start_addr = cs->c_value;
+             fcn_start_addr = cs->c_value;
 
-           /* save the function header info, which will be used
-              when `.bf' is seen.  */
-           fcn_cs_saved = *cs;
+             /* save the function header info, which will be used
+                when `.bf' is seen.  */
+             fcn_cs_saved = *cs;
 
-           /* Convert the auxent to something we can access.  */
-           bfd_coff_swap_aux_in (abfd, raw_auxptr, cs->c_type, cs->c_sclass,
-                                 0, cs->c_naux, &fcn_aux_saved);
-           continue;
-         }
+             /* Convert the auxent to something we can access.  */
+             bfd_coff_swap_aux_in (abfd, raw_auxptr, cs->c_type, cs->c_sclass,
+                                   0, cs->c_naux, &fcn_aux_saved);
+             continue;
+           }
          /* Read the csect auxiliary header, which is always the last by
             convention. */
          bfd_coff_swap_aux_in (abfd,
index 79c60b094749a7a5a04689e0ab6a500dea5b0aaf..f8d7fd65fb17a84cd9919514fd0348c54c3e4dae 100644 (file)
@@ -1,3 +1,7 @@
+2021-05-27  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * Fix some indentation mistakes throughout.
+
 2021-05-17  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * .dir-locals.el: Set sentence-end-double-space for all modes, and
index 09a96625a0b9b1f508f8e5bd9b208969250eb453..b66808e6b39a948bf6dacfe72aaf06d78be1722d 100644 (file)
@@ -1908,15 +1908,13 @@ s390_emit_const (LONGEST num)
     0x98, 0x23, 0x10, 0x00,    /* lm %r2, %r3, 0(%r1) */
   };
   if (num < 0x8000 && num >= 0)
-  {
     add_insns (buf_s, sizeof buf_s);
-  }
   else
-  {
-    s390_emit_litpool (8);
-    add_insns ((unsigned char *) &n, sizeof n);
-    add_insns (buf_l, sizeof buf_l);
-  }
+    {
+      s390_emit_litpool (8);
+      add_insns ((unsigned char *) &n, sizeof n);
+      add_insns (buf_l, sizeof buf_l);
+    }
 }
 
 /* The "emit_call" emit_ops method for s390.  */
@@ -2027,15 +2025,13 @@ s390_emit_set_r2 (int arg1)
     0x58, 0x20, 0x10, 0x00,    /* l %r2, 0(%r1) */
   };
   if (arg1 < 0x8000 && arg1 >= -0x8000)
-  {
     add_insns (buf_s, sizeof buf_s);
-  }
   else
-  {
-    s390_emit_litpool (4);
-    add_insns ((unsigned char *) &arg1, sizeof arg1);
-    add_insns (buf_l, sizeof buf_l);
-  }
+    {
+      s390_emit_litpool (4);
+      add_insns ((unsigned char *) &arg1, sizeof arg1);
+      add_insns (buf_l, sizeof buf_l);
+    }
 }
 
 /* The "emit_int_call_1" emit_ops method for s390.  */
@@ -2553,15 +2549,13 @@ s390x_emit_const (LONGEST num)
     0xe3, 0x20, 0x10, 0x00, 0x00, 0x04,        /* lg %r2, 0(%r1) */
   };
   if (num < 0x8000 && num >= -0x8000)
-  {
     add_insns (buf_s, sizeof buf_s);
-  }
   else
-  {
-    s390_emit_litpool (8);
-    add_insns ((unsigned char *) &n, sizeof n);
-    add_insns (buf_l, sizeof buf_l);
-  }
+    {
+      s390_emit_litpool (8);
+      add_insns ((unsigned char *) &n, sizeof n);
+      add_insns (buf_l, sizeof buf_l);
+    }
 }
 
 /* The "emit_call" emit_ops method for s390x.  */
This page took 0.069374 seconds and 4 git commands to generate.