diff options
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/gdb.base/unwind-on-each-insn-foo.c | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/unwind-on-each-insn.c | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/unwind-on-each-insn.exp | 7 |
3 files changed, 9 insertions, 4 deletions
diff --git a/gdb/testsuite/gdb.base/unwind-on-each-insn-foo.c b/gdb/testsuite/gdb.base/unwind-on-each-insn-foo.c index af9fc11..635aa44 100644 --- a/gdb/testsuite/gdb.base/unwind-on-each-insn-foo.c +++ b/gdb/testsuite/gdb.base/unwind-on-each-insn-foo.c @@ -16,7 +16,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ void -foo () +foo (const char *s) { /* Nothing. */ } diff --git a/gdb/testsuite/gdb.base/unwind-on-each-insn.c b/gdb/testsuite/gdb.base/unwind-on-each-insn.c index 60bc83a..821df37 100644 --- a/gdb/testsuite/gdb.base/unwind-on-each-insn.c +++ b/gdb/testsuite/gdb.base/unwind-on-each-insn.c @@ -15,11 +15,11 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -extern void foo (); +extern void foo (const char *); int main () { - foo (); + foo ("foo"); return 0; } diff --git a/gdb/testsuite/gdb.base/unwind-on-each-insn.exp b/gdb/testsuite/gdb.base/unwind-on-each-insn.exp index fc48bf5..6e68b24 100644 --- a/gdb/testsuite/gdb.base/unwind-on-each-insn.exp +++ b/gdb/testsuite/gdb.base/unwind-on-each-insn.exp @@ -113,7 +113,12 @@ for { set i_count 1 } { true } { incr i_count } { # Check we can unwind the stack-pointer and the frame base # address correctly. lassign [get_sp_and_fba "for main"] sp_value fba_value - gdb_assert { $sp_value == $main_sp } + if { $i_count == 1 } { + # The stack-pointer may have changed while running to *foo. + set main_sp $sp_value + } else { + gdb_assert { $sp_value == $main_sp } + } gdb_assert { $fba_value == $main_fba } # Check we have a consistent value for main's frame-id. |