This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Multi-packet gdb server request/response - problem?
- From: Pedro Alves <palves at redhat dot com>
- To: Ivo Raisr <ivosh at ivosh dot net>
- Cc: gdb at sourceware dot org
- Date: Thu, 12 Dec 2013 16:00:12 +0000
- Subject: Re: Multi-packet gdb server request/response - problem?
- Authentication-results: sourceware.org; auth=none
- References: <CANXv6=u1BjBdJJDNtF=j=djNJVoNHo45gL4JZruzDYsaSqEU6Q at mail dot gmail dot com> <1386711973 dot 2226 dot 30 dot camel at soleil> <CANXv6=vFYfEDLPVHv_TRK4VTLmFX6c+2hvmodM9dg3gcJA4_jQ at mail dot gmail dot com> <CANXv6=uV5H9M17qLkSZ+VpX6AqzBBnXRSmK4g1yNyTyExw3SCA at mail dot gmail dot com> <CANXv6=tByX3xbrKU-uiZwshHVW9k5NcWP5Etd+QDwCU7qe-wFw at mail dot gmail dot com>
On 12/12/2013 03:44 PM, Ivo Raisr wrote:
> At some point in the debugging session (not sure when but it does not matter),
> I think gdb kicks in the OS-specific functions. For solaris, they are
> found in sol-thread.c.
That's the (or a) problem. They shouldn't. sol-thread.c should only
be active for native Solaris debugging. Try this.
---
gdb/sol-thread.c | 4 ++++
1 file changed, 4 insertions(+)
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