aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli/cli-dump.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2009-07-09 20:30:59 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2009-07-09 20:30:59 +0000
commitc0ac0ec78df5972b67b7048c85440c68764d3c8e (patch)
treea765f0f9fa8c516626ec18b1b5d8b6066d647942 /gdb/cli/cli-dump.c
parente0452928e8435b2b7614a672a163cbd3c666d695 (diff)
downloadgdb-c0ac0ec78df5972b67b7048c85440c68764d3c8e.zip
gdb-c0ac0ec78df5972b67b7048c85440c68764d3c8e.tar.gz
gdb-c0ac0ec78df5972b67b7048c85440c68764d3c8e.tar.bz2
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.
Diffstat (limited to 'gdb/cli/cli-dump.c')
-rw-r--r--gdb/cli/cli-dump.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/cli/cli-dump.c b/gdb/cli/cli-dump.c
index 79d468e..5072b29 100644
--- a/gdb/cli/cli-dump.c
+++ b/gdb/cli/cli-dump.c
@@ -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)