summaryrefslogtreecommitdiff
path: root/gdb/NEWS
diff options
context:
space:
mode:
authorStan Shebs <shebs@apple.com>2012-05-14 15:38:31 +0000
committerStan Shebs <shebs@apple.com>2012-05-14 15:38:31 +0000
commit70ddfe4b74c70244b3236aef2c68392a674ac105 (patch)
treebfea3fff5cdf1fb45b0fbde9865e18c1f165e70a /gdb/NEWS
parent6e456a5234aa257cdb73135ad8e4a865b7d87abb (diff)
downloadgdb-70ddfe4b74c70244b3236aef2c68392a674ac105.tar.gz
2012-05-14 Stan Shebs <stan@codesourcery.com>
Add dynamic printf. * breakpoint.h (enum bptype): New type bp_dprintf. (struct breakpoint): New field extra_string. (struct breakpoint_ops): Add arg to create_breakpoints_sal. (create_breakpoint): Add extra_string arg. * breakpoint.c (dprintf_breakpoint_ops): New. (is_breakpoint): Add bp_dprintf. (bpstat_what): Add dprintf case. (bptype_string): Ditto. (print_one_breakpoint_location): Ditto. (init_bp_location): Ditto. (bkpt_print_mention): Ditto. (dprintf_style_enums): New array. (dprintf_style): New global. (dprintf_function): New global. (dprintf_channel): New global. (update_dprintf_command_list): New function. (update_dprintf_commands): New function. (init_breakpoint_sal): Add extra_string argument, handle it. (create_breakpoint_sal): Add extra_string argument. (create_breakpoints_sal): Add extra_string argument, update callers. (find_condition_and_thread): Add extra argument. (create_breakpoint): Add extra_string argument, record it. (dprintf_command): New function. (break_command_1): Add arg to create_breakpoint call. (handle_gnu_v3_exceptions): Ditto. (trace_command): Ditto. (ftrace_command): Ditto. (strace_command): Ditto. (bkpt_print_mention): Add dprintf case. (create_breakpoint_sal_default): Add extra_string argument. (_initialize_breakpoint): Add new commands. * mi/mi-cmd-break.c (mi_cmd_break_insert): Add arg to call. * python/py-breakpoint.c (bppy_init): Ditto. * python/py-finishbreakpoint.c (bpfinishpy_init): Ditto. * gdb.texinfo (Dynamic Printf): New subsection. * gdb.base/dprintf.c: New file. * gdb.base/dprintf.exp: New file.
Diffstat (limited to 'gdb/NEWS')
-rw-r--r--gdb/NEWS18
1 files changed, 18 insertions, 0 deletions
diff --git a/gdb/NEWS b/gdb/NEWS
index dd1ab24043c..4ddd990d780 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -142,6 +142,11 @@
"info auto-load python-scripts", "set auto-load python-scripts on|off"
and "show auto-load python-scripts" counterparts instead.
+ ** "dprintf location,format,args..." creates a dynamic printf, which
+ is basically a breakpoint that does a printf and immediately
+ resumes your program's execution, so it is like a printf that you
+ can insert dynamically at runtime instead of at compiletime.
+
* New targets
Renesas RL78 rl78-*-elf
@@ -200,6 +205,19 @@ set debug auto-load on|off
show debug auto-load
Control display of debugging info for auto-loading the files above.
+set dprintf-style gdb|call
+show dprintf-style
+ Control the way in which a dynamic printf is performed; "gdb" requests
+ a GDB printf command, while "call" causes dprintf to call a function
+ in the inferior.
+
+set dprintf-function <expr>
+show dprintf-function
+set dprintf-channel <expr>
+show dprintf-channel
+ Set the function and optional first argument to the call when using
+ the "call" style of dynamic printf.
+
* New configure options
--with-auto-load-dir