[2/2] Add aarch64-linux in supports_get_siginfo_type

Message ID 1434971017-22494-2-git-send-email-yao.qi@linaro.org
State New, archived
Headers

Commit Message

Yao Qi June 22, 2015, 11:03 a.m. UTC
  gdbarch method get_siginfo_type is implemented on aaarch64-linux, so
supports_get_siginfo_type should return 1 on aaarch64-linux.

gdb/testsuite:

2015-06-22  Yao Qi  <yao.qi@linaro.org>

	* lib/gdb.exp (supports_get_siginfo_type): Add aarch64-linux.
---
 gdb/testsuite/lib/gdb.exp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Pedro Alves June 24, 2015, 10:45 a.m. UTC | #1
On 06/22/2015 12:03 PM, Yao Qi wrote:
> gdbarch method get_siginfo_type is implemented on aaarch64-linux, so
> supports_get_siginfo_type should return 1 on aaarch64-linux.

typo: aaarch64.

(Patch looks obvious to me.)

I note that a few other archs are also missing here:

 aarch64-linux-tdep.c:  set_gdbarch_get_siginfo_type (gdbarch, linux_get_siginfo_type);
 amd64-linux-tdep.c:  set_gdbarch_get_siginfo_type (gdbarch, linux_get_siginfo_type);
 arm-linux-tdep.c:  set_gdbarch_get_siginfo_type (gdbarch, linux_get_siginfo_type);
 i386-linux-tdep.c:  set_gdbarch_get_siginfo_type (gdbarch, linux_get_siginfo_type);
 m68klinux-tdep.c:  set_gdbarch_get_siginfo_type (gdbarch, linux_get_siginfo_type);
 ppc-linux-tdep.c:  set_gdbarch_get_siginfo_type (gdbarch, linux_get_siginfo_type);
 s390-linux-tdep.c:  set_gdbarch_get_siginfo_type (gdbarch, linux_get_siginfo_type);
 tilegx-linux-tdep.c:  set_gdbarch_get_siginfo_type (gdbarch, linux_get_siginfo_type);

though at the pace this is taking, it'd probably be better to register
linux_get_siginfo_type as default for all Linux archs (in linux-tdep.c:linux_init_abi),
and have archs whoch kernel/ABI uses the non-generic siginfo layout install a
custom get_siginfo_type version.  The supports_get_siginfo_type testsuite function
would then return true for [istarget "*-*-linux*"].  The testsuite would then help
show which archs would those be.

Thanks,
Pedro Alves
  

Patch

diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index d3ed56f..47221cb 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -2002,7 +2002,8 @@  gdb_caching_proc support_complex_tests {
 proc supports_get_siginfo_type {} {
     if { [istarget "i?86-*-linux*"]
 	 || [istarget "x86_64-*-linux*"]
-	 || [istarget "arm*-*-linux*"] } {
+	 || [istarget "arm*-*-linux*"]
+	 || [istarget "aarch64*-*-linux*"] } {
 	return 1
     } else {
 	return 0