2012-07-20 Marc Khouzam <marc.khouzam@ericsson.com>
authorMarc Khouzam <marc.khouzam@ericsson.com>
Tue, 24 Jul 2012 17:37:56 +0000 (17:37 +0000)
committerMarc Khouzam <marc.khouzam@ericsson.com>
Tue, 24 Jul 2012 17:37:56 +0000 (17:37 +0000)
* breakpoint.c (create_breakpoint): Store condition for pending
breakpoints.

gdb/ChangeLog
gdb/breakpoint.c

index 39da5fe7f04e02262589cd4a11811575f4fef21a..edc25872bcf4f70d257431ba043102cc0413bedd 100644 (file)
@@ -1,3 +1,8 @@
+2012-07-20  Marc Khouzam  <marc.khouzam@ericsson.com>
+
+       * breakpoint.c (create_breakpoint): Store condition for pending
+       breakpoints.
+
 2012-07-24  Andreas Schwab  <schwab@linux-m68k.org>
 
        * m68k-tdep.c (m68k_reg_struct_return_p): Accept complex types.
index cbb150f4be4388f65331b8a96fb4a980c7c0cea0..03719d4debb0cb042d285d5317504ad72f143b2b 100644 (file)
@@ -9557,7 +9557,18 @@ create_breakpoint (struct gdbarch *gdbarch,
       init_raw_breakpoint_without_location (b, gdbarch, type_wanted, ops);
 
       b->addr_string = copy_arg;
-      b->cond_string = NULL;
+      if (parse_condition_and_thread)
+       b->cond_string = NULL;
+      else
+       {
+         /* Create a private copy of condition string.  */
+         if (cond_string)
+           {
+             cond_string = xstrdup (cond_string);
+             make_cleanup (xfree, cond_string);
+           }
+         b->cond_string = cond_string;
+       }
       b->extra_string = NULL;
       b->ignore_count = ignore_count;
       b->disposition = tempflag ? disp_del : disp_donttouch;