* [PATCH] Fix regression revealed by corethreads.exp
@ 2015-12-10 19:14 Antoine Tremblay
2015-12-10 19:34 ` Pedro Alves
0 siblings, 1 reply; 3+ messages in thread
From: Antoine Tremblay @ 2015-12-10 19:14 UTC (permalink / raw)
To: gdb-patches; +Cc: Antoine Tremblay
This patch fixes a regression introduced by:
https://sourceware.org/ml/gdb-patches/2015-12/msg00192.html
We can't use thread_from_lwp with core files. As mentioned in a comment,
td_ta_map_lwp2thr uses ps_get_thread_area, but we can't use that
currently on core targets, as it uses ptrace directly.
Use directly record_thread instead.
This fixes :
PASS -> FAIL: gdb.threads/corethreads.exp: thread0 found
PASS -> FAIL: gdb.threads/corethreads.exp: thread1 found
gdb/ChangeLog:
* linux-thread-db.c (find_new_threads_callback): Use record_thread.
---
gdb/linux-thread-db.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index 8a80ca3..4e51c74 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -1226,7 +1226,7 @@ find_new_threads_callback (const td_thrhandle_t *th_p, void *data)
ptid = ptid_build (info->pid, ti.ti_lid, 0);
tp = find_thread_ptid (ptid);
if (tp == NULL || tp->priv == NULL)
- thread_from_lwp (ptid);
+ record_thread (info, tp, ptid, th_p, &ti);
return 0;
}
--
2.6.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix regression revealed by corethreads.exp
2015-12-10 19:14 [PATCH] Fix regression revealed by corethreads.exp Antoine Tremblay
@ 2015-12-10 19:34 ` Pedro Alves
2015-12-10 19:45 ` Antoine Tremblay
0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2015-12-10 19:34 UTC (permalink / raw)
To: Antoine Tremblay, gdb-patches
On 12/10/2015 07:14 PM, Antoine Tremblay wrote:
> This patch fixes a regression introduced by:
> https://sourceware.org/ml/gdb-patches/2015-12/msg00192.html
>
> We can't use thread_from_lwp with core files. As mentioned in a comment,
> td_ta_map_lwp2thr uses ps_get_thread_area, but we can't use that
> currently on core targets, as it uses ptrace directly.
>
> Use directly record_thread instead.
>
> This fixes :
> PASS -> FAIL: gdb.threads/corethreads.exp: thread0 found
> PASS -> FAIL: gdb.threads/corethreads.exp: thread1 found
>
> gdb/ChangeLog:
>
> * linux-thread-db.c (find_new_threads_callback): Use record_thread.
OK.
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix regression revealed by corethreads.exp
2015-12-10 19:34 ` Pedro Alves
@ 2015-12-10 19:45 ` Antoine Tremblay
0 siblings, 0 replies; 3+ messages in thread
From: Antoine Tremblay @ 2015-12-10 19:45 UTC (permalink / raw)
To: Pedro Alves, gdb-patches
On 12/10/2015 02:34 PM, Pedro Alves wrote:
> On 12/10/2015 07:14 PM, Antoine Tremblay wrote:
>> This patch fixes a regression introduced by:
>> https://sourceware.org/ml/gdb-patches/2015-12/msg00192.html
>>
>> We can't use thread_from_lwp with core files. As mentioned in a comment,
>> td_ta_map_lwp2thr uses ps_get_thread_area, but we can't use that
>> currently on core targets, as it uses ptrace directly.
>>
>> Use directly record_thread instead.
>>
>> This fixes :
>> PASS -> FAIL: gdb.threads/corethreads.exp: thread0 found
>> PASS -> FAIL: gdb.threads/corethreads.exp: thread1 found
>>
>> gdb/ChangeLog:
>>
>> * linux-thread-db.c (find_new_threads_callback): Use record_thread.
>
> OK.
>
Pushed in.
Thanks,
Antoine
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-12-10 19:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-10 19:14 [PATCH] Fix regression revealed by corethreads.exp Antoine Tremblay
2015-12-10 19:34 ` Pedro Alves
2015-12-10 19:45 ` Antoine Tremblay
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox