diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2017-06-10 00:24:05 +0200 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2017-06-10 00:24:50 +0200 |
commit | 6d45d4b42b5b360c0b80259e101c01d650d0be23 (patch) | |
tree | 5cb8bbfb7fcc2b47f9b0749bc16b4cd8362bfab4 /gdb/gdbarch.sh | |
parent | 9845682bda4149b5b3648f2d49a041aef5bc1af5 (diff) | |
download | binutils-gdb-6d45d4b42b5b360c0b80259e101c01d650d0be23.tar.gz |
gdbarch: Remove displaced_step_free_closure
The displaced_step_free_closure gdbarch hook allows architectures to
free data they might have allocated to complete a displaced step.
However, all architectures using that hook use the
simple_displaced_step_free_closure provided in arch-utils.{c,h}, which
does a simple xfree. We can remove it and do an xfree directly instead
of calling the hook.
gdb/ChangeLog:
* gdbarch.sh (displaced_step_free_closure): Remove.
* gdbarch.h, gdbarch.c: Re-generate.
* aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
displaced_step_free_closure.
* amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
* arm-linux-tdep.c (arm_linux_init_abi): Likewise.
* i386-linux-tdep.c (i386_linux_init_abi): Likewise.
* rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
* rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
* s390-linux-tdep.c (s390_gdbarch_init): Likewise.
* arch-utils.h (simple_displaced_step_free_closure): Remove.
* arch-utils.c (simple_displaced_step_free_closure): Remove.
* infrun.c (displaced_step_clear): Call xfree instead of
gdbarch_displaced_step_free_closure.
Diffstat (limited to 'gdb/gdbarch.sh')
-rwxr-xr-x | gdb/gdbarch.sh | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 7992cbe355c..22f5715037b 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -833,18 +833,6 @@ m;int;displaced_step_hw_singlestep;struct displaced_step_closure *closure;closur # see the comments in infrun.c. M;void;displaced_step_fixup;struct displaced_step_closure *closure, CORE_ADDR from, CORE_ADDR to, struct regcache *regs;closure, from, to, regs;;NULL -# Free a closure returned by gdbarch_displaced_step_copy_insn. -# -# If you provide gdbarch_displaced_step_copy_insn, you must provide -# this function as well. -# -# If your architecture uses closures that don't need to be freed, then -# you can use simple_displaced_step_free_closure here. -# -# For a general explanation of displaced stepping and how GDB uses it, -# see the comments in infrun.c. -m;void;displaced_step_free_closure;struct displaced_step_closure *closure;closure;;NULL;;(! gdbarch->displaced_step_free_closure) != (! gdbarch->displaced_step_copy_insn) - # Return the address of an appropriate place to put displaced # instructions while we step over them. There need only be one such # place, since we're only stepping one thread over a breakpoint at a |