aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2013-12-16 14:06:49 +0000
committerPedro Alves <palves@redhat.com>2013-12-16 14:06:49 +0000
commit1db0791014f8cc5e0a29c12cf282e2c841fef4b7 (patch)
tree6ef3c070f37864ca5e568a7a5bd399d48a680f2a
parent3b88acb6ef682ee8749fcd6dd824afb36ec1abf1 (diff)
downloadgdb-1db0791014f8cc5e0a29c12cf282e2c841fef4b7.zip
gdb-1db0791014f8cc5e0a29c12cf282e2c841fef4b7.tar.gz
gdb-1db0791014f8cc5e0a29c12cf282e2c841fef4b7.tar.bz2
PR 16329: remote debugging broken on Solaris.
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.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/sol-thread.c4
2 files changed, 10 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index cb0e570..6a2f957 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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-08 Joel Brobecker <brobecker@adacore.com>
* version.in: Set GDB version number to 7.6.2.20131208-cvs.
diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c
index 7bb0864..fff886f 100644
--- a/gdb/sol-thread.c
+++ b/gdb/sol-thread.c
@@ -588,6 +588,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;