|
GDB (xrefs)
|
Go to the source code of this file.
Macros | |
| #define | x86_dr_low_can_set_addr() (x86_dr_low.set_addr != NULL) |
| #define | x86_dr_low_set_addr(new_state, i) (x86_dr_low.set_addr ((i), (new_state)->dr_mirror[(i)])) |
| #define | x86_dr_low_get_addr(i) (x86_dr_low.get_addr ((i))) |
| #define | x86_dr_low_can_set_control() (x86_dr_low.set_control != NULL) |
| #define | x86_dr_low_set_control(new_state) (x86_dr_low.set_control ((new_state)->dr_control_mirror)) |
| #define | x86_dr_low_get_control() (x86_dr_low.get_control ()) |
| #define | x86_dr_low_get_status() (x86_dr_low.get_status ()) |
| #define | x86_get_debug_register_length() (x86_dr_low.debug_register_length) |
| #define | TARGET_HAS_DR_LEN_8 (x86_get_debug_register_length () == 8) |
| #define | DR_CONTROL_SHIFT 16 |
| #define | DR_CONTROL_SIZE 4 |
| #define | DR_RW_EXECUTE (0x0) /* Break on instruction execution. */ |
| #define | DR_RW_WRITE (0x1) /* Break on data writes. */ |
| #define | DR_RW_READ (0x3) /* Break on data reads or writes. */ |
| #define | DR_RW_IORW (0x2) /* Break on I/O reads or writes. */ |
| #define | DR_LEN_1 (0x0 << 2) /* 1-byte region watch or breakpoint. */ |
| #define | DR_LEN_2 (0x1 << 2) /* 2-byte region watch. */ |
| #define | DR_LEN_4 (0x3 << 2) /* 4-byte region watch. */ |
| #define | DR_LEN_8 (0x2 << 2) /* 8-byte region watch (AMD64). */ |
| #define | DR_LOCAL_ENABLE_SHIFT 0 /* Extra shift to the local enable bit. */ |
| #define | DR_GLOBAL_ENABLE_SHIFT 1 /* Extra shift to the global enable bit. */ |
| #define | DR_ENABLE_SIZE 2 /* Two enable bits per debug register. */ |
| #define | DR_LOCAL_SLOWDOWN (0x100) |
| #define | DR_GLOBAL_SLOWDOWN (0x200) |
| #define | DR_CONTROL_RESERVED (0xFC00) |
| #define | X86_DR_CONTROL_MASK (~DR_CONTROL_RESERVED) |
| #define | X86_DR_VACANT(state, i) (((state)->dr_control_mirror & (3 << (DR_ENABLE_SIZE * (i)))) == 0) |
| #define | X86_DR_LOCAL_ENABLE(state, i) |
| #define | X86_DR_GLOBAL_ENABLE(state, i) |
| #define | X86_DR_DISABLE(state, i) |
| #define | X86_DR_SET_RW_LEN(state, i, rwlen) |
| #define | X86_DR_GET_RW_LEN(dr7, i) |
| #define | X86_DR_WATCH_HIT(dr6, i) ((dr6) & (1 << (i))) |
Enumerations | |
| enum | x86_wp_op_t { WP_INSERT, WP_REMOVE, WP_COUNT } |
| #define DR_CONTROL_RESERVED (0xFC00) |
Definition at line 121 of file x86-dregs.c.
| #define DR_CONTROL_SHIFT 16 |
Definition at line 70 of file x86-dregs.c.
| #define DR_CONTROL_SIZE 4 |
Definition at line 72 of file x86-dregs.c.
Definition at line 106 of file x86-dregs.c.
| #define DR_GLOBAL_ENABLE_SHIFT 1 /* Extra shift to the global enable bit. */ |
Definition at line 105 of file x86-dregs.c.
| #define DR_GLOBAL_SLOWDOWN (0x200) |
Definition at line 114 of file x86-dregs.c.
| #define DR_LEN_1 (0x0 << 2) /* 1-byte region watch or breakpoint. */ |
Definition at line 88 of file x86-dregs.c.
Referenced by x86_length_and_rw_bits().
| #define DR_LEN_2 (0x1 << 2) /* 2-byte region watch. */ |
Definition at line 89 of file x86-dregs.c.
Referenced by x86_length_and_rw_bits().
| #define DR_LEN_4 (0x3 << 2) /* 4-byte region watch. */ |
Definition at line 90 of file x86-dregs.c.
Referenced by x86_length_and_rw_bits().
| #define DR_LEN_8 (0x2 << 2) /* 8-byte region watch (AMD64). */ |
Definition at line 91 of file x86-dregs.c.
Referenced by x86_length_and_rw_bits().
| #define DR_LOCAL_ENABLE_SHIFT 0 /* Extra shift to the local enable bit. */ |
Definition at line 104 of file x86-dregs.c.
| #define DR_LOCAL_SLOWDOWN (0x100) |
Definition at line 113 of file x86-dregs.c.
Referenced by x86_insert_aligned_watchpoint(), and x86_remove_aligned_watchpoint().
| #define DR_RW_EXECUTE (0x0) /* Break on instruction execution. */ |
Definition at line 75 of file x86-dregs.c.
Referenced by x86_length_and_rw_bits().
| #define DR_RW_IORW (0x2) /* Break on I/O reads or writes. */ |
Definition at line 83 of file x86-dregs.c.
Referenced by x86_length_and_rw_bits().
| #define DR_RW_READ (0x3) /* Break on data reads or writes. */ |
Definition at line 77 of file x86-dregs.c.
Referenced by x86_length_and_rw_bits().
| #define DR_RW_WRITE (0x1) /* Break on data writes. */ |
Definition at line 76 of file x86-dregs.c.
Referenced by x86_length_and_rw_bits().
| #define TARGET_HAS_DR_LEN_8 (x86_get_debug_register_length () == 8) |
Definition at line 65 of file x86-dregs.c.
Referenced by x86_dr_insert_watchpoint(), x86_dr_remove_watchpoint(), x86_handle_nonaligned_watchpoint(), and x86_length_and_rw_bits().
| #define X86_DR_CONTROL_MASK (~DR_CONTROL_RESERVED) |
Definition at line 126 of file x86-dregs.c.
Referenced by x86_insert_aligned_watchpoint().
| #define X86_DR_DISABLE | ( | state, | |
| i | |||
| ) |
Definition at line 148 of file x86-dregs.c.
Referenced by x86_remove_aligned_watchpoint().
| #define X86_DR_GET_RW_LEN | ( | dr7, | |
| i | |||
| ) |
Definition at line 164 of file x86-dregs.c.
Referenced by x86_dr_stopped_data_address(), x86_insert_aligned_watchpoint(), and x86_remove_aligned_watchpoint().
| #define X86_DR_GLOBAL_ENABLE | ( | state, | |
| i | |||
| ) |
Definition at line 141 of file x86-dregs.c.
| #define X86_DR_LOCAL_ENABLE | ( | state, | |
| i | |||
| ) |
Definition at line 134 of file x86-dregs.c.
Referenced by x86_insert_aligned_watchpoint().
| #define x86_dr_low_can_set_addr | ( | ) | (x86_dr_low.set_addr != NULL) |
Definition at line 38 of file x86-dregs.c.
Referenced by x86_insert_aligned_watchpoint().
| #define x86_dr_low_can_set_control | ( | ) | (x86_dr_low.set_control != NULL) |
Definition at line 48 of file x86-dregs.c.
Referenced by x86_insert_aligned_watchpoint().
| #define x86_dr_low_get_addr | ( | i | ) | (x86_dr_low.get_addr ((i))) |
Definition at line 45 of file x86-dregs.c.
Referenced by x86_dr_stopped_data_address().
| #define x86_dr_low_get_control | ( | ) | (x86_dr_low.get_control ()) |
Definition at line 55 of file x86-dregs.c.
Referenced by x86_dr_stopped_data_address().
| #define x86_dr_low_get_status | ( | ) | (x86_dr_low.get_status ()) |
Definition at line 58 of file x86-dregs.c.
Referenced by x86_dr_stopped_data_address().
| #define x86_dr_low_set_addr | ( | new_state, | |
| i | |||
| ) | (x86_dr_low.set_addr ((i), (new_state)->dr_mirror[(i)])) |
Definition at line 41 of file x86-dregs.c.
Referenced by x86_update_inferior_debug_regs().
| #define x86_dr_low_set_control | ( | new_state | ) | (x86_dr_low.set_control ((new_state)->dr_control_mirror)) |
Definition at line 51 of file x86-dregs.c.
Referenced by x86_update_inferior_debug_regs().
| #define X86_DR_SET_RW_LEN | ( | state, | |
| i, | |||
| rwlen | |||
| ) |
Definition at line 155 of file x86-dregs.c.
Referenced by x86_insert_aligned_watchpoint(), and x86_remove_aligned_watchpoint().
| #define X86_DR_VACANT | ( | state, | |
| i | |||
| ) | (((state)->dr_control_mirror & (3 << (DR_ENABLE_SIZE * (i)))) == 0) |
Definition at line 130 of file x86-dregs.c.
Referenced by x86_insert_aligned_watchpoint(), x86_remove_aligned_watchpoint(), and x86_update_inferior_debug_regs().
| #define X86_DR_WATCH_HIT | ( | dr6, | |
| i | |||
| ) | ((dr6) & (1 << (i))) |
Definition at line 169 of file x86-dregs.c.
Referenced by x86_dr_stopped_data_address().
| #define x86_get_debug_register_length | ( | ) | (x86_dr_low.debug_register_length) |
Definition at line 61 of file x86-dregs.c.
Referenced by x86_show_dr().
| enum x86_wp_op_t |
| Enumerator | |
|---|---|
| WP_INSERT | |
| WP_REMOVE | |
| WP_COUNT | |
Definition at line 172 of file x86-dregs.c.
| int x86_dr_insert_watchpoint | ( | struct x86_debug_reg_state * | state, |
| enum target_hw_bp_type | type, | ||
| CORE_ADDR | addr, | ||
| int | len | ||
| ) |
Definition at line 470 of file x86-dregs.c.
References hw_read, show_debug_regs, TARGET_HAS_DR_LEN_8, WP_INSERT, x86_handle_nonaligned_watchpoint(), x86_insert_aligned_watchpoint(), x86_length_and_rw_bits(), x86_show_dr(), and x86_update_inferior_debug_regs().
Referenced by x86_insert_hw_breakpoint(), and x86_insert_watchpoint().
| int x86_dr_region_ok_for_watchpoint | ( | struct x86_debug_reg_state * | state, |
| CORE_ADDR | addr, | ||
| int | len | ||
| ) |
Definition at line 550 of file x86-dregs.c.
References DR_NADDR, hw_write, WP_COUNT, and x86_handle_nonaligned_watchpoint().
Referenced by x86_region_ok_for_watchpoint().
| int x86_dr_remove_watchpoint | ( | struct x86_debug_reg_state * | state, |
| enum target_hw_bp_type | type, | ||
| CORE_ADDR | addr, | ||
| int | len | ||
| ) |
Definition at line 512 of file x86-dregs.c.
References show_debug_regs, TARGET_HAS_DR_LEN_8, WP_REMOVE, x86_handle_nonaligned_watchpoint(), x86_length_and_rw_bits(), x86_remove_aligned_watchpoint(), x86_show_dr(), and x86_update_inferior_debug_regs().
Referenced by x86_remove_hw_breakpoint(), and x86_remove_watchpoint().
| int x86_dr_stopped_by_watchpoint | ( | struct x86_debug_reg_state * | state | ) |
Definition at line 647 of file x86-dregs.c.
References x86_dr_stopped_data_address().
Referenced by x86_stopped_by_watchpoint().
| int x86_dr_stopped_data_address | ( | struct x86_debug_reg_state * | state, |
| CORE_ADDR * | addr_p | ||
| ) |
Definition at line 567 of file x86-dregs.c.
References ALL_DEBUG_ADDRESS_REGISTERS, hw_write, show_debug_regs, status, X86_DR_GET_RW_LEN, x86_dr_low_get_addr, x86_dr_low_get_control, x86_dr_low_get_status, X86_DR_WATCH_HIT, and x86_show_dr().
Referenced by x86_dr_stopped_by_watchpoint(), and x86_stopped_data_address().
|
static |
Definition at line 382 of file x86-dregs.c.
References _, mips_watchpoint::addr, internal_error(), mips_watchpoint::len, size, TARGET_HAS_DR_LEN_8, WP_COUNT, WP_INSERT, WP_REMOVE, x86_insert_aligned_watchpoint(), x86_length_and_rw_bits(), and x86_remove_aligned_watchpoint().
Referenced by x86_dr_insert_watchpoint(), x86_dr_region_ok_for_watchpoint(), and x86_dr_remove_watchpoint().
|
static |
Definition at line 270 of file x86-dregs.c.
References mips_watchpoint::addr, ALL_DEBUG_ADDRESS_REGISTERS, x86_debug_reg_state::dr_control_mirror, DR_LOCAL_SLOWDOWN, x86_debug_reg_state::dr_mirror, DR_NADDR, x86_debug_reg_state::dr_ref_count, X86_DR_CONTROL_MASK, X86_DR_GET_RW_LEN, X86_DR_LOCAL_ENABLE, x86_dr_low_can_set_addr, x86_dr_low_can_set_control, X86_DR_SET_RW_LEN, and X86_DR_VACANT.
Referenced by x86_dr_insert_watchpoint(), and x86_handle_nonaligned_watchpoint().
|
static |
Definition at line 214 of file x86-dregs.c.
References _, DR_LEN_1, DR_LEN_2, DR_LEN_4, DR_LEN_8, DR_RW_EXECUTE, DR_RW_IORW, DR_RW_READ, DR_RW_WRITE, hw_access, hw_execute, hw_read, hw_write, internal_error(), mips_watchpoint::len, and TARGET_HAS_DR_LEN_8.
Referenced by x86_dr_insert_watchpoint(), x86_dr_remove_watchpoint(), and x86_handle_nonaligned_watchpoint().
|
static |
Definition at line 330 of file x86-dregs.c.
References mips_watchpoint::addr, ALL_DEBUG_ADDRESS_REGISTERS, x86_debug_reg_state::dr_control_mirror, DR_LOCAL_SLOWDOWN, x86_debug_reg_state::dr_mirror, x86_debug_reg_state::dr_ref_count, gdb_assert, X86_DR_DISABLE, X86_DR_GET_RW_LEN, X86_DR_SET_RW_LEN, and X86_DR_VACANT.
Referenced by x86_dr_remove_watchpoint(), and x86_handle_nonaligned_watchpoint().
|
static |
Definition at line 177 of file x86-dregs.c.
References mips_watchpoint::addr, ALL_DEBUG_ADDRESS_REGISTERS, debug_printf(), x86_debug_reg_state::dr_control_mirror, x86_debug_reg_state::dr_mirror, x86_debug_reg_state::dr_ref_count, x86_debug_reg_state::dr_status_mirror, func, hw_access, hw_execute, hw_read, hw_write, mips_watchpoint::len, phex(), and x86_get_debug_register_length.
Referenced by x86_dr_insert_watchpoint(), x86_dr_remove_watchpoint(), and x86_dr_stopped_data_address().
|
static |
Definition at line 446 of file x86-dregs.c.
References ALL_DEBUG_ADDRESS_REGISTERS, x86_debug_reg_state::dr_control_mirror, x86_debug_reg_state::dr_mirror, gdb_assert, x86_dr_low_set_addr, x86_dr_low_set_control, and X86_DR_VACANT.
Referenced by x86_dr_insert_watchpoint(), and x86_dr_remove_watchpoint().
1.8.14