const regs_info *get_regs_info () override;
+ const gdb_byte *sw_breakpoint_from_kind (int kind, int *size) override;
+
+ bool supports_z_point_type (char z_type) override;
+
protected:
void low_arch_setup () override;
CORE_ADDR low_get_pc (regcache *regcache) override;
void low_set_pc (regcache *regcache, CORE_ADDR newpc) override;
+
+ int low_decr_pc_after_break () override;
+
+ bool low_breakpoint_at (CORE_ADDR pc) override;
};
/* The singleton target ops object. */
supply_register_by_name (regcache, "eip", &newpc);
}
}
+
+int
+x86_target::low_decr_pc_after_break ()
+{
+ return 1;
+}
+
\f
static const gdb_byte x86_breakpoint[] = { 0xCC };
#define x86_breakpoint_len 1
-static int
-x86_breakpoint_at (CORE_ADDR pc)
+bool
+x86_target::low_breakpoint_at (CORE_ADDR pc)
{
unsigned char c;
- the_target->read_memory (pc, &c, 1);
+ read_memory (pc, &c, 1);
if (c == 0xCC)
- return 1;
+ return true;
- return 0;
+ return false;
}
\f
/* Low-level function vector. */
\f
/* Breakpoint/Watchpoint support. */
-static int
-x86_supports_z_point_type (char z_type)
+bool
+x86_target::supports_z_point_type (char z_type)
{
switch (z_type)
{
case Z_PACKET_HW_BP:
case Z_PACKET_WRITE_WP:
case Z_PACKET_ACCESS_WP:
- return 1;
+ return true;
default:
- return 0;
+ return false;
}
}
return &i386_emit_ops;
}
-/* Implementation of linux_target_ops method "sw_breakpoint_from_kind". */
+/* Implementation of target ops method "sw_breakpoint_from_kind". */
-static const gdb_byte *
-x86_sw_breakpoint_from_kind (int kind, int *size)
+const gdb_byte *
+x86_target::sw_breakpoint_from_kind (int kind, int *size)
{
*size = x86_breakpoint_len;
return x86_breakpoint;
struct linux_target_ops the_low_target =
{
- NULL, /* breakpoint_kind_from_pc */
- x86_sw_breakpoint_from_kind,
- NULL,
- 1,
- x86_breakpoint_at,
- x86_supports_z_point_type,
x86_insert_point,
x86_remove_point,
x86_stopped_by_watchpoint,
x86_emit_ops,
x86_get_min_fast_tracepoint_insn_len,
x86_supports_range_stepping,
- NULL, /* breakpoint_kind_from_current_state */
x86_supports_hardware_single_step,
x86_get_syscall_trapinfo,
x86_get_ipa_tdesc_idx,