gdbarch: Remove displaced_step_free_closure
authorSimon Marchi <simon.marchi@polymtl.ca>
Fri, 9 Jun 2017 22:24:05 +0000 (00:24 +0200)
committerSimon Marchi <simon.marchi@ericsson.com>
Fri, 9 Jun 2017 22:24:50 +0000 (00:24 +0200)
commit6d45d4b42b5b360c0b80259e101c01d650d0be23
tree5cb8bbfb7fcc2b47f9b0749bc16b4cd8362bfab4
parent9845682bda4149b5b3648f2d49a041aef5bc1af5
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.
14 files changed:
gdb/ChangeLog
gdb/aarch64-linux-tdep.c
gdb/amd64-linux-tdep.c
gdb/arch-utils.c
gdb/arch-utils.h
gdb/arm-linux-tdep.c
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/i386-linux-tdep.c
gdb/infrun.c
gdb/rs6000-aix-tdep.c
gdb/rs6000-tdep.c
gdb/s390-linux-tdep.c