aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.gdb
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2014-04-15 16:11:32 -0700
committerDoug Evans <dje@google.com>2014-04-15 16:13:19 -0700
commit87fd9e6ed8fdac0661026b7d2a66a9b364fe4bc2 (patch)
treebec8181ffaf3e6dbe23ffb10f2b0251a697de54b /gdb/testsuite/gdb.gdb
parentbfb1f6c31687a01e2763a30c8ca92e0426afb725 (diff)
downloadgdb-87fd9e6ed8fdac0661026b7d2a66a9b364fe4bc2.zip
gdb-87fd9e6ed8fdac0661026b7d2a66a9b364fe4bc2.tar.gz
gdb-87fd9e6ed8fdac0661026b7d2a66a9b364fe4bc2.tar.bz2
* gdb.gdb/selftest.exp (do_steps_and_nexts): Don't reference
uninitialized value of "description".
Diffstat (limited to 'gdb/testsuite/gdb.gdb')
-rw-r--r--gdb/testsuite/gdb.gdb/selftest.exp8
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp
index 1d02779..91142fe 100644
--- a/gdb/testsuite/gdb.gdb/selftest.exp
+++ b/gdb/testsuite/gdb.gdb/selftest.exp
@@ -222,7 +222,13 @@ proc do_steps_and_nexts {} {
set command "next"
}
-re ".*$gdb_prompt $" {
- fail "unknown source line after $description"
+ # If $description hasn't been set yet, it's likely the file
+ # has been edited but gdb hasn't been recompiled.
+ if [info exists description] {
+ fail "unknown source line (after $description)"
+ } else {
+ fail "unknown source line"
+ }
return
}
default {