* breakpoint.c (condition_command, commands_from_control_command)
[deliverable/binutils-gdb.git] / gdb / breakpoint.c
index e3fa8f1ecc361604581ca63fb5e596ac969c8839..24ef7bf6d46d561035b659939009ce447321610e 100644 (file)
@@ -601,44 +601,45 @@ condition_command (char *arg, int from_tty)
 
   ALL_BREAKPOINTS (b)
     if (b->number == bnum)
-    {
-      struct bp_location *loc = b->loc;
-      for (; loc; loc = loc->next)
-       {
-         if (loc->cond)
-           {
-             xfree (loc->cond);
-             loc->cond = 0;
-           }
-       }
-      if (b->cond_string != NULL)
-       xfree (b->cond_string);
+      {
+       struct bp_location *loc = b->loc;
+       for (; loc; loc = loc->next)
+         {
+           if (loc->cond)
+             {
+               xfree (loc->cond);
+               loc->cond = 0;
+             }
+         }
+       if (b->cond_string != NULL)
+         xfree (b->cond_string);
 
-      if (*p == 0)
-       {
-         b->cond_string = NULL;
-         if (from_tty)
-           printf_filtered (_("Breakpoint %d now unconditional.\n"), bnum);
-       }
-      else
-       {
-         arg = p;
-         /* I don't know if it matters whether this is the string the user
-            typed in or the decompiled expression.  */
-         b->cond_string = savestring (arg, strlen (arg));
-         b->condition_not_parsed = 0;
-         for (loc = b->loc; loc; loc = loc->next)
-           {
-             arg = p;
-             loc->cond = parse_exp_1 (&arg, block_for_pc (loc->address), 0);
-             if (*arg)
-               error (_("Junk at end of expression"));
-           }
-       }
-      breakpoints_changed ();
-      breakpoint_modify_event (b->number);
-      return;
-    }
+       if (*p == 0)
+         {
+           b->cond_string = NULL;
+           if (from_tty)
+             printf_filtered (_("Breakpoint %d now unconditional.\n"), bnum);
+         }
+       else
+         {
+           arg = p;
+           /* I don't know if it matters whether this is the string the user
+              typed in or the decompiled expression.  */
+           b->cond_string = savestring (arg, strlen (arg));
+           b->condition_not_parsed = 0;
+           for (loc = b->loc; loc; loc = loc->next)
+             {
+               arg = p;
+               loc->cond =
+                 parse_exp_1 (&arg, block_for_pc (loc->address), 0);
+               if (*arg)
+                 error (_("Junk at end of expression"));
+             }
+         }
+       breakpoints_changed ();
+       breakpoint_modify_event (b->number);
+       return;
+      }
 
   error (_("No breakpoint number %d."), bnum);
 }
@@ -723,7 +724,7 @@ commands_from_control_command (char *arg, struct command_line *cmd)
        breakpoints_changed ();
        breakpoint_modify_event (b->number);
        return simple_control;
-    }
+      }
   error (_("No breakpoint number %d."), bnum);
 }
 \f
@@ -3173,7 +3174,6 @@ bpstat_what (bpstat bs)
 #define sgl BPSTAT_WHAT_SINGLE
 #define slr BPSTAT_WHAT_SET_LONGJMP_RESUME
 #define clr BPSTAT_WHAT_CLEAR_LONGJMP_RESUME
-#define clrs BPSTAT_WHAT_CLEAR_LONGJMP_RESUME_SINGLE
 #define sr BPSTAT_WHAT_STEP_RESUME
 #define shl BPSTAT_WHAT_CHECK_SHLIBS
 #define shlr BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK
@@ -3198,10 +3198,9 @@ bpstat_what (bpstat bs)
      ordering is:
 
      kc   < clr sgl shl shlr slr sn sr ss
-     sgl  < clrs shl shlr slr sn sr ss
+     sgl  < shl shlr slr sn sr ss
      slr  < err shl shlr sn sr ss
-     clr  < clrs err shl shlr sn sr ss
-     clrs < err shl shlr sn sr ss
+     clr  < err shl shlr sn sr ss
      ss   < shl shlr sn sr
      sn   < shl shlr sr
      shl  < shlr sr
@@ -3212,9 +3211,7 @@ bpstat_what (bpstat bs)
      here.  If you just put the rows and columns in the right order,
      it'd look awfully regular.  We could simply walk the bpstat list
      and choose the highest priority action we find, with a little
-     logic to handle the 'err' cases, and the CLEAR_LONGJMP_RESUME/
-     CLEAR_LONGJMP_RESUME_SINGLE distinction (which breakpoint.h says
-     is messy anyway).  */
+     logic to handle the 'err' cases.  */
 
   /* step_resume entries: a step resume breakpoint overrides another
      breakpoint of signal handling (see comment in wait_for_inferior
@@ -3224,30 +3221,30 @@ bpstat_what (bpstat bs)
     table[(int) class_last][(int) BPSTAT_WHAT_LAST] =
   {
   /*                              old action */
-  /*       kc    ss    sn    sgl    slr   clr    clrs   sr   shl   shlr
+  /*       kc    ss    sn    sgl    slr   clr   sr   shl   shlr
    */
 /*no_effect */
-    {kc, ss, sn, sgl, slr, clr, clrs, sr, shl, shlr},
+    {kc, ss, sn, sgl, slr, clr, sr, shl, shlr},
 /*wp_silent */
-    {ss, ss, sn, ss, ss, ss, ss, sr, shl, shlr},
+    {ss, ss, sn, ss, ss, ss, sr, shl, shlr},
 /*wp_noisy */
-    {sn, sn, sn, sn, sn, sn, sn, sr, shl, shlr},
+    {sn, sn, sn, sn, sn, sn, sr, shl, shlr},
 /*bp_nostop */
-    {sgl, ss, sn, sgl, slr, clrs, clrs, sr, shl, shlr},
+    {sgl, ss, sn, sgl, slr, slr, sr, shl, shlr},
 /*bp_silent */
-    {ss, ss, sn, ss, ss, ss, ss, sr, shl, shlr},
+    {ss, ss, sn, ss, ss, ss, sr, shl, shlr},
 /*bp_noisy */
-    {sn, sn, sn, sn, sn, sn, sn, sr, shl, shlr},
+    {sn, sn, sn, sn, sn, sn, sr, shl, shlr},
 /*long_jump */
-    {slr, ss, sn, slr, slr, err, err, sr, shl, shlr},
+    {slr, ss, sn, slr, slr, err, sr, shl, shlr},
 /*long_resume */
-    {clr, ss, sn, clrs, err, err, err, sr, shl, shlr},
+    {clr, ss, sn, err, err, err, sr, shl, shlr},
 /*step_resume */
-    {sr, sr, sr, sr, sr, sr, sr, sr, sr, sr},
+    {sr, sr, sr, sr, sr, sr, sr, sr, sr},
 /*shlib */
-    {shl, shl, shl, shl, shl, shl, shl, sr, shl, shlr},
+    {shl, shl, shl, shl, shl, shl, sr, shl, shlr},
 /*catch_shlib */
-    {shlr, shlr, shlr, shlr, shlr, shlr, shlr, sr, shlr, shlr}
+    {shlr, shlr, shlr, shlr, shlr, shlr, sr, shlr, shlr}
   };
 
 #undef kc
@@ -3256,7 +3253,6 @@ bpstat_what (bpstat bs)
 #undef sgl
 #undef slr
 #undef clr
-#undef clrs
 #undef err
 #undef sr
 #undef ts
@@ -5570,7 +5566,7 @@ break_command_really (char *arg, char *cond_string, int thread,
      breakpoint. */
   if (!pending)
     {
-        if (parse_condition_and_thread)
+      if (parse_condition_and_thread)
         {
             /* Here we only parse 'arg' to separate condition
                from thread number, so parsing in context of first
@@ -5582,7 +5578,7 @@ break_command_really (char *arg, char *cond_string, int thread,
             if (cond_string)
                 make_cleanup (xfree, cond_string);
         }
-        else
+      else
         {
             /* Create a private copy of condition string.  */
             if (cond_string)
This page took 0.034904 seconds and 4 git commands to generate.