aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorSandra Loosemore <sandra@codesourcery.com>2015-08-03 11:09:32 -0700
committerSandra Loosemore <sandra@codesourcery.com>2015-08-03 11:09:32 -0700
commitee2d2b102071f89a04f93f0434df818f69ef1e50 (patch)
treed9f1cfb5bc475c8eecff4f496db7a3805bd08664 /gdb
parent666fcf91c0117da8294207f631df5a97fdc4157c (diff)
downloadgdb-ee2d2b102071f89a04f93f0434df818f69ef1e50.zip
gdb-ee2d2b102071f89a04f93f0434df818f69ef1e50.tar.gz
gdb-ee2d2b102071f89a04f93f0434df818f69ef1e50.tar.bz2
Further robustify gdb.base/bp-permanent.exp.
2015-08-03 Sandra Loosemore <sandra@codesourcery.com> gdb/testsuite/ * gdb.base/bp-permanent.exp: Report test as unsupported if the target cannot stop at the permanent breakpoint.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.base/bp-permanent.exp17
2 files changed, 20 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index d943900..f633c11 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
+
+ * gdb.base/bp-permanent.exp: Report test as unsupported if
+ the target cannot stop at the permanent breakpoint.
+
2015-08-03 Doug Evans <dje@google.com>
* gdb.perf/single-step.exp (SINGLE_STEP_COUNT): Change to 1000 from
diff --git a/gdb/testsuite/gdb.base/bp-permanent.exp b/gdb/testsuite/gdb.base/bp-permanent.exp
index cbdbc75..2bcf147 100644
--- a/gdb/testsuite/gdb.base/bp-permanent.exp
+++ b/gdb/testsuite/gdb.base/bp-permanent.exp
@@ -123,8 +123,21 @@ proc test {always_inserted sw_watchpoint} {
with_test_prefix "basics" {
# Run to the permanent breakpoint, just to make sure we've inserted it
# correctly.
- gdb_test "continue" "Program received signal SIGTRAP.*" \
- "permanent breakpoint causes random signal"
+ # If the target fails to stop, the remainder of the test will not work
+ # so just return. This can happen on some simulator targets where
+ # the running program doesn't see breakpoints that are visible to
+ # the execution engine, or where writes to the .text section are
+ # quietly ignored.
+ set test "permanent breakpoint causes random signal"
+ gdb_test_multiple "continue" $test {
+ -re "exited normally.*$gdb_prompt $" {
+ unsupported "failed to stop at permanent breakpoint"
+ return
+ }
+ -re "Program received signal SIGTRAP.*$gdb_prompt $" {
+ pass $test
+ }
+ }
# Now set a breakpoint on top, thus creating a permanent breakpoint.
gdb_breakpoint "$line_bp"