From: Daniel Jacobowitz <drow@false.org>
To: Jonathan Larmour <jifl@eCosCentric.com>
Cc: gdb@sources.redhat.com
Subject: Re: Thread backtrace termination
Date: Mon, 11 Jul 2005 16:23:00 -0000 [thread overview]
Message-ID: <20050711162326.GA32686@nevyn.them.org> (raw)
In-Reply-To: <42D29C67.4070509@eCosCentric.com>
On Mon, Jul 11, 2005 at 05:20:55PM +0100, Jonathan Larmour wrote:
> The two "global constructors keyed to cyg_scheduler_start" lines are bogus
> frame entries, although those also happened with GDB 6.1. The "corrupt
> stack" whinge is new, and is treated as an error, including terminating
> gdbinit scripts etc.
This is already changed in CVS.
> I tried reverting
> <http://sources.redhat.com/ml/gdb-patches/2004-01/msg00104.html>, but that
> in itself isn't the issue. I know there were a bunch of other dwarf
> unwinder changes for GDB 6.2. But rather than try and explain what I've
> already tried to do, I'd be interested if someone could clarify to me what
> the termination conditions for a backtrace actually _are_. i.e. as an OS
> author, how do I initialise a thread context to persuade GDB to stop when
> it reaches the innermost frame. I've tried looking at the glibc sources to
> see how its thread support works, but it's rather a twisty maze of
> passages, and I don't know whether it would have this problem as well
> anyway.
In general there's no defined way to do this. If the start routine is
written in assembly, take a look at the example I posted earlier this
year of using dwarf2 unwind information to terminate a backtrace by
marking the return address column as undefined. There's a matching GDB
patch, which was committed to HEAD after 6.3.
For compiler-generated code there's really no useful way to do this.
--
Daniel Jacobowitz
CodeSourcery, LLC
next prev parent reply other threads:[~2005-07-11 16:23 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-11 16:21 Jonathan Larmour
2005-07-11 16:23 ` Daniel Jacobowitz [this message]
2005-07-11 17:52 ` Jonathan Larmour
2005-07-11 18:19 ` Daniel Jacobowitz
2005-07-12 18:32 ` Jonathan Larmour
2005-07-13 10:35 ` Steven Johnson
2005-07-13 12:53 ` GDB is stepping past main() Konstantin Karganov
2005-07-13 13:05 ` Daniel Jacobowitz
2005-07-13 13:31 ` Konstantin Karganov
2005-07-13 13:39 ` Nathan J. Williams
2005-07-13 13:47 ` Konstantin Karganov
2005-07-13 13:50 ` Dave Korn
2005-07-13 13:46 ` Daniel Jacobowitz
2005-07-13 13:57 ` Konstantin Karganov
2005-07-14 14:27 ` MI *stopped reason Konstantin Karganov
2005-07-14 14:40 ` Bob Rossi
2005-07-14 15:15 ` Incorrect breakpoint diagnostics in MI Konstantin Karganov
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=20050711162326.GA32686@nevyn.them.org \
--to=drow@false.org \
--cc=gdb@sources.redhat.com \
--cc=jifl@eCosCentric.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).