This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Add dynamic printf. * breakpoint.h (enum bptype): New type bp_dprintf. (struct bp_target_info): New field commands and persist. (struct bp_location): New field cmd_bytecode. (struct breakpoint): New field extra_string. * breakpoint.c (dprintf_breakpoint_ops): New. (disconnected_dprintf): New global. (is_breakpoint): Add bp_dprintf. (parse_format_string): New function. (parse_cmd_to_aexpr): New function. (build_target_command_list): New function. (insert_bp_location): Call it. (remove_breakpoints_pid): Skip dprintf breakpoints. (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. (glob_extra_string): New global. (init_breakpoint_sal): Handle extra string. (addr_string_to_sals): Ditto. (find_condition_and_thread): Add extra argument. (create_breakpoint): Save away additional text at end of command. (dprintf_command): New function. (_initialize_breakpoint): Add new commands. * common/ax.def (printf): New bytecode. * ax-gdb.c (gen_printf): New function. (agent_print_command): New function. (_initialize_ax_gdb): Add maint agent-printf command. * ax-gdb.h (gen_printf): Declare. * ax-general.c (ax_print): Add printf disassembly. * remote.c (remote_state) <cond_breakpoints>: New field. (PACKET_BreakpointCommandss): 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] * 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.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. * mem-break.h (any_persistent_commands): Declare. (add_breakpoint_commands): Declare. (gdb_no_commands_at_breakpoint): Declare. (run_breakpoint_commands): Declare. * linux-low.c (linux_wait_1): Test for and run breakpoint commands locally. * ax.c (gdb_eval_agent_expr): Add printf opcode.
[doc] * gdb.texinfo (Dynamic Printf): New subsection.
Attachment:
dprintf-patch-1
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |