aboutsummaryrefslogtreecommitdiff
path: root/gdb
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
commit4d7be0075acd2083772944209c765a7c332a1727 (patch)
treec34d01a6c78f9f7f61eb225e4f803dfad992f973 /gdb
parentdc06243f6f87aa52222dab0ef45bb9a5119724da (diff)
downloadgdb-4d7be0075acd2083772944209c765a7c332a1727.zip
gdb-4d7be0075acd2083772944209c765a7c332a1727.tar.gz
gdb-4d7be0075acd2083772944209c765a7c332a1727.tar.bz2
New proc supports_get_siginfo_type
Both siginfo-obj.exp and siginfo-thread.exp have the same code checking the support of geting a type of siginfo for a given arch. This patch is to move these code into a proc supports_get_siginfo_type. gdb/testsuite: 2015-06-24 Yao Qi <yao.qi@linaro.org> * lib/gdb.exp (supports_get_siginfo_type): New proc. * gdb.base/siginfo-obj.exp: Invoke supports_get_siginfo_type. * gdb.base/siginfo-thread.exp: Likewise.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/gdb.base/siginfo-obj.exp4
-rw-r--r--gdb/testsuite/gdb.base/siginfo-thread.exp4
-rw-r--r--gdb/testsuite/lib/gdb.exp13
4 files changed, 21 insertions, 6 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 3c8ecc0..c209fe6 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2015-06-24 Yao Qi <yao.qi@linaro.org>
+
+ * lib/gdb.exp (supports_get_siginfo_type): New proc.
+ * gdb.base/siginfo-obj.exp: Invoke supports_get_siginfo_type.
+ * gdb.base/siginfo-thread.exp: Likewise.
+
2015-06-22 Yao Qi <yao.qi@linaro.org>
* boards/remote-gdbserver-on-localhost.exp: Add comments.
diff --git a/gdb/testsuite/gdb.base/siginfo-obj.exp b/gdb/testsuite/gdb.base/siginfo-obj.exp
index 0d1b96d..578c12e 100644
--- a/gdb/testsuite/gdb.base/siginfo-obj.exp
+++ b/gdb/testsuite/gdb.base/siginfo-obj.exp
@@ -26,9 +26,7 @@ if [target_info exists gdb,nosignals] {
continue
}
-if { ! [istarget "i?86-*-linux*"]
- && ! [istarget "x86_64-*-linux*"]
- && ! [istarget "arm*-*-linux*"] } {
+if { ![supports_get_siginfo_type] } {
verbose "Skipping siginfo-obj.exp because of lack of support."
return
}
diff --git a/gdb/testsuite/gdb.base/siginfo-thread.exp b/gdb/testsuite/gdb.base/siginfo-thread.exp
index 638bef3..a00b5aa 100644
--- a/gdb/testsuite/gdb.base/siginfo-thread.exp
+++ b/gdb/testsuite/gdb.base/siginfo-thread.exp
@@ -21,9 +21,7 @@ if [target_info exists gdb,nosignals] {
continue
}
-if { ! [istarget "i?86-*-linux*"]
- && ! [istarget "x86_64-*-linux*"]
- && ! [istarget "arm*-*-linux*"] } {
+if { ![supports_get_siginfo_type] } {
verbose "Skipping siginfo-thread.exp because of lack of support."
return
}
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 9edf2dc..761f7d1 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -1996,6 +1996,19 @@ gdb_caching_proc support_complex_tests {
return $result
}
+# Return 1 if GDB can get a type for siginfo from the target, otherwise
+# return 0.
+
+proc supports_get_siginfo_type {} {
+ if { [istarget "i?86-*-linux*"]
+ || [istarget "x86_64-*-linux*"]
+ || [istarget "arm*-*-linux*"] } {
+ return 1
+ } else {
+ return 0
+ }
+}
+
# Return 1 if target hardware or OS supports single stepping to signal
# handler, otherwise, return 0.