Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: Suggestion: backtrace stop guard for threads callstacks
Date: Thu, 02 Mar 2006 03:19:00 -0000	[thread overview]
Message-ID: <20060302031921.GA24107@nevyn.them.org> (raw)
In-Reply-To: <20060302012943.GK1579@adacore.com>

On Wed, Mar 01, 2006 at 05:29:43PM -0800, Joel Brobecker wrote:
> It's a little bit less simple for the general case for C, C++ and other
> languages, but I suggest we implement something similar. How about we
> add some code that recognizes some of the thread entry-points? For
> the GNU/Linux NPTL for instance, we could recognize clone() or perhaps
> _start_thread? We could make the check as stringent as we like, for
> instance not only check the funtion name, but also the object name,
> to make sure we're inside the pthread library.

FYI, this is discussed here about five times a year in one form or
another.  For systems we control, the correct solution is not this at
all, but to add unwinding information or suitable prologues that
indicate the end of the stack.  Almost every architecture has a
suitable sequence, and we have a recently-decided-upon DWARF convention
to represent it also.

Whatever platform you're looking at, does the beginning of
_thread_start make sufficiently clear that we're at the end of the
stack?  If not, perhaps you should register an appropriate unwinder to
notice it and stop.

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2006-03-02  3:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-02  1:29 Joel Brobecker
2006-03-02  3:19 ` Daniel Jacobowitz [this message]
2006-03-02 10:56   ` Andrew STUBBS
2006-03-02 17:38     ` Jim Blandy
2006-03-02 17:55   ` Joel Brobecker
2006-03-02 17:58     ` Daniel Jacobowitz
2006-03-02 18:36       ` Daniel Jacobowitz
2006-03-02 22:14       ` Jim Blandy
2006-03-02 22:17         ` Jim Blandy

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=20060302031921.GA24107@nevyn.them.org \
    --to=drow@false.org \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sources.redhat.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