diff options
author | Kevin Buettner <kevinb@redhat.com> | 2020-03-04 17:42:43 -0700 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2020-07-22 12:40:42 -0700 |
commit | 94c265d790b88e691b9ea0173b7000a54a3eb0a0 (patch) | |
tree | 7b2f89ac2df9e5b3550e0d9720a2080876b2ea86 /gdb/testsuite/gdb.base/corefile.exp | |
parent | 2735d4218ea81ea83458007a80e4132fa6e73668 (diff) | |
download | binutils-gdb-94c265d790b88e691b9ea0173b7000a54a3eb0a0.tar.gz |
Test ability to access unwritten-to mmap data in core file
gdb/testsuite/ChangeLog:
PR corefiles/25631
* gdb.base/corefile.exp (accessing anonymous, unwritten-to mmap data):
New test.
* gdb.base/coremaker.c (buf3): New global.
(mmapdata): Add mmap call which uses MAP_ANONYMOUS and MAP_PRIVATE
flags.
Diffstat (limited to 'gdb/testsuite/gdb.base/corefile.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/corefile.exp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/corefile.exp b/gdb/testsuite/gdb.base/corefile.exp index 34b903b350d..eaabe6c0f8c 100644 --- a/gdb/testsuite/gdb.base/corefile.exp +++ b/gdb/testsuite/gdb.base/corefile.exp @@ -175,6 +175,15 @@ gdb_test_multiple "x/8bd buf2" "$test" { } } +# Test ability to read anonymous and, more importantly, unwritten-to +# mmap'd data. + +if { ![istarget *-linux*] } { + setup_xfail "*-*-*" +} +gdb_test "x/wx buf3" "$hex:\[ \t\]+0x00000000" \ + "accessing anonymous, unwritten-to mmap data" + # test reinit_frame_cache gdb_load ${binfile} |