diff options
author | Tom de Vries <tdevries@suse.de> | 2023-01-25 15:24:17 +0100 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2023-01-25 15:24:17 +0100 |
commit | d25a8dbc7c3ae12aea8a203ce64f78608e22daa0 (patch) | |
tree | b93a254662b5453440c9914414177b55d94195a0 /gdb/testsuite | |
parent | 621271c7819c3337e3eb5e48b7a7ee66573543da (diff) | |
download | gdb-d25a8dbc7c3ae12aea8a203ce64f78608e22daa0.zip gdb-d25a8dbc7c3ae12aea8a203ce64f78608e22daa0.tar.gz gdb-d25a8dbc7c3ae12aea8a203ce64f78608e22daa0.tar.bz2 |
[gdb/testsuite] Allow debug srcfile2 in gdb.base/unwind-on-each-insn.exp
Test-case gdb.base/unwind-on-each-insn.exp compiles $srcfile with debug info, and
$srcfile2 without.
Occasionally, I try both files with debug info:
...
- $srcfile $debug_flags $srcfile2 $nodebug_flags]]} {
+ $srcfile $debug_flags $srcfile2 $debug_flags]]} {
...
This shortcuts the test due to no longer recognizing that stepi still lands
in foo.
Fix this by determining whether still in foo by checking the info frame output.
Tested on x86_64-linux.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/gdb.base/unwind-on-each-insn.exp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.base/unwind-on-each-insn.exp b/gdb/testsuite/gdb.base/unwind-on-each-insn.exp index d6f90dd..059967a 100644 --- a/gdb/testsuite/gdb.base/unwind-on-each-insn.exp +++ b/gdb/testsuite/gdb.base/unwind-on-each-insn.exp @@ -142,9 +142,11 @@ proc do_test { function step_cmd } { break } + gdb_test $step_cmd + set in_fn 0 - gdb_test_multiple $step_cmd "" { - -re -wrap "$::hex in $function \\(\\)" { + gdb_test_multiple "info frame" "" { + -re -wrap "rip = $::hex in ${function}( \\(.*\\))?;.*" { set in_fn 1 } -re -wrap "" {} |