* gdb.gdb/selftest.exp (do_steps_and_nexts): Don't reference
authorDoug Evans <dje@google.com>
Tue, 15 Apr 2014 23:11:32 +0000 (16:11 -0700)
committerDoug Evans <dje@google.com>
Tue, 15 Apr 2014 23:13:19 +0000 (16:13 -0700)
uninitialized value of "description".

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.gdb/selftest.exp

index 33457c3f44a508fd8417a287092aa6994734925f..10dacdd906eda428a4be0297a8159ce0b4e3ec76 100644 (file)
@@ -1,3 +1,8 @@
+2014-04-15  Doug Evans  <dje@google.com>
+
+       * gdb.gdb/selftest.exp (do_steps_and_nexts): Don't reference
+       uninitialized value of "description".
+
 2014-04-15  Keith Seitz  <keiths@redhat.com>
 
        * gdb.mi/mi-simplerun.exp (test_breakpoints_creation_and_listing):
index 1d02779c1c5c5c5735547561e34a73cad7d13803..91142fe16d7675f3c8b5391a37366a14373884ba 100644 (file)
@@ -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 {