From: Randolph Chung <randolph@tausq.org>
To: gdb-patches@sources.redhat.com
Cc: brobecker@adacore.com
Subject: Re: [RFC] Infinite backtraces...
Date: Fri, 03 Dec 2004 02:43:00 -0000 [thread overview]
Message-ID: <20041203024314.GR6359@tausq.org> (raw)
In-Reply-To: <20041202231255.GM994@adacore.com>
> I am sort of walking on thin ice here, though. I could very well
> imagine a case where we would rely on register value in one case,
> and a flag from whatever frame information we find in another case.
> This is why I'm mentioning this idea here. JIC.
yeah, relying on return pointer register values seems a bit iffy. I
suspect it might be zero in your case only by luck. on hppa-linux, for
example:
(gdb) bt
#0 thread_function (arg=0x0)
at /home/tausq/gdb/gdb-cvs/gdb/testsuite/gdb.threads/manythreads.c:32
#1 0x405ee4b8 in pthread_start_thread () from /lib/libpthread.so.0
#2 0x405ee540 in pthread_start_thread_event () from /lib/libpthread.so.0
#3 0x40878514 in clone () from /lib/libc.so.6
#4 0x40878514 in clone () from /lib/libc.so.6
Previous frame identical to this frame (corrupt stack?)
so it terminates only because we are lucky... :(
for hppa-linux, i believe the correct fix is to fix glibc so that the
clone() procedure sets the "can't unwind" flag in the unwind record and
then using a mechanism similar to what you proposed, we can stop the
backtrace.
in your particular case, i'm curious to know how we get from a pc=0
frame to a previous frame. that seems like a bug to me?
i like the idea of a new method. perhaps the default implementation
could be instead the "main" and "entry point" logic that's currently in
the core frame code, and targets can overload and enhance this method
accordingly?
randolph
--
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
next prev parent reply other threads:[~2004-12-03 2:43 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-02 22:46 Joel Brobecker
2004-12-02 23:13 ` Joel Brobecker
2004-12-03 2:43 ` Randolph Chung [this message]
2004-12-03 2:57 ` Joel Brobecker
2004-12-03 4:53 ` Randolph Chung
2004-12-03 19:36 ` Joel Brobecker
2004-12-03 18:03 ` Randolph Chung
2004-12-03 18:20 ` Joel Brobecker
2004-12-03 18:22 ` Randolph Chung
2004-12-06 7:25 ` Randolph Chung
2004-12-07 10:07 ` Joel Brobecker
2004-12-07 16:31 ` Randolph Chung
2004-12-07 16:37 ` Joel Brobecker
2004-12-07 16:52 ` Randolph Chung
2004-12-08 1:51 ` Randolph Chung
2004-12-12 16:36 ` [commit] Move zero PC check to frame.c; Was: " Andrew Cagney
2004-12-03 18:22 ` Joel Brobecker
2004-12-06 4:15 ` Randolph Chung
2004-12-07 9:40 ` Joel Brobecker
2004-12-03 18:28 ` Andrew Cagney
2004-12-03 18:49 ` Joel Brobecker
2004-12-03 19:26 ` Andrew Cagney
2004-12-03 20:19 ` Joel Brobecker
2004-12-03 21:44 ` Andrew Cagney
2004-12-03 22:16 ` Joel Brobecker
2004-12-03 22:23 ` Daniel Jacobowitz
2004-12-03 22:25 ` Joel Brobecker
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=20041203024314.GR6359@tausq.org \
--to=randolph@tausq.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