GDBserver
|
#include "break-common.h"
Go to the source code of this file.
Macros | |
#define | Z_PACKET_SW_BP '0' |
#define | Z_PACKET_HW_BP '1' |
#define | Z_PACKET_WRITE_WP '2' |
#define | Z_PACKET_READ_WP '3' |
#define | Z_PACKET_ACCESS_WP '4' |
Enumerations | |
enum | raw_bkpt_type { raw_bkpt_type_sw, raw_bkpt_type_hw, raw_bkpt_type_write_wp, raw_bkpt_type_read_wp, raw_bkpt_type_access_wp } |
#define Z_PACKET_ACCESS_WP '4' |
Definition at line 36 of file mem-break.h.
Referenced by aarch64_supports_z_point_type(), arm_supports_z_point_type(), cris_supports_z_point_type(), i386_supports_z_point_type(), mips_supports_z_point_type(), nto_supports_z_point_type(), x86_supports_z_point_type(), and Z_packet_to_raw_bkpt_type().
#define Z_PACKET_HW_BP '1' |
Definition at line 33 of file mem-break.h.
Referenced by aarch64_supports_z_point_type(), arm_supports_z_point_type(), gdb_breakpoint_here(), gdb_condition_true_at_breakpoint(), gdb_no_commands_at_breakpoint(), nto_supports_z_point_type(), run_breakpoint_commands(), set_gdb_breakpoint_1(), x86_supports_z_point_type(), and Z_packet_to_raw_bkpt_type().
#define Z_PACKET_READ_WP '3' |
Definition at line 35 of file mem-break.h.
Referenced by aarch64_supports_z_point_type(), arm_supports_z_point_type(), cris_supports_z_point_type(), mips_supports_z_point_type(), nto_supports_z_point_type(), and Z_packet_to_raw_bkpt_type().
#define Z_PACKET_SW_BP '0' |
Definition at line 32 of file mem-break.h.
Referenced by aarch64_supports_z_point_type(), delete_gdb_breakpoint(), gdb_breakpoint_here(), gdb_condition_true_at_breakpoint(), gdb_no_commands_at_breakpoint(), nto_supports_z_point_type(), run_breakpoint_commands(), set_gdb_breakpoint(), set_gdb_breakpoint_1(), x86_supports_z_point_type(), and Z_packet_to_raw_bkpt_type().
#define Z_PACKET_WRITE_WP '2' |
Definition at line 34 of file mem-break.h.
Referenced by aarch64_supports_z_point_type(), arm_supports_z_point_type(), cris_supports_z_point_type(), i386_supports_z_point_type(), mips_supports_z_point_type(), nto_supports_z_point_type(), x86_supports_z_point_type(), and Z_packet_to_raw_bkpt_type().
enum raw_bkpt_type |
Enumerator | |
---|---|
raw_bkpt_type_sw | |
raw_bkpt_type_hw | |
raw_bkpt_type_write_wp | |
raw_bkpt_type_read_wp | |
raw_bkpt_type_access_wp |
Definition at line 40 of file mem-break.h.
int add_breakpoint_commands | ( | struct breakpoint * | bp, |
char ** | commands, | ||
int | persist | ||
) |
Definition at line 1282 of file mem-break.c.
References add_commands_to_breakpoint(), and gdb_parse_agent_expr().
Referenced by process_point_options().
int add_breakpoint_condition | ( | struct breakpoint * | bp, |
char ** | condition | ||
) |
Definition at line 1183 of file mem-break.c.
References add_condition_to_breakpoint(), and gdb_parse_agent_expr().
Referenced by process_point_options().
int any_persistent_commands | ( | void | ) |
Definition at line 246 of file mem-break.c.
References process_info::breakpoints, breakpoint::command_list, current_process(), point_command_list::next, breakpoint::next, and point_command_list::persistence.
Referenced by process_serial_event().
int breakpoint_here | ( | CORE_ADDR | addr | ) |
Definition at line 1599 of file mem-break.c.
References current_process(), raw_breakpoint::next, raw_breakpoint::pc, raw_bkpt_type_hw, raw_bkpt_type_sw, process_info::raw_breakpoints, and raw_breakpoint::raw_type.
Referenced by linux_wait_1(), and need_step_over_p().
int breakpoint_inserted_here | ( | CORE_ADDR | addr | ) |
Definition at line 1614 of file mem-break.c.
References current_process(), raw_breakpoint::inserted, raw_breakpoint::next, raw_breakpoint::pc, raw_bkpt_type_hw, raw_bkpt_type_sw, process_info::raw_breakpoints, and raw_breakpoint::raw_type.
Referenced by linux_wait_1().
void check_breakpoints | ( | CORE_ADDR | stop_pc | ) |
Definition at line 1553 of file mem-break.c.
References process_info::breakpoints, current_process(), breakpoint::handler, raw_breakpoint::inserted, breakpoint::next, raw_breakpoint::pc, breakpoint::raw, raw_bkpt_type_hw, raw_bkpt_type_sw, raw_breakpoint::raw_type, release_breakpoint(), and warning().
Referenced by handle_exception(), and linux_wait_1().
void check_mem_read | ( | CORE_ADDR | mem_addr, |
unsigned char * | buf, | ||
int | mem_len | ||
) |
Definition at line 1723 of file mem-break.c.
References breakpoint_len, current_process(), delete_disabled_breakpoints(), fast_tracepoint_jump_shadow, process_info::fast_tracepoint_jumps, gdb_assert, raw_breakpoint::inserted, fast_tracepoint_jump::inserted, fast_tracepoint_jump::length, raw_breakpoint::next, fast_tracepoint_jump::next, raw_breakpoint::old_data, raw_breakpoint::pc, fast_tracepoint_jump::pc, raw_bkpt_type_sw, process_info::raw_breakpoints, raw_breakpoint::raw_type, and validate_inserted_breakpoint().
Referenced by read_inferior_memory().
void check_mem_write | ( | CORE_ADDR | mem_addr, |
unsigned char * | buf, | ||
const unsigned char * | myaddr, | ||
int | mem_len | ||
) |
Definition at line 1806 of file mem-break.c.
References breakpoint_data, breakpoint_len, current_process(), delete_disabled_breakpoints(), fast_tracepoint_jump_insn, fast_tracepoint_jump_shadow, process_info::fast_tracepoint_jumps, gdb_assert, raw_breakpoint::inserted, fast_tracepoint_jump::inserted, fast_tracepoint_jump::length, raw_breakpoint::next, fast_tracepoint_jump::next, raw_breakpoint::old_data, raw_breakpoint::pc, fast_tracepoint_jump::pc, raw_bkpt_type_sw, process_info::raw_breakpoints, raw_breakpoint::raw_type, and validate_inserted_breakpoint().
Referenced by write_inferior_memory().
void clear_breakpoint_conditions_and_commands | ( | struct breakpoint * | bp | ) |
Definition at line 1157 of file mem-break.c.
References clear_breakpoint_commands(), and clear_breakpoint_conditions().
Referenced by delete_gdb_breakpoint_1(), and process_serial_event().
void clone_all_breakpoints | ( | struct breakpoint ** | new_bkpt_list, |
struct raw_breakpoint ** | new_raw_bkpt_list, | ||
const struct breakpoint * | src | ||
) |
Definition at line 2003 of file mem-break.c.
References APPEND_TO_LIST, clone_one_breakpoint(), breakpoint::next, and breakpoint::raw.
Referenced by handle_extended_wait().
void delete_all_breakpoints | ( | void | ) |
Definition at line 1898 of file mem-break.c.
References process_info::breakpoints, current_process(), and delete_breakpoint_1().
int delete_breakpoint | ( | struct breakpoint * | bkpt | ) |
Definition at line 888 of file mem-break.c.
References current_process(), and delete_breakpoint_1().
Referenced by clear_installed_tracepoints(), delete_gdb_breakpoint_1(), linux_wait_1(), maybe_move_out_of_jump_pad(), remove_thread_event_breakpoints(), set_gdb_breakpoint_1(), stop_tracing(), and upload_fast_traceframes().
int delete_fast_tracepoint_jump | ( | struct fast_tracepoint_jump * | todel | ) |
Definition at line 500 of file mem-break.c.
References alloca(), current_process(), debug_printf(), debug_threads, fast_tracepoint_jump_shadow, process_info::fast_tracepoint_jumps, fast_tracepoint_jump::length, fast_tracepoint_jump::next, paddress(), fast_tracepoint_jump::pc, fast_tracepoint_jump::refcount, strerror(), warning(), and write_inferior_memory().
Referenced by clear_installed_tracepoints().
int delete_gdb_breakpoint | ( | char | z_type, |
CORE_ADDR | addr, | ||
int | size | ||
) |
Definition at line 1080 of file mem-break.c.
References check_gdb_bp_preconditions(), delete_gdb_breakpoint_1(), done_accessing_memory, prepare_to_access_memory, and Z_PACKET_SW_BP.
Referenced by process_serial_event().
void delete_reinsert_breakpoints | ( | void | ) |
Definition at line 1402 of file mem-break.c.
References process_info::breakpoints, current_process(), breakpoint::next, reinsert_breakpoint, release_breakpoint(), and breakpoint::type.
Referenced by finish_step_over().
int fast_tracepoint_jump_here | ( | CORE_ADDR | ) |
Definition at line 492 of file mem-break.c.
References find_fast_tracepoint_jump_at().
Referenced by need_step_over_p().
void free_all_breakpoints | ( | struct process_info * | proc | ) |
Definition at line 1921 of file mem-break.c.
References process_info::breakpoints, delete_breakpoint_1(), and mark_breakpoints_out().
Referenced by remove_process().
int gdb_breakpoint_here | ( | CORE_ADDR | where | ) |
Definition at line 1385 of file mem-break.c.
References find_gdb_breakpoint(), Z_PACKET_HW_BP, and Z_PACKET_SW_BP.
Referenced by linux_wait_1(), move_out_of_jump_pad_callback(), need_step_over_p(), and stuck_in_jump_pad_callback().
int gdb_condition_true_at_breakpoint | ( | CORE_ADDR | where | ) |
Definition at line 1254 of file mem-break.c.
References gdb_condition_true_at_breakpoint_z_type(), Z_PACKET_HW_BP, and Z_PACKET_SW_BP.
Referenced by linux_wait_1(), and need_step_over_p().
int gdb_no_commands_at_breakpoint | ( | CORE_ADDR | where | ) |
Definition at line 1332 of file mem-break.c.
References gdb_no_commands_at_breakpoint_z_type(), Z_PACKET_HW_BP, and Z_PACKET_SW_BP.
Referenced by linux_wait_1(), and need_step_over_p().
int hardware_breakpoint_inserted_here | ( | CORE_ADDR | addr | ) |
Definition at line 1649 of file mem-break.c.
References current_process(), raw_breakpoint::inserted, raw_breakpoint::next, raw_breakpoint::pc, raw_bkpt_type_hw, process_info::raw_breakpoints, and raw_breakpoint::raw_type.
Referenced by check_stopped_by_breakpoint(), and thread_still_has_status_pending_p().
void inc_ref_fast_tracepoint_jump | ( | struct fast_tracepoint_jump * | jp | ) |
Definition at line 562 of file mem-break.c.
References fast_tracepoint_jump::refcount.
Referenced by clone_fast_tracepoint().
int insert_memory_breakpoint | ( | struct raw_breakpoint * | bp | ) |
Definition at line 299 of file mem-break.c.
References breakpoint_data, breakpoint_len, debug_printf(), debug_threads, MAX_BREAKPOINT_LEN, raw_breakpoint::old_data, paddress(), raw_breakpoint::pc, read_inferior_memory(), raw_breakpoint::size, strerror(), the_target, and target_ops::write_memory.
Referenced by linux_insert_point().
void mark_breakpoints_out | ( | struct process_info * | proc | ) |
Definition at line 1909 of file mem-break.c.
References raw_breakpoint::inserted, raw_breakpoint::next, and process_info::raw_breakpoints.
Referenced by free_all_breakpoints(), and handle_target_event().
enum target_hw_bp_type raw_bkpt_type_to_target_hw_bp_type | ( | enum raw_bkpt_type | raw_type | ) |
Definition at line 195 of file mem-break.c.
References hw_access, hw_execute, hw_read, hw_write, internal_error(), raw_bkpt_type_access_wp, raw_bkpt_type_hw, raw_bkpt_type_read_wp, and raw_bkpt_type_write_wp.
Referenced by aarch64_insert_point(), aarch64_remove_point(), i386_insert_point(), i386_remove_point(), mips_insert_point(), mips_remove_point(), x86_insert_point(), and x86_remove_point().
void reinsert_all_breakpoints | ( | void | ) |
Definition at line 1540 of file mem-break.c.
References current_process(), raw_breakpoint::inserted, raw_breakpoint::next, raw_bkpt_type_hw, raw_bkpt_type_sw, process_info::raw_breakpoints, raw_breakpoint::raw_type, and reinsert_raw_breakpoint().
Referenced by run_inferior_command().
void reinsert_breakpoints_at | ( | CORE_ADDR | where | ) |
Definition at line 1512 of file mem-break.c.
References current_process(), debug_printf(), debug_threads, raw_breakpoint::next, paddress(), raw_breakpoint::pc, raw_bkpt_type_hw, raw_bkpt_type_sw, process_info::raw_breakpoints, raw_breakpoint::raw_type, and reinsert_raw_breakpoint().
Referenced by finish_step_over().
void reinsert_fast_tracepoint_jumps_at | ( | CORE_ADDR | where | ) |
Definition at line 689 of file mem-break.c.
References alloca(), debug_printf(), debug_threads, error(), fast_tracepoint_jump_shadow, find_fast_tracepoint_jump_at(), fast_tracepoint_jump::inserted, fast_tracepoint_jump::length, paddress(), strerror(), and write_inferior_memory().
Referenced by finish_step_over().
int remove_memory_breakpoint | ( | struct raw_breakpoint * | bp | ) |
Definition at line 348 of file mem-break.c.
References breakpoint_len, debug_printf(), debug_threads, MAX_BREAKPOINT_LEN, raw_breakpoint::old_data, paddress(), raw_breakpoint::pc, strerror(), and write_inferior_memory().
Referenced by linux_remove_point().
void run_breakpoint_commands | ( | CORE_ADDR | where | ) |
Definition at line 1374 of file mem-break.c.
References run_breakpoint_commands_z_type(), Z_PACKET_HW_BP, and Z_PACKET_SW_BP.
Referenced by linux_wait_1().
struct breakpoint* set_breakpoint_at | ( | CORE_ADDR | where, |
int(*)(CORE_ADDR) | handler | ||
) |
Definition at line 773 of file mem-break.c.
References breakpoint_len, breakpoint::handler, other_breakpoint, raw_bkpt_type_sw, and set_breakpoint().
Referenced by cmd_qtstart(), get_child_debug_event(), install_tracepoint(), maybe_move_out_of_jump_pad(), set_reinsert_breakpoint(), thread_db_enable_reporting(), and upload_fast_traceframes().
void set_breakpoint_data | ( | const unsigned char * | bp_data, |
int | bp_len | ||
) |
Definition at line 1592 of file mem-break.c.
References breakpoint_data, and breakpoint_len.
Referenced by initialize_low().
struct fast_tracepoint_jump* set_fast_tracepoint_jump | ( | CORE_ADDR | where, |
unsigned char * | insn, | ||
ULONGEST | length | ||
) |
Definition at line 568 of file mem-break.c.
References alloca(), current_process(), debug_printf(), debug_threads, fast_tracepoint_jump_insn, fast_tracepoint_jump_shadow, process_info::fast_tracepoint_jumps, find_fast_tracepoint_jump_at(), fast_tracepoint_jump::inserted, fast_tracepoint_jump::length, fast_tracepoint_jump::next, paddress(), fast_tracepoint_jump::pc, read_inferior_memory(), fast_tracepoint_jump::refcount, strerror(), write_inferior_memory(), and xcalloc().
Referenced by install_fast_tracepoint(), and tracepoint_send_agent().
struct breakpoint* set_gdb_breakpoint | ( | char | z_type, |
CORE_ADDR | addr, | ||
int | size, | ||
int * | err | ||
) |
Definition at line 1027 of file mem-break.c.
References check_gdb_bp_preconditions(), done_accessing_memory, prepare_to_access_memory, set_gdb_breakpoint_1(), and Z_PACKET_SW_BP.
Referenced by process_serial_event().
void set_reinsert_breakpoint | ( | CORE_ADDR | stop_at | ) |
Definition at line 1393 of file mem-break.c.
References reinsert_breakpoint, set_breakpoint_at(), and breakpoint::type.
Referenced by start_step_over().
int software_breakpoint_inserted_here | ( | CORE_ADDR | addr | ) |
Definition at line 1632 of file mem-break.c.
References current_process(), raw_breakpoint::inserted, raw_breakpoint::next, raw_breakpoint::pc, raw_bkpt_type_sw, process_info::raw_breakpoints, and raw_breakpoint::raw_type.
void uninsert_all_breakpoints | ( | void | ) |
Definition at line 1483 of file mem-break.c.
References current_process(), raw_breakpoint::inserted, raw_breakpoint::next, raw_bkpt_type_hw, raw_bkpt_type_sw, process_info::raw_breakpoints, raw_breakpoint::raw_type, and uninsert_raw_breakpoint().
Referenced by run_inferior_command().
void uninsert_breakpoints_at | ( | CORE_ADDR | where | ) |
Definition at line 1454 of file mem-break.c.
References current_process(), debug_printf(), debug_threads, raw_breakpoint::inserted, raw_breakpoint::next, paddress(), raw_breakpoint::pc, raw_bkpt_type_hw, raw_bkpt_type_sw, process_info::raw_breakpoints, raw_breakpoint::raw_type, and uninsert_raw_breakpoint().
Referenced by start_step_over().
void uninsert_fast_tracepoint_jumps_at | ( | CORE_ADDR | pc | ) |
Definition at line 641 of file mem-break.c.
References alloca(), debug_printf(), debug_threads, fast_tracepoint_jump_shadow, find_fast_tracepoint_jump_at(), fast_tracepoint_jump::inserted, fast_tracepoint_jump::length, paddress(), fast_tracepoint_jump::pc, strerror(), and write_inferior_memory().
Referenced by start_step_over().
void validate_breakpoints | ( | void | ) |
Definition at line 1706 of file mem-break.c.
References process_info::breakpoints, current_process(), delete_disabled_breakpoints(), raw_breakpoint::inserted, breakpoint::next, breakpoint::raw, raw_bkpt_type_sw, raw_breakpoint::raw_type, and validate_inserted_breakpoint().
Referenced by handle_query(), and set_gdb_breakpoint_1().
enum raw_bkpt_type Z_packet_to_raw_bkpt_type | ( | char | z_type | ) |
Definition at line 226 of file mem-break.c.
References gdb_assert_not_reached, raw_bkpt_type_access_wp, raw_bkpt_type_hw, raw_bkpt_type_read_wp, raw_bkpt_type_sw, raw_bkpt_type_write_wp, Z_PACKET_ACCESS_WP, Z_PACKET_HW_BP, Z_PACKET_READ_WP, Z_PACKET_SW_BP, and Z_PACKET_WRITE_WP.
Referenced by set_gdb_breakpoint_1().