From 833b7ab5008b769dca6db6d5ee1d21d33e730132 Mon Sep 17 00:00:00 2001 From: Yao Qi Date: Thu, 3 Nov 2016 14:35:14 +0000 Subject: Determine the kind of single step breakpoint This patch adds a new gdbarch method breakpoint_kind_from_current_state for single step breakpoint, and uses it in breakpoint_kind. gdb: 2016-11-03 Yao Qi * arch-utils.c (default_breakpoint_kind_from_current_state): New function. * arch-utils.h (default_breakpoint_kind_from_current_state): Declare. * arm-tdep.c (arm_breakpoint_kind_from_current_state): New function. (arm_gdbarch_init): Call set_gdbarch_breakpoint_kind_from_current_state. * breakpoint.c (breakpoint_kind): Call gdbarch_breakpoint_kind_from_current_state for single step breakpoint. Update comments. * gdbarch.sh (breakpoint_kind_from_current_state): New. * gdbarch.c, gdbarch.h: Regenerate. --- gdb/arch-utils.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gdb/arch-utils.h') diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h index 791725d..9592580 100644 --- a/gdb/arch-utils.h +++ b/gdb/arch-utils.h @@ -218,6 +218,10 @@ extern const gdb_byte *default_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr); +extern int default_breakpoint_kind_from_current_state (struct gdbarch *gdbarch, + struct regcache *regcache, + CORE_ADDR *pcptr); + extern void default_gen_return_address (struct gdbarch *gdbarch, struct agent_expr *ax, struct axs_value *value, -- cgit v1.1