gdb/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Thu, 9 Jul 2009 20:30:59 +0000 (20:30 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Thu, 9 Jul 2009 20:30:59 +0000 (20:30 +0000)
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/ChangeLog
gdb/cli/cli-dump.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/dump.exp

index e9e9c1971b5ae00c6d53b667abab9ad6e0e69b37..d3347db4122d1ae3e8fa439d58cfa9dbb98110bb 100644 (file)
@@ -1,3 +1,9 @@
+2009-07-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       Report error on inaccessible memory.
+       * cli/cli-dump.c: Include gdbcore.h.
+       (dump_memory_to_file): Call read_memory instead of target_read_memory.
+
 2009-07-09  Hui Zhu  <teawater@gmail.com>
 
        * solib.c (solib_bfd_open): Output a warning if solib's
@@ -60,7 +66,7 @@
 
        Fix hang in floating varobjs.
 
-       * varob.c (varobj_invalidate): Advance to next
+       * varobj.c (varobj_invalidate): Advance to next
        element when processing floating varobj.
 
 2009-07-07  Vladimir Prus  <vladimir@codesourcery.com>
index 79d468ed19db4801fb412e8051d897360a6ade14..5072b29503356385c932117ffb2fb460c0e9107c 100644 (file)
@@ -30,6 +30,7 @@
 #include <ctype.h>
 #include "target.h"
 #include "readline/readline.h"
+#include "gdbcore.h"
 
 #define XMALLOC(TYPE) ((TYPE*) xmalloc (sizeof (TYPE)))
 
@@ -246,7 +247,7 @@ dump_memory_to_file (char *cmd, char *mode, char *file_format)
      value.  */
   buf = xmalloc (count);
   make_cleanup (xfree, buf);
-  target_read_memory (lo, buf, count);
+  read_memory (lo, buf, count);
   
   /* Have everything.  Open/write the data.  */
   if (file_format == NULL || strcmp (file_format, "binary") == 0)
index b6a2025b94639ccafb8ade925f6293cc1cf74d68..340900267377bc16799e6701e803d27a811b927d 100644 (file)
@@ -1,3 +1,7 @@
+2009-07-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * gdb.base/dump.exp (inaccessible memory is reported): New test.
+
 2009-07-07  Tom Tromey  <tromey@redhat.com>
 
        * gdb.base/call-rt-st.exp: Update for change to escape output.
index 072fcfdaedc08ed6837216c50236a86064d45e14..4e616aaace33559f668701737b9c603ad1796749 100644 (file)
@@ -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
This page took 0.044071 seconds and 4 git commands to generate.