From: Dmitry Smirnov <divis1969@mail.ru>
To: gdb@sourceware.org
Subject: Re: How to catch GDB crash
Date: Wed, 25 Jun 2008 08:03:00 -0000 [thread overview]
Message-ID: <E1KBPxZ-0008HB-00.divis1969-mail-ru@f62.mail.ru> (raw)
In-Reply-To: <200806241829.29427.pedro@codesourcery.com>
Hi Pedro,
I'll try to figure out, whether skyeye (which is remote target) supports notion of thread ids or pids. Now I just suppose it does not support.
Nevertheless, I do not believe this is related to a crash.
As I said previously, I was debugging this program (ARM code) for some time previously. It is very complex program, it consists of several ELF files. Before this one, I've debugged couple more. I've used 'ni' and/or -exec-next-instruction a lot and didn't see a lot crashes. I remember that I've seen couple of them (in similar scenario: when I've set a BP and run till it hits) but I had eliminated it by moving the breakpoint to another location.
It is just feeling, no more, that crash is somehow connected with stack trace: previously I didn't see much stack traces. In most cases there was 2 or 3 frames (in fact, call stack should have more frames, but GDB was not able to correctly detect frames. This may be caused by assembler code which does not follow ABI).
BTW, I've just realized that command-line interface does not use mi_* interface (neither mi_on_resume nor mi_execute_command were hit) and this is most likely the reason why I cannot reproduce this test case with CLI.
Dmitry
-----Original Message-----
From: Pedro Alves <pedro@codesourcery.com>
To: gdb@sourceware.org, Dmitry Smirnov <divis1969@mail.ru>
Date: Tue, 24 Jun 2008 18:29:28 +0100
Subject: Re: How to catch GDB crash
>
> A Tuesday 24 June 2008 18:02:49, Dmitry Smirnov wrote:
> > As you can see, first time
> > mi_on_resume is called with ptid={pid = -1, lwp = 0, tid = 0}. Something
> > happens between this call and second call where ptid={pid = 42000, lwp = 0,
> > tid = 0}.
> >
> > I'm going to figure out which command is followed by wrong pid. I'm
> > suspecting memory corruption.
>
> This pid is used by GDB internally when you are connected to a target
> that does not support threads at all, like small embedded systems.
> If the remote side doesn't have a notion of thread ids or pids, that
> magic number is what GDB will use internally. This code path can
> be triggered for example while stepping over a breakpoint (doing
> nexti / -exec-next-instruction while stopped at a breakpoint).
>
> > BTW, command 'info threads' gives me
> > (gdb) info threads
> > warning: RMT ERROR : failed to get remote thread list.
>
> ... which this seems to corroborate.
>
> This is a new bug in GDB that was introduced recently.
>
> I've already said in my last reply what needs to be done
> to fix it.
>
> If your target *does* support threads and the remote protocol
> thread related packets, than there's yet another bug somewhere
> else.
>
> --
> Pedro Alves
>
next prev parent reply other threads:[~2008-06-25 8:03 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 [this message]
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
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=E1KBPxZ-0008HB-00.divis1969-mail-ru@f62.mail.ru \
--to=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