aboutsummaryrefslogtreecommitdiff
path: root/gdb/linux-tdep.c
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2015-06-24 14:53:03 +0100
committerYao Qi <yao.qi@linaro.org>2015-06-24 14:53:03 +0100
commit5cd867b414fe3609dbf596c373343474132775a8 (patch)
treed94b6dfe4b5095790a9bfa3e0d6002f67ec5b2b1 /gdb/linux-tdep.c
parent4d7be0075acd2083772944209c765a7c332a1727 (diff)
downloadgdb-5cd867b414fe3609dbf596c373343474132775a8.zip
gdb-5cd867b414fe3609dbf596c373343474132775a8.tar.gz
gdb-5cd867b414fe3609dbf596c373343474132775a8.tar.bz2
Call set_gdbarch_get_siginfo_type in linux_init_abi
linux_get_siginfo_type is installed to many linux gdbarch. This patch is to move this to a common area linux-tdep.c:linux_init_abi, so that linux_get_siginfo_type is installed to every linux gdbarch. If some linux gdbarch needs its own version, please override it in $ARCH_linux_init_abi. In the testsuite, we enable siginfo related tests for all linux targets. gdb: 2015-06-24 Yao Qi <yao.qi@linaro.org> * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't call set_gdbarch_get_siginfo_type. * 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. * m68klinux-tdep.c (m68k_linux_init_abi): Likewise. * ppc-linux-tdep.c (ppc_linux_init_abi): Likewise. * s390-linux-tdep.c (s390_gdbarch_init): Likewise. * tilegx-linux-tdep.c (tilegx_linux_init_abi): Likewise. * linux-tdep.c (linux_get_siginfo_type): Change it to static. (linux_init_abi): Call set_gdbarch_get_siginfo_type. * linux-tdep.h (linux_get_siginfo_type): Remove the declaration. gdb/testsuite: 2015-06-24 Yao Qi <yao.qi@linaro.org> * lib/gdb.exp (supports_get_siginfo_type): Return 1 for all linux targets.
Diffstat (limited to 'gdb/linux-tdep.c')
-rw-r--r--gdb/linux-tdep.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c
index c81f71b..ff3ada7 100644
--- a/gdb/linux-tdep.c
+++ b/gdb/linux-tdep.c
@@ -243,7 +243,7 @@ get_linux_inferior_data (void)
/* This function is suitable for architectures that don't
extend/override the standard siginfo structure. */
-struct type *
+static struct type *
linux_get_siginfo_type (struct gdbarch *gdbarch)
{
struct linux_gdbarch_data *linux_gdbarch_data;
@@ -2440,6 +2440,7 @@ linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_vsyscall_range (gdbarch, linux_vsyscall_range);
set_gdbarch_infcall_mmap (gdbarch, linux_infcall_mmap);
set_gdbarch_infcall_munmap (gdbarch, linux_infcall_munmap);
+ set_gdbarch_get_siginfo_type (gdbarch, linux_get_siginfo_type);
}
/* Provide a prototype to silence -Wmissing-prototypes. */