This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[COMMIT PATCH master+7.6] PR 16329: remote debugging broken on Solaris.
- From: Pedro Alves <palves at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 16 Dec 2013 14:26:38 +0000
- Subject: [COMMIT PATCH master+7.6] PR 16329: remote debugging broken on Solaris.
- Authentication-results: sourceware.org; auth=none
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 | 6 ++++++
gdb/sol-thread.c | 4 ++++
2 files changed, 10 insertions(+)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b9b37b0..cd954e0 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-15 Joel Brobecker <brobecker@adacore.com>
Revert the following commit:
diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c
index b480b58..3809aec 100644
--- a/gdb/sol-thread.c
+++ b/gdb/sol-thread.c
@@ -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 (¤t_target) || core_bfd))
+ return;
+
/* Do nothing if we couldn't load libthread_db.so.1. */
if (p_td_ta_new == NULL)
return;
--
1.7.11.7