[gdb/testsuite] Fix gdb.opt/solib-intra-step.exp with -m32
When running test-case gdb.opt/solib-intra-step.exp with target board unix/-m32, we run into: ... (gdb) step^M __x86.get_pc_thunk.bx () at ../sysdeps/i386/crti.S:66^M 66 ../sysdeps/i386/crti.S: No such file or directory.^M (gdb) FAIL: gdb.opt/solib-intra-step.exp: first-hit (optimized) ... The thunk is a helper function for PIC, and given that we have line info for it, we step into. Fix this by allowing the step into the thunk, and stepping out of it. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2021-01-26 Tom de Vries <tdevries@suse.de> * gdb.opt/solib-intra-step.exp: Handle stepping into thunk.
This commit is contained in:
parent
01a01e0ab3
commit
d0021af39c
@ -1,3 +1,7 @@
|
||||
2021-01-26 Tom de Vries <tdevries@suse.de>
|
||||
|
||||
* gdb.opt/solib-intra-step.exp: Handle stepping into thunk.
|
||||
|
||||
2021-01-25 Tom de Vries <tdevries@suse.de>
|
||||
|
||||
* gdb.dwarf2/dw2-ranges-psym.exp (gdb_load_no_complaints): New proc.
|
||||
|
||||
@ -48,33 +48,54 @@ if ![runto_main] then {
|
||||
}
|
||||
|
||||
set test "first-hit"
|
||||
set state 0
|
||||
gdb_test_multiple "step" $test {
|
||||
-re " first-hit .*\r\n$gdb_prompt $" {
|
||||
pass $test
|
||||
-re -wrap " first-hit .*" {
|
||||
gdb_assert { $state != -1 } $test
|
||||
}
|
||||
-re " first-retry .*\r\n$gdb_prompt $" {
|
||||
gdb_test "step" " first-hit .*" "first-hit (optimized)"
|
||||
-re -wrap " first-retry .*" {
|
||||
if { $state != 0 } {
|
||||
set state -1
|
||||
} else {
|
||||
set state 1
|
||||
}
|
||||
send_gdb "step\n"
|
||||
exp_continue
|
||||
}
|
||||
-re -wrap "get_pc_thunk.*" {
|
||||
if { $state != 1 } {
|
||||
set state -1
|
||||
} else {
|
||||
set state 2
|
||||
}
|
||||
send_gdb "step\n"
|
||||
exp_continue
|
||||
}
|
||||
}
|
||||
|
||||
set test "second-hit"
|
||||
set state 0
|
||||
gdb_test_multiple "step" $test {
|
||||
-re " second-hit .*\r\n$gdb_prompt $" {
|
||||
pass $test
|
||||
-re -wrap " second-hit .*" {
|
||||
gdb_assert { $state != -1 } $test
|
||||
}
|
||||
-re " first-retry .*\r\n$gdb_prompt $" {
|
||||
set test "second-hit (optimized 1)"
|
||||
gdb_test_multiple "step" $test {
|
||||
-re " second-hit .*\r\n$gdb_prompt $" {
|
||||
pass $test
|
||||
}
|
||||
-re " first-hit .*\r\n$gdb_prompt $" {
|
||||
gdb_test "step" " second-hit .*" "second-hit (optimized 2)"
|
||||
}
|
||||
-re -wrap " second-retry .*" {
|
||||
if { $state != 0 } {
|
||||
set state -1
|
||||
} else {
|
||||
set state 1
|
||||
}
|
||||
send_gdb "step\n"
|
||||
exp_continue
|
||||
}
|
||||
-re " second-retry .*\r\n$gdb_prompt $" {
|
||||
gdb_test "step" " second-hit .*" "second-hit (optimized 3)"
|
||||
-re -wrap "get_pc_thunk.*" {
|
||||
if { $state != 1 } {
|
||||
set state -1
|
||||
} else {
|
||||
set state 2
|
||||
}
|
||||
send_gdb "step\n"
|
||||
exp_continue
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user