diff options
author | Yao Qi <yao.qi@linaro.org> | 2016-11-03 14:35:13 +0000 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2016-11-03 14:35:13 +0000 |
commit | d19280adb5b2d1470dc39756ccac8a8fa2af8321 (patch) | |
tree | c452ae7ecd2c45f4dfbfe404eb4bd5a7c99aaf28 /gdb/tic6x-tdep.c | |
parent | 44f1c4d7b0160a51ecf7fe1af42416f1d2a71356 (diff) | |
download | gdb-d19280adb5b2d1470dc39756ccac8a8fa2af8321.zip gdb-d19280adb5b2d1470dc39756ccac8a8fa2af8321.tar.gz gdb-d19280adb5b2d1470dc39756ccac8a8fa2af8321.tar.bz2 |
Split breakpoint_from_pc to breakpoint_kind_from_pc and sw_breakpoint_from_kind
We convert each ARCH_breakpoint_from_pc to ARCH_breakpoint_kind_from_pc
and ARCH_sw_breakpoint_from_kind. Note that gdbarch doesn't have methods
breakpoint_kind_from_pc and sw_breakpoint_from_kind so far.
gdb:
2016-11-03 Yao Qi <yao.qi@linaro.org>
* arch-utils.h (GDBARCH_BREAKPOINT_FROM_PC): New macro.
(GDBARCH_BREAKPOINT_MANIPULATION_ENDIAN): New macro.
* arm-tdep.c (arm_breakpoint_from_pc): Remove.
(arm_breakpoint_kind_from_pc): New function.
(arm_sw_breakpoint_from_kind): New function.
(arm_breakpoint_from_pc): Call arm_breakpoint_kind_from_pc
and arm_sw_breakpoint_from_kind.
Use GDBARCH_BREAKPOINT_FROM_PC.
(arm_remote_breakpoint_from_pc): Call
arm_breakpoint_kind_from_pc.
(arm_gdbarch_init): Replace set_gdbarch_breakpoint_from_pc
with SET_GDBARCH_BREAKPOINT_MANIPULATION.
* arc-tdep.c: Likewise.
* bfin-tdep.c: Likewise.
* cris-tdep.c: Likewise.
* iq2000-tdep.c: Likewise.
* m32r-tdep.c: Likewise.
* mips-tdep.c: Likewise.
* mt-tdep.c: Likewise.
* nios2-tdep.c: Likewise.
* rs6000-tdep.c: Likewise.
* score-tdep.c: Likewise.
* sh-tdep.c: Likewise.
* sh64-tdep.c: Likewise.
* tic6x-tdep.c: Likewise.
* v850-tdep.c: Likewise.
* xtensa-tdep.c: Likewise.
Diffstat (limited to 'gdb/tic6x-tdep.c')
-rw-r--r-- | gdb/tic6x-tdep.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/gdb/tic6x-tdep.c b/gdb/tic6x-tdep.c index adb7f50..9957947 100644 --- a/gdb/tic6x-tdep.c +++ b/gdb/tic6x-tdep.c @@ -318,15 +318,18 @@ tic6x_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc) NULL); } -/* This is the implementation of gdbarch method breakpiont_from_pc. */ +static int +tic6x_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr) +{ + return 4; +} static const gdb_byte * -tic6x_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *bp_addr, - int *bp_size) +tic6x_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size) { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); - *bp_size = 4; + *size = kind; if (tdep == NULL || tdep->breakpoint == NULL) { @@ -339,6 +342,10 @@ tic6x_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *bp_addr, return tdep->breakpoint; } +/* This is the implementation of gdbarch method breakpiont_from_pc. */ + +GDBARCH_BREAKPOINT_FROM_PC (tic6x) + /* This is the implementation of gdbarch method print_insn. */ static int @@ -1295,7 +1302,7 @@ tic6x_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_inner_than (gdbarch, core_addr_lessthan); set_gdbarch_skip_prologue (gdbarch, tic6x_skip_prologue); - set_gdbarch_breakpoint_from_pc (gdbarch, tic6x_breakpoint_from_pc); + SET_GDBARCH_BREAKPOINT_MANIPULATION (tic6x); set_gdbarch_unwind_pc (gdbarch, tic6x_unwind_pc); set_gdbarch_unwind_sp (gdbarch, tic6x_unwind_sp); |