aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2011-09-18 02:36:27 +0000
committerYao Qi <yao@codesourcery.com>2011-09-18 02:36:27 +0000
commitab254057b844245b5db8d8faa397c1f69f48c889 (patch)
tree6e2309fce74d98c098ce84df1eb599024d96b1ba
parentf5b1e24db05c9e804b8c2dc46ab6712a98a04b9f (diff)
downloadgdb-ab254057b844245b5db8d8faa397c1f69f48c889.zip
gdb-ab254057b844245b5db8d8faa397c1f69f48c889.tar.gz
gdb-ab254057b844245b5db8d8faa397c1f69f48c889.tar.bz2
gdb/testsuite/
* lib/gdb.exp (can_single_step_to_signal_handler): New. * gdb.base/kill-after-signal.exp: Call it. Skip if target doesn't support single step to signal handler.
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/gdb.base/kill-after-signal.exp6
-rw-r--r--gdb/testsuite/lib/gdb.exp16
3 files changed, 28 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index e48d7c2..132351a 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,11 @@
2011-09-17 Yao Qi <yao@codesourcery.com>
+ * lib/gdb.exp (can_single_step_to_signal_handler): New.
+ * gdb.base/kill-after-signal.exp: Call it. Skip if target doesn't
+ support single step to signal handler.
+
+2011-09-17 Yao Qi <yao@codesourcery.com>
+
* gdb.base/disp-step-fork.c: New.
* gdb.base/disp-step-syscall.exp: New.
* gdb.base/disp-step-vfork.c: New.
diff --git a/gdb/testsuite/gdb.base/kill-after-signal.exp b/gdb/testsuite/gdb.base/kill-after-signal.exp
index eecad2e..8bb0659 100644
--- a/gdb/testsuite/gdb.base/kill-after-signal.exp
+++ b/gdb/testsuite/gdb.base/kill-after-signal.exp
@@ -14,6 +14,12 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
set testfile "kill-after-signal"
+
+if { ![can_single_step_to_signal_handler] } {
+ untested ${testfile}.exp
+ return
+}
+
if [prepare_for_testing ${testfile}.exp ${testfile}] {
return -1
}
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index b22e322..1476c19 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -1527,6 +1527,22 @@ proc support_complex_tests {} {
return $support_complex_tests_saved
}
+# Return 1 if target hardware or OS supports single stepping to signal
+# handler, otherwise, return 0.
+
+proc can_single_step_to_signal_handler {} {
+
+ # Targets don't have hardware single step. On these targets, when
+ # a signal is delivered during software single step, gdb is unable
+ # to determine the next instruction addresses, because start of signal
+ # handler is one of them.
+ if { [istarget "arm*-*-*"] || [istarget "mips*-*-*"] } {
+ return 0
+ }
+
+ return 1
+}
+
# Return 1 if target is ILP32.
# This cannot be decided simply from looking at the target string,
# as it might depend on externally passed compiler options like -m64.