aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAntoine Tremblay <antoine.tremblay@ericsson.com>2015-12-10 14:43:48 -0500
committerAntoine Tremblay <antoine.tremblay@ericsson.com>2015-12-10 14:43:48 -0500
commit60269a4a36a78063d7563a32a6d34107cb52cca5 (patch)
treed047dad1c3f717e1bcfa8c3a1f27f45a3c2ba43f /gdb
parentbebf4942b083027860539b7c5e0649714b92e401 (diff)
downloadfsf-binutils-gdb-60269a4a36a78063d7563a32a6d34107cb52cca5.zip
fsf-binutils-gdb-60269a4a36a78063d7563a32a6d34107cb52cca5.tar.gz
fsf-binutils-gdb-60269a4a36a78063d7563a32a6d34107cb52cca5.tar.bz2
Fix regression revealed by corethreads.exp
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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/linux-thread-db.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 65354bf..03ae010 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2015-12-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
+ * linux-thread-db.c (find_new_threads_callback): Use record_thread.
+
+2015-12-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
+
* breakpoint.c (remove_thread_event_breakpoints): Remove.
* breakpoint.h (remove_thread_event_breakpoints): Remove
declaration.
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;
}