aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2017-10-13 15:22:17 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2017-10-19 20:50:42 +0100
commit49a4ce2eae231ae627ab9a312256c6e402b5a27e (patch)
tree79db92decf2e85e1e297b73439451e2ebc61e745
parent63929e843d54d327676bed4d86dad280f4675547 (diff)
downloadgdb-49a4ce2eae231ae627ab9a312256c6e402b5a27e.zip
gdb-49a4ce2eae231ae627ab9a312256c6e402b5a27e.tar.gz
gdb-49a4ce2eae231ae627ab9a312256c6e402b5a27e.tar.bz2
gdb: Remove hard-coded line number from test
Removes the use of a hard-coded line number from a test. gdb/testsuite/ChangeLog: * gdb.linespec/ls-errs.exp (do_test): Update comment, use line number from variable rather than hard-coded.
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.linespec/ls-errs.exp4
2 files changed, 7 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index e8f95ed..6a984ae 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2017-10-19 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * gdb.linespec/ls-errs.exp (do_test): Update comment, use line
+ number from variable rather than hard-coded.
+
2017-10-19 Pedro Alves <palves@redhat.com>
* gdb.base/long-inferior-output.c: New file.
diff --git a/gdb/testsuite/gdb.linespec/ls-errs.exp b/gdb/testsuite/gdb.linespec/ls-errs.exp
index f55cd0e..ee8bb08 100644
--- a/gdb/testsuite/gdb.linespec/ls-errs.exp
+++ b/gdb/testsuite/gdb.linespec/ls-errs.exp
@@ -117,10 +117,10 @@ proc do_test {lang} {
foreach x $invalid_offsets {
set offset $x
- # Relative offsets are relative to line 16. Adjust
+ # Relative offsets are relative to the current line. Adjust
# expected offset from error message accordingly.
if {[string index $x 0] == "+" || [string index $x 0] == "-"} {
- incr offset 24
+ incr offset $bp_location
}
test_break $x invalid_offset $offset
test_break "-line $x" invalid_offset $offset