diff options
author | Yao Qi <yao@codesourcery.com> | 2014-05-28 12:38:52 +0800 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2014-06-01 11:46:39 +0800 |
commit | c72b2e7b2fbadd94f67a922e1a7f9d834dd45d38 (patch) | |
tree | f4067420d5e9b21d642a65385fb73051a4424917 /gold/common.cc | |
parent | 11b28b91b2c51898e1347e62909811cc7dd720ea (diff) | |
download | gdb-c72b2e7b2fbadd94f67a922e1a7f9d834dd45d38.zip gdb-c72b2e7b2fbadd94f67a922e1a7f9d834dd45d38.tar.gz gdb-c72b2e7b2fbadd94f67a922e1a7f9d834dd45d38.tar.bz2 |
Skip test 'watch -location nullptr->p->x' if null pointer can be dereferenced
gdb.base/watchpoint.exp has a test below which expects to see "Cannot
access memory at address 0x0" when a null pointer is dereferenced.
gdb_test "watch -location nullptr->p->x" \
"Cannot access memory at address 0x0"
This assumption is not true when the target is no-mmu, so we get
watch -location nullptr->p->x
Hardware watchpoint 28: -location nullptr->p->x
(gdb) FAIL: gdb.base/watchpoint.exp: watch -location nullptr->p->x
This patch is to check whether null pointer can be dereferenced first
and then do the test.
gdb/testsuite:
2014-06-01 Yao Qi <yao@codesourcery.com>
* gdb.base/watchpoint.exp (test_watch_location): Check null
pointer can be dereferenced. If not, do the test, otherwise
skip it.
Diffstat (limited to 'gold/common.cc')
0 files changed, 0 insertions, 0 deletions