From 6d45d4b42b5b360c0b80259e101c01d650d0be23 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Sat, 10 Jun 2017 00:24:05 +0200 Subject: 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. --- gdb/arch-utils.h | 7 ------- 1 file changed, 7 deletions(-) (limited to 'gdb/arch-utils.h') diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h index 040afca..2aa9159 100644 --- a/gdb/arch-utils.h +++ b/gdb/arch-utils.h @@ -85,13 +85,6 @@ extern struct displaced_step_closure * CORE_ADDR from, CORE_ADDR to, struct regcache *regs); -/* Simple implementation of gdbarch_displaced_step_free_closure: Call - xfree. - This is appropriate for use with simple_displaced_step_copy_insn. */ -extern void - simple_displaced_step_free_closure (struct gdbarch *gdbarch, - struct displaced_step_closure *closure); - /* Default implementation of gdbarch_displaced_hw_singlestep. */ extern int default_displaced_step_hw_singlestep (struct gdbarch *, -- cgit v1.1