From c0ac0ec78df5972b67b7048c85440c68764d3c8e Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Thu, 9 Jul 2009 20:30:59 +0000 Subject: gdb/ Report error on inaccessible memory. * cli/cli-dump.c: Include gdbcore.h. (dump_memory_to_file): Call read_memory instead of target_read_memory. gdb/testsuite/ * gdb.base/dump.exp (inaccessible memory is reported): New test. --- gdb/testsuite/gdb.base/dump.exp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gdb/testsuite/gdb.base/dump.exp') diff --git a/gdb/testsuite/gdb.base/dump.exp b/gdb/testsuite/gdb.base/dump.exp index 072fcfdaedc..4e616aaace3 100644 --- a/gdb/testsuite/gdb.base/dump.exp +++ b/gdb/testsuite/gdb.base/dump.exp @@ -58,6 +58,10 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable ${op gdb_exit gdb_start gdb_reinitialize_dir $srcdir/$subdir + +gdb_test "dump mem /dev/null 0x10 0x20" "Cannot access memory at address 0x10" \ + "inaccessible memory is reported" + gdb_load ${binfile} # Clean up any stale output files from previous test runs -- cgit v1.2.1