aboutsummaryrefslogtreecommitdiff
path: root/gdb/darwin-nat.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2022-03-10 16:56:57 -0700
committerTom Tromey <tom@tromey.com>2023-08-10 10:50:37 -0600
commitd0ffdf6482024331dc43d9c221c7afc5863a300b (patch)
tree22bc10e78fac4db876bbd5190011d5da0ee465dc /gdb/darwin-nat.c
parent67bed49ec852aee39172fc867a89ec78c4903883 (diff)
downloadgdb-d0ffdf6482024331dc43d9c221c7afc5863a300b.zip
gdb-d0ffdf6482024331dc43d9c221c7afc5863a300b.tar.gz
gdb-d0ffdf6482024331dc43d9c221c7afc5863a300b.tar.bz2
Pass unique_ptr to add_thread_with_info
This changes add_thread_with_info to accept a unique_ptr, making it clear that it takes ownership of the passed-in pointer. I can't test the AIX or Darwin changes, but I think they are relatively obvious.
Diffstat (limited to 'gdb/darwin-nat.c')
-rw-r--r--gdb/darwin-nat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c
index 4cf2d9f..588e9e2 100644
--- a/gdb/darwin-nat.c
+++ b/gdb/darwin-nat.c
@@ -351,7 +351,8 @@ darwin_nat_target::check_new_threads (inferior *inf)
pti->msg_state = DARWIN_RUNNING;
/* Add the new thread. */
- add_thread_with_info (this, ptid_t (inf->pid, 0, new_id), pti);
+ add_thread_with_info (this, ptid_t (inf->pid, 0, new_id),
+ private_thread_info_up (pti));
new_thread_vec.push_back (pti);
new_ix++;
continue;