This is the mail archive of the gdb-patches@sources.redhat.com 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] allow switching stacks


On Tue, Mar 09, 2004 at 03:21:25PM -0500, Andrew Cagney wrote:
> >Hi Everyone,
> >
> >This patch against gdb-6.0 adds an option to disable an error check
> >which reports a non-contiguous stack as corrupted. I need this
> >option to get a reliable stack trace using kgdb on the x86-64 Linux
> >kernel because it uses a separate per-processor interrupt stack.
> >
> >This option is enabled with:
> >
> >     set backtrace switch-stacks on
> >
> >Jim Houston - Concurrent Computer Corp.
> 
> Can you provide more details of the problem -- exactly what do things 
> look like at the stack switch?
> 
> Your problem sounds very similar to the combination of a signal altstack 
> and a signal trampoline - for such a situtation the stack direction 
> check isn't applicable (pointing to the real bug).

They're going to look like normal frames unless GDB has magic to
recognize the interrupt handler, which doesn't seem like a good idea to
me - we can just use CFI to unwind through these things, otherwise.

There's no way in unwind information to annotate a non-call frame,
which is the common relevant property for signal frames, dummy frames,
and interrupt handler frames.   Should there be?

The other question is whether the order check is really safe at all.  I
can write (un-portable, using assembly, sure) code to call a function
on an alternate stack.  It would be nice to be able to backtrace
through something like that, if practical.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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