aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Pluzhnikov <ppluzhnikov@google.com>2011-07-25 15:22:07 +0000
committerPaul Pluzhnikov <ppluzhnikov@google.com>2011-07-25 15:22:07 +0000
commit6cb9b55b982a63d490e9086772eb201f658d6eb4 (patch)
tree4cfea8584fb6d6478f1debee012dd2f2b4a73418
parent179809c050ff97d2f72bab90b8b6fdc7f95eb0b7 (diff)
downloadgdb-6cb9b55b982a63d490e9086772eb201f658d6eb4.zip
gdb-6cb9b55b982a63d490e9086772eb201f658d6eb4.tar.gz
gdb-6cb9b55b982a63d490e9086772eb201f658d6eb4.tar.bz2
2011-07-25 Paul Pluzhnikov <ppluzhnikov@google.com>
* linux-thread-db.c (thread_from_lwp): Initialize th.th_unique.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/linux-thread-db.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3f4b94f..4b8e9ce 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2011-07-25 Paul Pluzhnikov <ppluzhnikov@google.com>
+
+ * linux-thread-db.c (thread_from_lwp): Initialize th.th_unique.
+
2011-07-25 Pedro Alves <pedro@codesourcery.com>
* breakpoint.h (print_recreate_thread): Declare.
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index f43efc7..6427f8b 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -431,6 +431,9 @@ thread_from_lwp (ptid_t ptid)
struct thread_db_info *info;
struct thread_get_info_inout io = {0};
+ /* Just in case td_ta_map_lwp2thr doesn't initialize it completely. */
+ th.th_unique = 0;
+
/* This ptid comes from linux-nat.c, which should always fill in the
LWP. */
gdb_assert (GET_LWP (ptid) != 0);