aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2022-03-10 19:38:03 +0000
committerAndrew Burgess <aburgess@redhat.com>2022-03-11 14:36:49 +0000
commit8bdc7ff421aa5f07dd99ea7b446fb3fc2f0a3127 (patch)
treeb8db8e7e1973afbb815ce7b12c7bad34a3cd2316 /gdb
parentbb368aad297fe3ad40cf397e6fc85aa471429a28 (diff)
downloadgdb-8bdc7ff421aa5f07dd99ea7b446fb3fc2f0a3127.zip
gdb-8bdc7ff421aa5f07dd99ea7b446fb3fc2f0a3127.tar.gz
gdb-8bdc7ff421aa5f07dd99ea7b446fb3fc2f0a3127.tar.bz2
gdb/testsuite: remove duplicates from gdb.base/stap-probe.exp
Remove the duplicate test names from gdb.base/stap-probe.exp, this is done by actually passing a unique test name in a couple of places (rather than using the command as the test name), and in another couple of places, a test has a duplicate name due to a cut & paste error, which I've fixed. There's no change in what is actually being tested after this commit.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/gdb.base/stap-probe.exp17
1 files changed, 11 insertions, 6 deletions
diff --git a/gdb/testsuite/gdb.base/stap-probe.exp b/gdb/testsuite/gdb.base/stap-probe.exp
index 6d52187..e86c789 100644
--- a/gdb/testsuite/gdb.base/stap-probe.exp
+++ b/gdb/testsuite/gdb.base/stap-probe.exp
@@ -29,7 +29,9 @@ proc stap_test {exec_name {args ""}} {
set semaphore_addr_var ""
if {[string first "-DUSE_SEMAPHORES" $args] == -1} {
gdb_test_no_output "set breakpoint always-inserted on"
- set semaphore_addr_var [get_hexadecimal_valueof "&relocation_marker" "0"]
+ set semaphore_addr_var \
+ [get_hexadecimal_valueof "&relocation_marker" "0"\
+ "get original address of relocation_marker"]
}
if ![runto_main] {
@@ -54,8 +56,11 @@ proc stap_test {exec_name {args ""}} {
}
if {[string first "-DUSE_SEMAPHORES" $args] == -1} {
+ set updated_semaphore_addr_var \
+ [get_hexadecimal_valueof "&relocation_marker" \
+ "0" "get revised relocation_marker address"]
set relocation_base \
- [expr [get_hexadecimal_valueof "&relocation_marker" "0"] - $semaphore_addr_var]
+ [expr $updated_semaphore_addr_var - $semaphore_addr_var]
if {$relocation_base != 0} {
# Checks that GDB doesn't mistakenly relocate and write to null
# semaphore addresses. If it were to relocate a zero-valued
@@ -103,9 +108,9 @@ proc stap_test {exec_name {args ""}} {
# Reinit GDB, set a breakpoint on probe ps.
delete_breakpoints
if {[runto "-pstap test:ps"]} {
- pass "run to -pstap test:m4"
+ pass "run to -pstap test:ps"
} else {
- fail "run to -pstap test:m4"
+ fail "run to -pstap test:ps"
}
gdb_test "print \$_probe_argc" " = 3" \
@@ -169,9 +174,9 @@ proc stap_test_no_debuginfo {exec_name {args ""}} {
# Reinit GDB, set a breakpoint on probe ps.
delete_breakpoints
if {[runto "-pstap test:ps"]} {
- pass "run to -pstap test:m4"
+ pass "run to -pstap test:ps"
} else {
- fail "run to -pstap test:m4"
+ fail "run to -pstap test:ps"
}
gdb_test "print \$_probe_argc" " = 3" \