diff options
author | Mark Kettenis <kettenis@gnu.org> | 2004-01-07 22:12:34 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2004-01-07 22:12:34 +0000 |
commit | 84acecdda8457552bd08aa4303009b2638e96bc1 (patch) | |
tree | 5b14d01898dacd82b6ca2f6e62437edf6666e306 /gdb/testsuite | |
parent | fe11a27fb0ba094a7537d301d0f349effaa14f41 (diff) | |
download | gdb-84acecdda8457552bd08aa4303009b2638e96bc1.zip gdb-84acecdda8457552bd08aa4303009b2638e96bc1.tar.gz gdb-84acecdda8457552bd08aa4303009b2638e96bc1.tar.bz2 |
* gdb.base/gdb1476.exp: Only run the tests if we can't read the
memory at address 0.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/gdb1476.exp | 15 |
2 files changed, 20 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 3d96343..32b6985 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-01-07 Mark Kettenis <kettenis@gnu.org> + + * gdb.base/gdb1476.exp: Only run the tests if we can't read the + memory at address 0. + 2004-01-07 Michael Chastain <mec.gnu@mindspring.com> * gdb.stabs/weird.exp: Use hp_cc_compiler and hp_aCC_compiler diff --git a/gdb/testsuite/gdb.base/gdb1476.exp b/gdb/testsuite/gdb.base/gdb1476.exp index a65157a..ed338db 100644 --- a/gdb/testsuite/gdb.base/gdb1476.exp +++ b/gdb/testsuite/gdb.base/gdb1476.exp @@ -48,6 +48,21 @@ if ![runto_main] then { gdb_suppress_tests } +# If we can examine what's at memory address 0, it is possible that we +# could also execute it. This could pobably make us run away, +# executing random code, which could have all sorts of ill effects, +# especially on targets without an MMU. Don't run the tests in that +# case. + +send_gdb "x 0\n" +gdb_expect { + -re "0x0:.*Error accessing memory address 0x0.*$gdb_prompt $" { } + -re ".*$gdb_prompt $" { + untested "Memory at address 0 is possibly executable" + return + } +} + gdb_test "continue" "Program received signal SIGSEGV.*" \ "continue to null pointer call" |