This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
src/gdb ChangeLog Makefile.in NEWS ax-gdb.c ax ...
- From: shebs at sourceware dot org
- To: gdb-cvs at sourceware dot org
- Date: 2 Jul 2012 15:29:39 -0000
- Subject: src/gdb ChangeLog Makefile.in NEWS ax-gdb.c ax ...
CVSROOT: /cvs/src
Module name: src
Changes by: shebs@sourceware.org 2012-07-02 15:29:39
Modified files:
gdb : ChangeLog Makefile.in NEWS ax-gdb.c ax-gdb.h
ax-general.c ax.h breakpoint.c breakpoint.h
printcmd.c remote.c target.c target.h
gdb/common : ax.def
gdb/doc : ChangeLog agentexpr.texi gdb.texinfo
gdb/gdbserver : ChangeLog Makefile.in ax.c linux-low.c
mem-break.c mem-break.h server.c
gdb/testsuite : ChangeLog
gdb/testsuite/gdb.base: dprintf.exp
Added files:
gdb/common : format.c format.h
Log message:
Add target-side support for dynamic printf.
* NEWS: Mention the additional style.
* breakpoint.h (struct bp_target_info): New fields tcommands, persist.
(struct bp_location): New field cmd_bytecode.
* breakpoint.c: Include format.h.
(disconnected_dprintf): New global.
(parse_cmd_to_aexpr): New function.
(build_target_command_list): New function.
(insert_bp_location): Call it.
(remove_breakpoints_pid): Skip dprintf breakpoints.
(print_one_breakpoint_location): Ditto.
(dprintf_style_agent): New global.
(dprintf_style_enums): Add dprintf_style_agent.
(update_dprintf_command_list): Add agent case.
(agent_printf_command): New function.
(_initialize_breakpoint): Add new commands.
* common/ax.def (printf): New bytecode.
* ax.h (ax_string): Declare.
* ax-gdb.h (gen_printf): Declare.
* ax-gdb.c: Include cli-utils.h, format.h.
(gen_printf): New function.
(maint_agent_print_command): New function.
(_initialize_ax_gdb): Add maint agent-printf command.
* ax-general.c (ax_string): New function.
(ax_print): Add printf disassembly.
* Makefile.in (SFILES): Add format.c
(COMMON_OBS): Add format.o.
* common/format.h: New file.
* common/format.c: New file.
* printcmd.c: Include format.h.
(ui_printf): Call parse_format_string.
* remote.c (remote_state): New field breakpoint_commands.
(PACKET_BreakpointCommands): New enum.
(remote_breakpoint_commands_feature): New function.
(remote_protocol_features): Add new BreakpointCommands entry.
(remote_can_run_breakpoint_commands): New function.
(remote_add_target_side_commands): New function.
(remote_insert_breakpoint): Call it.
(remote_insert_hw_breakpoint): Ditto.
(_initialize_remote): Add new packet configuration for
target-side breakpoint commands.
* target.h (struct target_ops): New field
to_can_run_breakpoint_commands.
(target_can_run_breakpoint_commands): New macro.
* target.c (update_current_target): Handle
to_can_run_breakpoint_commands.
[gdbserver]
* Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
(ax.o): Add it to build rule.
(ax-ipa.o): Ditto.
(OBS): Add format.o.
(IPA_OBS): Add format.o.
* server.c (handle_query): Claim support for breakpoint commands.
(process_point_options): Add command case.
(process_serial_event): Leave running if there are printfs in
effect.
* mem-break.h (any_persistent_commands): Declare.
(add_breakpoint_commands): Declare.
(gdb_no_commands_at_breakpoint): Declare.
(run_breakpoint_commands): Declare.
* mem-break.c (struct point_command_list): New struct.
(struct breakpoint): New field command_list.
(any_persistent_commands): New function.
(add_commands_to_breakpoint): New function.
(add_breakpoint_commands): New function.
(gdb_no_commands_at_breakpoint): New function.
(run_breakpoint_commands): New function.
* linux-low.c (linux_wait_1): Test for and run breakpoint commands
locally.
* ax.c: Include format.h.
(ax_printf): New function.
(gdb_eval_agent_expr): Add printf opcode.
[doc]
* gdb.texinfo (Dynamic Printf): Mention agent style and
disconnected dprintf.
(Maintenance Commands): Describe maint agent-printf.
(General Query Packets): Mention BreakpointCommands feature.
(Packets): Document commands extension to Z0 packet.
* agentexpr.texi (Bytecode Descriptions): Document printf
bytecode.
[testsuite]
* gdb.base/dprintf.exp: Add agent style tests.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.14422&r2=1.14423
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/Makefile.in.diff?cvsroot=src&r1=1.1209&r2=1.1210
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/NEWS.diff?cvsroot=src&r1=1.531&r2=1.532
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ax-gdb.c.diff?cvsroot=src&r1=1.101&r2=1.102
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ax-gdb.h.diff?cvsroot=src&r1=1.24&r2=1.25
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ax-general.c.diff?cvsroot=src&r1=1.29&r2=1.30
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ax.h.diff?cvsroot=src&r1=1.21&r2=1.22
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/breakpoint.c.diff?cvsroot=src&r1=1.688&r2=1.689
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/breakpoint.h.diff?cvsroot=src&r1=1.185&r2=1.186
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/printcmd.c.diff?cvsroot=src&r1=1.208&r2=1.209
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/remote.c.diff?cvsroot=src&r1=1.501&r2=1.502
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/target.c.diff?cvsroot=src&r1=1.310&r2=1.311
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/target.h.diff?cvsroot=src&r1=1.239&r2=1.240
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/common/format.c.diff?cvsroot=src&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/common/format.h.diff?cvsroot=src&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/common/ax.def.diff?cvsroot=src&r1=1.6&r2=1.7
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/doc/ChangeLog.diff?cvsroot=src&r1=1.1342&r2=1.1343
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/doc/agentexpr.texi.diff?cvsroot=src&r1=1.17&r2=1.18
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/doc/gdb.texinfo.diff?cvsroot=src&r1=1.987&r2=1.988
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/gdbserver/ChangeLog.diff?cvsroot=src&r1=1.628&r2=1.629
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/gdbserver/Makefile.in.diff?cvsroot=src&r1=1.134&r2=1.135
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/gdbserver/ax.c.diff?cvsroot=src&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/gdbserver/linux-low.c.diff?cvsroot=src&r1=1.224&r2=1.225
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/gdbserver/mem-break.c.diff?cvsroot=src&r1=1.33&r2=1.34
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/gdbserver/mem-break.h.diff?cvsroot=src&r1=1.25&r2=1.26
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/gdbserver/server.c.diff?cvsroot=src&r1=1.174&r2=1.175
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.3266&r2=1.3267
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.base/dprintf.exp.diff?cvsroot=src&r1=1.3&r2=1.4