diff options
author | Jason Molenda <jsm@bugshack.cygnus.com> | 1999-10-05 23:13:56 +0000 |
---|---|---|
committer | Jason Molenda <jsm@bugshack.cygnus.com> | 1999-10-05 23:13:56 +0000 |
commit | ce8537f129e0aa7823f1e9ff610baea9edd4f9ce (patch) | |
tree | 44c31e9e3ca76fb002295a2ddafc1f6aa9a91a9e /gdb/corefile.c | |
parent | e61b94e5346142170a372e22f687753fcae79595 (diff) | |
download | gdb-ce8537f129e0aa7823f1e9ff610baea9edd4f9ce.tar.gz |
import gdb-1999-10-04 snapshot
Diffstat (limited to 'gdb/corefile.c')
-rw-r--r-- | gdb/corefile.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/gdb/corefile.c b/gdb/corefile.c index ce897e1c243..7f94c3d0987 100644 --- a/gdb/corefile.c +++ b/gdb/corefile.c @@ -236,25 +236,27 @@ memory_error (status, memaddr) int status; CORE_ADDR memaddr; { + GDB_FILE *tmp_stream = tui_sfileopen (130); + make_cleanup ((make_cleanup_func) gdb_file_deallocate, &tmp_stream); + + error_begin (); + if (status == EIO) { /* Actually, address between memaddr and memaddr + len was out of bounds. */ - error_begin (); - printf_filtered ("Cannot access memory at address "); - print_address_numeric (memaddr, 1, gdb_stdout); - printf_filtered (".\n"); - return_to_top_level (RETURN_ERROR); + fprintf_unfiltered (tmp_stream, "Cannot access memory at address "); + print_address_numeric (memaddr, 1, tmp_stream); } else { - error_begin (); - printf_filtered ("Error accessing memory address "); - print_address_numeric (memaddr, 1, gdb_stdout); - printf_filtered (": %s.\n", + fprintf_filtered (tmp_stream, "Error accessing memory address "); + print_address_numeric (memaddr, 1, tmp_stream); + fprintf_filtered (tmp_stream, ": %s.", safe_strerror (status)); - return_to_top_level (RETURN_ERROR); } + + error_stream (tmp_stream); } /* Same as target_read_memory, but report an error if can't read. */ |