components/gdb/patches/gdb.gdb.sol-thread.c.patch
author Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
Thu, 04 Feb 2016 14:58:57 -0800
changeset 5402 b677c836a58e
parent 1611 6b7edd68c53f
child 6420 65948e9e205b
permissions -rw-r--r--
21791492 Workaround to suppress the link check error should be removed

--- gdb-7.6/gdb/sol-thread.c	2012-12-31 22:32:50.000000000 -0800
+++ gdb-7.6/gdb/sol-thread.c	2013-08-22 12:03:52.780558508 -0700
@@ -588,6 +588,10 @@
   td_err_e err;
   ptid_t ptid;

+  /* Don't attempt to use thread_db for remote targets.  */
+  if (!(target_can_run (&current_target) || core_bfd))
+    return;
+
   /* Do nothing if we couldn't load libthread_db.so.1.  */
   if (p_td_ta_new == NULL)
     return;
@@ -1224,7 +1224,7 @@
 
   init_sol_thread_ops ();
 
-  dlhandle = dlopen ("libthread_db.so.1", RTLD_NOW);
+  dlhandle = dlopen ("libthread_db.so.1", RTLD_LAZY|RTLD_GLOBAL);
   if (!dlhandle)
     goto die;