aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/async.exp
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2014-03-19 15:22:44 +0000
committerPedro Alves <palves@redhat.com>2014-03-19 15:48:47 +0000
commite2f6c966284e2f204779e9c7becf260bd4fe5117 (patch)
tree2f4da0de2c2fc6bdb2a7803fe0492bab01b73dbc /gdb/testsuite/gdb.base/async.exp
parentc30568d4d17d1a1efa62d2f36651fd0228b0b8e5 (diff)
downloadgdb-e2f6c966284e2f204779e9c7becf260bd4fe5117.zip
gdb-e2f6c966284e2f204779e9c7becf260bd4fe5117.tar.gz
gdb-e2f6c966284e2f204779e9c7becf260bd4fe5117.tar.bz2
gdb.base/async.exp: Don't hardcode line numbers.
gdb/testsuite/ 2014-03-19 Pedro Alves <palves@redhat.com> * gdb.base/async.c (main): Add "jump here" and "until here" line marker comments. * gdb.base/async.exp (jump_here): New global. (jump& test): Use it. (until_here): New global. (until& test): Use it.
Diffstat (limited to 'gdb/testsuite/gdb.base/async.exp')
-rw-r--r--gdb/testsuite/gdb.base/async.exp12
1 files changed, 8 insertions, 4 deletions
diff --git a/gdb/testsuite/gdb.base/async.exp b/gdb/testsuite/gdb.base/async.exp
index 1f465a6..d4b2b2d 100644
--- a/gdb/testsuite/gdb.base/async.exp
+++ b/gdb/testsuite/gdb.base/async.exp
@@ -103,17 +103,21 @@ gdb_expect {
timeout { fail "(timeout) finish &" }
}
-send_gdb "jump 33&\n"
+set jump_here [gdb_get_line_number "jump here"]
+
+send_gdb "jump $jump_here&\n"
gdb_expect {
- -re "^jump 33&.*Continuing at $hex.*$gdb_prompt.*Breakpoint 2, baz \\(\\) at.*async.c.*return 5.*completed\.\r\n" \
+ -re "^jump $jump_here&.*Continuing at $hex.*$gdb_prompt.*Breakpoint 2, baz \\(\\) at.*async.c.*return 5.*completed\.\r\n" \
{ pass "jump &" }
-re ".*$gdb_prompt.*completed\.$" { fail "jump &" }
timeout { fail "(timeout) jump &" }
}
-send_gdb "until 35&\n"
+set until_here [gdb_get_line_number "until here"]
+
+send_gdb "until $until_here&\n"
gdb_expect {
- -re "^until 35&.*$gdb_prompt.*$hex in main \\(\\) at.*async.c.*y = baz \\(\\).*completed\.\r\n" \
+ -re "^until $until_here&.*$gdb_prompt.*$hex in main \\(\\) at.*async.c.*y = baz \\(\\).*completed\.\r\n" \
{ pass "until &" }
-re "$gdb_prompt.*completed\.$" { fail "until &" }
timeout { fail "(timeout) until &" }