diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-02-28 17:56:37 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-02-28 17:56:37 +0000 |
commit | 0e095b7eee9adf0be7109de8662647df7d0ee0ac (patch) | |
tree | 2966c8a00c5696de38c10dc6842fd7363ae9ef4e /gdb/testsuite/gdb.base | |
parent | 2f9e05b472ff58f7c5f12b9d4e79a2cd8748a1d0 (diff) | |
download | gdb-0e095b7eee9adf0be7109de8662647df7d0ee0ac.zip gdb-0e095b7eee9adf0be7109de8662647df7d0ee0ac.tar.gz gdb-0e095b7eee9adf0be7109de8662647df7d0ee0ac.tar.bz2 |
gdb/
* infcall.c (call_function_by_hand): Remove gdb_assert on sp and old_sp.
New comment.
gdb/testsuite/
* gdb.base/callfuncs.exp: New tests for $spval 0 and -1. Remove return.
Diffstat (limited to 'gdb/testsuite/gdb.base')
-rw-r--r-- | gdb/testsuite/gdb.base/callfuncs.exp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp index 46ba509..9aeb09b 100644 --- a/gdb/testsuite/gdb.base/callfuncs.exp +++ b/gdb/testsuite/gdb.base/callfuncs.exp @@ -469,5 +469,17 @@ if {$old_reg_content == $new_reg_content} then { fail "nested call dummies preserve register contents" } -return 0 +# GDB should not crash by internal error on $sp underflow during the inferior +# call. It is OK it will stop on some: Cannot access memory at address 0x$hex. +if {![target_info exists gdb,nosignals] && ![istarget "*-*-uclinux*"]} { + gdb_test {set $old_sp = $sp} + + gdb_test {set $sp = 0} + gdb_test "call doubleit (1)" "" "sp == 0: call doubleit (1)" + + gdb_test {set $sp = -1} + gdb_test "call doubleit (1)" "" "sp == -1: call doubleit (1)" + + gdb_test {set $sp = $old_sp} +} |