This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Support -fsplit-stack (previous frame inner to this frame)


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]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]