PR 16329: remote debugging broken on Solaris.
authorPedro Alves <palves@redhat.com>
Mon, 16 Dec 2013 14:04:52 +0000 (14:04 +0000)
committerPedro Alves <palves@redhat.com>
Mon, 16 Dec 2013 14:04:52 +0000 (14:04 +0000)
Like on GNU/Linux (linux-thread-db.c), the Solaris solaris-threads
target (handles libthread_db.so) shouldn't be pushed when remote
debugging.

This uses the same predicate used by linux-thread-db.c.

gdb/
2013-12-16  Pedro Alves  <palves@redhat.com>

PR 16329
* sol-thread.c (check_for_thread_db): If the target can't run or
isn't a core, return without pushing.

gdb/ChangeLog
gdb/sol-thread.c

index b9b37b0a550b0ead4c430ba4e4e9994127f654db..cd954e0e1e3d269a8fac6de1380c410800d17cad 100644 (file)
@@ -1,3 +1,9 @@
+2013-12-16  Pedro Alves  <palves@redhat.com>
+
+       PR 16329
+       * sol-thread.c (check_for_thread_db): If the target can't run or
+       isn't a core, return without pushing.
+
 2013-12-15  Joel Brobecker  <brobecker@adacore.com>
 
        Revert the following commit:
index b480b58df682127f835061618dc431736c08e00b..3809aec27735b3fe028c5ebf9f4c39fb1231b4b3 100644 (file)
@@ -578,6 +578,10 @@ check_for_thread_db (void)
   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;