diff options
author | Michael Snyder <msnyder@vmware.com> | 2010-05-14 23:41:05 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2010-05-14 23:41:05 +0000 |
commit | e0881a8e0fbb8bd5d4d14683390269b97e4e90d7 (patch) | |
tree | 60fe317865c5f6a2e987df4e590cf170bee3360f /gdb/linux-thread-db.c | |
parent | abbb1732a91accadee3e1c00b75fc0a3f418fae7 (diff) | |
download | gdb-e0881a8e0fbb8bd5d4d14683390269b97e4e90d7.zip gdb-e0881a8e0fbb8bd5d4d14683390269b97e4e90d7.tar.gz gdb-e0881a8e0fbb8bd5d4d14683390269b97e4e90d7.tar.bz2 |
2010-05-14 Michael Snyder <msnyder@vmware.com>
* jv-lang.c: White space.
* jv-typeprint.c: White space.
* jv-valprint.c: White space.
* language.c: White space.
* libunwind-frame.c: White space.
* linespec.c: White space.
* linux-nat.c: White space.
* linux-record.c: White space.
* linux-thread-db.c: White space.
Diffstat (limited to 'gdb/linux-thread-db.c')
-rw-r--r-- | gdb/linux-thread-db.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c index 006ba41..2b1fb70 100644 --- a/gdb/linux-thread-db.c +++ b/gdb/linux-thread-db.c @@ -324,6 +324,7 @@ static int have_threads_callback (struct thread_info *thread, void *args) { int pid = * (int *) args; + if (ptid_get_pid (thread->ptid) != pid) return 0; @@ -601,10 +602,10 @@ thread_db_find_new_threads_silently (ptid_t ptid) } if (except.reason < 0 && info_verbose) - { - exception_fprintf (gdb_stderr, except, - "Warning: thread_db_find_new_threads_silently: "); - } + { + exception_fprintf (gdb_stderr, except, + "Warning: thread_db_find_new_threads_silently: "); + } } /* Lookup a library in which given symbol resides. @@ -794,12 +795,15 @@ thread_db_load_search (void) while (*search_path) { const char *end = strchr (search_path, ':'); + if (end) { size_t len = end - search_path; + if (len + 1 + strlen (LIBTHREAD_DB_SO) + 1 > sizeof (path)) { char *cp = xmalloc (len + 1); + memcpy (cp, search_path, len); cp[len] = '\0'; warning (_("libthread_db_search_path component too long," @@ -1329,6 +1333,7 @@ find_new_threads_callback (const td_thrhandle_t *th_p, void *data) if (info->need_stale_parent_threads_check) { int tgid = linux_proc_get_tgid (ti.ti_lid); + if (tgid != -1 && tgid != info->pid) return 0; } |