diff options
author | Tom Tromey <tom@tromey.com> | 2022-03-10 16:56:57 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-08-10 10:50:37 -0600 |
commit | d0ffdf6482024331dc43d9c221c7afc5863a300b (patch) | |
tree | 22bc10e78fac4db876bbd5190011d5da0ee465dc /gdb/linux-thread-db.c | |
parent | 67bed49ec852aee39172fc867a89ec78c4903883 (diff) | |
download | gdb-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/linux-thread-db.c')
-rw-r--r-- | gdb/linux-thread-db.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c index 71a81aa..7d9fd57 100644 --- a/gdb/linux-thread-db.c +++ b/gdb/linux-thread-db.c @@ -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); |