From e12c771396c1f7bbb6246d97916632af923f6860 Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Tue, 24 Jul 2012 17:37:56 +0000 Subject: [PATCH] 2012-07-20 Marc Khouzam * breakpoint.c (create_breakpoint): Store condition for pending breakpoints. --- gdb/ChangeLog | 5 +++++ gdb/breakpoint.c | 13 ++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 39da5fe7f04..edc25872bcf 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2012-07-20 Marc Khouzam + + * breakpoint.c (create_breakpoint): Store condition for pending + breakpoints. + 2012-07-24 Andreas Schwab * m68k-tdep.c (m68k_reg_struct_return_p): Accept complex types. diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index cbb150f4be4..03719d4debb 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -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; -- 2.30.2