diff options
author | Hui Zhu <teawater@gmail.com> | 2013-04-23 02:42:44 +0000 |
---|---|---|
committer | Hui Zhu <teawater@gmail.com> | 2013-04-23 02:42:44 +0000 |
commit | 2d9442cc40e3cda16f5a7515729f38d8637354f3 (patch) | |
tree | 9d1760c2655cac60b1906110ecc4af1b6a84534d /gdb/breakpoint.c | |
parent | e91d998a2401635ea353a52314086be8e39ce345 (diff) | |
download | gdb-2d9442cc40e3cda16f5a7515729f38d8637354f3.zip gdb-2d9442cc40e3cda16f5a7515729f38d8637354f3.tar.gz gdb-2d9442cc40e3cda16f5a7515729f38d8637354f3.tar.bz2 |
2013-04-23 Hui Zhu <hui@codesourcery.com>
PR gdb/15165
* breakpoint.c (dprintf_print_recreate): New.
(save_breakpoints): Let it not save dprintf commands.
(initialize_breakpoint_ops): Set dprintf_print_recreate.
2013-04-23 Hui Zhu <hui@codesourcery.com>
PR gdb/15165
* gdb.base/save-bp.exp: Add test for dprintf.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 2757c6b..84c5b46 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -13364,6 +13364,16 @@ dprintf_re_set (struct breakpoint *b) update_dprintf_command_list (b); } +/* Implement the "print_recreate" breakpoint_ops method for dprintf. */ + +static void +dprintf_print_recreate (struct breakpoint *tp, struct ui_file *fp) +{ + fprintf_unfiltered (fp, "dprintf %s%s", tp->addr_string, + tp->extra_string); + print_recreate_thread (tp, fp); +} + /* The breakpoint_ops structure to be used on static tracepoints with markers (`-m'). */ @@ -15453,7 +15463,7 @@ save_breakpoints (char *filename, int from_tty, if (tp->ignore_count) fprintf_unfiltered (fp, " ignore $bpnum %d\n", tp->ignore_count); - if (tp->commands) + if (tp->type != bp_dprintf && tp->commands) { volatile struct gdb_exception ex; @@ -15859,7 +15869,7 @@ initialize_breakpoint_ops (void) ops->resources_needed = bkpt_resources_needed; ops->print_it = bkpt_print_it; ops->print_mention = bkpt_print_mention; - ops->print_recreate = bkpt_print_recreate; + ops->print_recreate = dprintf_print_recreate; } /* Chain containing all defined "enable breakpoint" subcommands. */ |