summaryrefslogtreecommitdiff
path: root/gdb/record-btrace.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@ericsson.com>2017-09-03 10:23:31 +0200
committerSimon Marchi <simon.marchi@ericsson.com>2017-09-03 10:23:31 +0200
commit23fdd69e42180578b3e15ba8f053fadde965bfe8 (patch)
tree5f8dc1441127578fe91dde474ec94ccde1413e94 /gdb/record-btrace.c
parentf04bdfa7b261402bfa9dbdde58b2feb14becd8a3 (diff)
downloadbinutils-gdb-23fdd69e42180578b3e15ba8f053fadde965bfe8.tar.gz
Make target_waitstatus_to_string return an std::string
A quite straightforward change. It does "fix" leaks in record-btrace.c, although since this is only used in debug printing code, it has no real world impact. gdb/ChangeLog: * target/waitstatus.h (target_waitstatus_to_string): Change return type to std::string. * target/waitstatus.c (target_waitstatus_to_string): Return std::string. * target.h (target_waitstatus_to_string): Remove declaration. * infrun.c (resume, clear_proceed_status_thread, print_target_wait_results, do_target_wait, save_waitstatus, stop_all_threads): Adjust. * record-btrace.c (record_btrace_wait): Adjust. * target-debug.h (target_debug_print_struct_target_waitstatus_p): Adjust. gdb/gdbserver/ChangeLog: * linux-low.c (linux_wait_1): Adjust. * server.c (queue_stop_reply_callback): Adjust.
Diffstat (limited to 'gdb/record-btrace.c')
-rw-r--r--gdb/record-btrace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c
index b216f1f9cad..6ac85734f89 100644
--- a/gdb/record-btrace.c
+++ b/gdb/record-btrace.c
@@ -2478,7 +2478,7 @@ record_btrace_wait (struct target_ops *ops, ptid_t ptid,
*status = btrace_step_no_resumed ();
DEBUG ("wait ended by %s: %s", target_pid_to_str (null_ptid),
- target_waitstatus_to_string (status));
+ target_waitstatus_to_string (status).c_str ());
do_cleanups (cleanups);
return null_ptid;
@@ -2570,7 +2570,7 @@ record_btrace_wait (struct target_ops *ops, ptid_t ptid,
DEBUG ("wait ended by thread %s (%s): %s",
print_thread_id (eventing),
target_pid_to_str (eventing->ptid),
- target_waitstatus_to_string (status));
+ target_waitstatus_to_string (status).c_str ());
do_cleanups (cleanups);
return eventing->ptid;