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.
This commit is contained in:
Tom Tromey
2022-03-10 16:56:57 -07:00
parent 67bed49ec8
commit d0ffdf6482
5 changed files with 12 additions and 7 deletions

View File

@@ -1366,7 +1366,8 @@ record_thread (struct thread_db_info *info,
thread with this PTID, but it's marked exited, then the kernel
reused the tid of an old thread. */
if (tp == NULL || tp->state == THREAD_EXITED)
tp = add_thread_with_info (info->process_target, ptid, priv);
tp = add_thread_with_info (info->process_target, ptid,
private_thread_info_up (priv));
else
tp->priv.reset (priv);