From: Doug Evans <dje@google.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org, Ian Lance Taylor <iant@google.com>
Subject: Re: [patch] Support -fsplit-stack (previous frame inner to this frame)
Date: Tue, 23 Nov 2010 00:34:00 -0000 [thread overview]
Message-ID: <AANLkTikii4W0-s809vmd_1FECiDHy1+JmO=c9nPefkid@mail.gmail.com> (raw)
In-Reply-To: <20101123001325.GA11983@host0.dyn.jankratochvil.net>
On Mon, Nov 22, 2010 at 4:13 PM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> Hi,
>
> currently on a code with gcc -fsplit-stack `backtrace' does not work (after
> the stack gets split):
>
> (gdb) bt
> #0 down (i=499) at split.c:36
> #1 0x0000000000400e74 in __morestack () at ../../../gcchead/libgcc/config/i386/morestack.S:374
> Backtrace stopped: previous frame inner to this frame (corrupt stack?)
>
> There were some intentions to remove frame_id_inner at all but then many
> corrupt stacks would backtrace indefinitely. Moreover as the current stop
> PC==0 should be removed one day for corrupted backtraces unwinding (PR by me
> backtrace/12237).
>
> I had an idea to instead create non-NORMAL_FRAME by a separate sniffer like
> currently present in inline-frame.c. The problem is unwinders currently
> cannot easily chain for a single frame. And this unwinder specific for the
> __morestack function needs to do standard DWARF frame unwinding. Chaining
> directly to dwarf2_frame_prev_register&co. is also not right as the code can
> be compiled for example with STABS instead.
>
> Maybe a proper unwinders chaining gets implemented one day (hacked in one for
> archer-jankratochvil-entryval) but for now I find this hack acceptable myself.
> Do you?
>
> No regressions on {x86_64,x86_64-m32,i686}-fedora14-linux-gnu. But the
> testcase works for me only for GCC HEAD on Fedora 14 (+not on Fedora 13),
> tested it there on x86_64 and x86_64-m32.
>
>
> Thanks,
> Jan
>
>
> gdb/
> 2010-11-23 Jan Kratochvil <jan.kratochvil@redhat.com>
>
> * frame.c (morestack_start, morestack_end, frame_new_objfile): New.
> (frame_id_inner): Check l.code_addr against them.
> (_initialize_frame): Install frame_new_objfile).
Nit: Do we have the framework for recording these globals per process?
[or some such - e.g. if/when gdb can debug multiple different
programs]
next prev parent reply other threads:[~2010-11-23 0:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-23 0:13 Jan Kratochvil
2010-11-23 0:34 ` Doug Evans [this message]
2010-11-23 2:12 ` Jan Kratochvil
2010-11-23 20:41 ` Tom Tromey
2010-11-23 22:38 ` Ian Lance Taylor
2010-11-24 0:29 ` Jan Kratochvil
2010-11-24 18:34 ` Tom Tromey
2011-01-03 13:11 ` Jan Kratochvil
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='AANLkTikii4W0-s809vmd_1FECiDHy1+JmO=c9nPefkid@mail.gmail.com' \
--to=dje@google.com \
--cc=gdb-patches@sourceware.org \
--cc=iant@google.com \
--cc=jan.kratochvil@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