aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbcore.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2017-08-05 16:23:18 -0600
committerTom Tromey <tom@tromey.com>2017-09-03 13:03:02 -0600
commit1ccbe9985f607b291bb6fc920beda60225f1bf83 (patch)
tree660da8f15daa3e60fd6a969ee515a762fddc4373 /gdb/gdbcore.h
parent0e30d991804de9dfd368653d6a88bf3766a27ffc (diff)
downloadgdb-1ccbe9985f607b291bb6fc920beda60225f1bf83.zip
gdb-1ccbe9985f607b291bb6fc920beda60225f1bf83.tar.gz
gdb-1ccbe9985f607b291bb6fc920beda60225f1bf83.tar.bz2
Return std::string from memory_error_message
This changes memory_error_message to return a std::string and fixes up the callers. This removes some cleanups. ChangeLog 2017-09-03 Tom Tromey <tom@tromey.com> * valprint.c (val_print_string): Update. * gdbcore.h (memory_error_message): Return std::string. * corefile.c (memory_error_message): Return std::string. (memory_error): Update. * breakpoint.c (insert_bp_location): Update.
Diffstat (limited to 'gdb/gdbcore.h')
-rw-r--r--gdb/gdbcore.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/gdbcore.h b/gdb/gdbcore.h
index 87f3dcd..a25a231 100644
--- a/gdb/gdbcore.h
+++ b/gdb/gdbcore.h
@@ -37,11 +37,11 @@ extern int have_core_file_p (void);
extern void memory_error (enum target_xfer_status status, CORE_ADDR memaddr);
-/* The string 'memory_error' would use as exception message. Space
- for the result is malloc'd, caller must free. */
+/* The string 'memory_error' would use as exception message. */
-extern char *memory_error_message (enum target_xfer_status err,
- struct gdbarch *gdbarch, CORE_ADDR memaddr);
+extern std::string memory_error_message (enum target_xfer_status err,
+ struct gdbarch *gdbarch,
+ CORE_ADDR memaddr);
/* Like target_read_memory, but report an error if can't read. */