From e0881a8e0fbb8bd5d4d14683390269b97e4e90d7 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Fri, 14 May 2010 23:41:05 +0000 Subject: 2010-05-14 Michael Snyder * 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. --- gdb/linux-thread-db.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'gdb/linux-thread-db.c') diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c index 006ba411331..2b1fb70ebda 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; } -- cgit v1.2.1