From 87fd9e6ed8fdac0661026b7d2a66a9b364fe4bc2 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Tue, 15 Apr 2014 16:11:32 -0700 Subject: [PATCH] * gdb.gdb/selftest.exp (do_steps_and_nexts): Don't reference uninitialized value of "description". --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.gdb/selftest.exp | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 33457c3f44..10dacdd906 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-04-15 Doug Evans + + * gdb.gdb/selftest.exp (do_steps_and_nexts): Don't reference + uninitialized value of "description". + 2014-04-15 Keith Seitz * gdb.mi/mi-simplerun.exp (test_breakpoints_creation_and_listing): diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp index 1d02779c1c..91142fe16d 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 {