summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2020-05-06 14:13:02 +0200
committerTom de Vries <tdevries@suse.de>2020-05-06 14:13:02 +0200
commitb8983c46637eaafe808f9c5b3f95c10e1f824402 (patch)
tree720a47f107758a446cc682afc7881b9ca1f09ca1
parentabf6d805a0dfa792fdf232dabd7de18d2fe20834 (diff)
downloadbinutils-gdb-b8983c46637eaafe808f9c5b3f95c10e1f824402.tar.gz
[gdb/testsuite] Fix cur_addr update in gdb.base/watchpoint-reuse-slot.exp
I noticed this code in gdb.base/watchpoint-reuse-slot.exp, proc stepi: ... gdb_test_multiple "stepi" $test { -re "($hex).*[string_to_regexp $srcline]\r\n$gdb_prompt $" { set addr $expect_out(1,string) if {$addr != $cur_addr} { pass $test } else { fail $test } set cur_addr addr } } ... The variable cur_addr is documented as: ... # The address the program is stopped at currently. set cur_addr "" ... but in the gdb_test_multiple clause we assign the string "addr" to cur_addr, while $addr contains the current address. Fix this by assigning $addr instead "addr". Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2020-05-06 Tom de Vries <tdevries@suse.de> * gdb.base/watchpoint-reuse-slot.exp: Fix incorrect assignment.
-rw-r--r--gdb/testsuite/ChangeLog4
-rw-r--r--gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp2
2 files changed, 5 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 7a62fe8ce77..fde713527d6 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,9 @@
2020-05-06 Tom de Vries <tdevries@suse.de>
+ * gdb.base/watchpoint-reuse-slot.exp: Fix incorrect assignment.
+
+2020-05-06 Tom de Vries <tdevries@suse.de>
+
* gdb.base/store.exp (check_set, up_set): Allowing missing location
info for r.
diff --git a/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp b/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp
index 73213787c61..83b970380ca 100644
--- a/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp
@@ -73,7 +73,7 @@ proc stepi {} {
} else {
fail $test
}
- set cur_addr addr
+ set cur_addr $addr
}
}
}