Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb@sourceware.org,  Dmitry Smirnov <divis1969@mail.ru>
Subject: Re: How to catch GDB crash
Date: Wed, 02 Jul 2008 11:52:00 -0000	[thread overview]
Message-ID: <200807021252.15748.pedro@codesourcery.com> (raw)
In-Reply-To: <E1KE09Q-000L4A-00.divis1969-mail-ru@f137.mail.ru>

[-- Attachment #1: Type: text/plain, Size: 1554 bytes --]

Hi Dmitry, thanks for taking the time to investigate deeper.

A Wednesday 02 July 2008 12:05:28, Dmitry Smirnov wrote:
> Hi,
>
> Regarding the problem of -exec-run, I've suspended its investigation: I've
> found that 6.8.50.20080630 just didn't respond "running" and this seems
> reasonable. So, perhaps, previous version is misbehaving so causing Eclipse
> behave wrong way. Though, it is not clear why gdbServer CDT debugger also
> fails. Just postponed...
>

I don't know what to say about this failure.  The command was already
failing before, but it was outputting a spurious "^running".  Why is
eclipse even trying to run a process in with "target remote", I don't know.

> I've found another Eclipse CDT debugger variant that can run as I wish.
> And here I have a problem that I was reported to Pedro earlier: Eclipse is
> unable to disassemble the code, show variables, etc.
>
> I've noticed that GDB respond to "info threads" contains an error message.
> Below is the stack dump of this situation. I'm suspecting this respond
> prevents Eclipse from doing right.
> What is that "T1"?

I don't know.  It looks like a bug in the stub/simulator.
Do you have a way to activate remote protocol debugging?
"set debug remote 1" is the GDB command to use.
The stub embedded in the simulator you're using doesn't seem to
support any other thread related packets, and I would expect
it to reply "" to this packet too.

In the mean time, I think the attached patch (untested other than
building it) is sensible.  Could you give it a try?

-- 
Pedro Alves

[-- Attachment #2: dont_query_internal_threads.diff --]
[-- Type: text/x-diff, Size: 956 bytes --]

2008-07-02  Pedro Alves  <pedro@codesourcery.com>

	* remote.c (remote_threads_extra_info): Don't query the remote
	server about the <main> thread.

---
 gdb/remote.c |    6 ++++++
 1 file changed, 6 insertions(+)

Index: src/gdb/remote.c
===================================================================
--- src.orig/gdb/remote.c	2008-07-02 12:39:07.000000000 +0100
+++ src/gdb/remote.c	2008-07-02 12:50:31.000000000 +0100
@@ -2042,6 +2042,12 @@ remote_threads_extra_info (struct thread
     internal_error (__FILE__, __LINE__,
 		    _("remote_threads_extra_info"));
 
+  if (ptid_equal (tp->ptid, magic_null_ptid)
+      || (ptid_get_pid (tp->ptid) != 0 && ptid_get_tid (tp->ptid) == 0))
+    /* This is the main thread which was added by GDB.  The remote
+       doesn't know about it, so don't query about it.  */
+    return NULL;
+
   if (use_threadextra_query)
     {
       xsnprintf (rs->buf, get_remote_packet_size (), "qThreadExtraInfo,%lx",

  reply	other threads:[~2008-07-02 11:52 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-24 17:03 Dmitry Smirnov
2008-06-24 17:29 ` Pedro Alves
2008-06-25  8:03   ` Dmitry Smirnov
2008-06-25 23:28     ` Pedro Alves
2008-06-26 13:56       ` Dmitry Smirnov
2008-06-26 14:21         ` Pedro Alves
2008-06-26 14:33           ` Dmitry Smirnov
2008-06-30 15:58             ` Dmitry Smirnov
2008-07-02 11:05               ` Dmitry Smirnov
2008-07-02 11:52                 ` Pedro Alves [this message]
2008-07-02 12:51                   ` Re[2]: " Dmitry Smirnov
2008-07-05  3:15                     ` Pedro Alves
2008-07-07  8:36                       ` Dmitry Smirnov
2008-07-07 14:29                         ` Pedro Alves
2008-07-07 15:47                           ` Dmitry Smirnov
2008-07-07 16:01                             ` Pedro Alves
2008-07-08  8:27                               ` Dmitry Smirnov
2008-07-01 11:38       ` Vladimir Prus
2008-07-01 11:41         ` Pedro Alves
  -- strict thread matches above, loose matches on Subject: below --
2008-06-24 12:39 Dmitry Smirnov
2008-06-24 12:58 ` Pedro Alves
2008-06-24  8:52 Dmitry Smirnov
2008-06-23 16:32 Dmitry Smirnov
2008-06-23 16:57 ` Aleksandar Ristovski
2008-06-23 17:12 ` Michael Snyder
2008-06-23 18:23   ` Eli Zaretskii
2008-06-23 18:32     ` Michael Snyder
2008-06-23 18:36     ` Pedro Alves
2008-06-23 19:37       ` Brian Dessent
2008-06-23 20:50 ` Dr. Rolf Jansen
2008-06-23 20:59   ` Dr. Rolf Jansen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200807021252.15748.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=divis1969@mail.ru \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox