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/cli/cli-dump.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gdb/cli/cli-dump.c') 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 #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) -- cgit v1.1