[RFC] Backtrace oddity with verbose on

Daniel Jacobowitz drow@false.org
Thu Feb 8 16:12:00 GMT 2007


On Tue, Jan 30, 2007 at 02:16:10PM -0700, Fred Fish wrote:
> If a stack backtrace triggers one of the "corrupt stack" errors like
> the following:
> 
>     Previous frame identical to this frame (corrupt stack?)
> 
> the backtrace command will print nothing except this message the first
> time a backtrace is done, if verbose is on.  For example, without
> verbose on, you get:

I see that you're working from an older GDB here.  Does this still
happen on HEAD?  That condition no longer triggers a call to error().

>     #6  0x04065ad0 in system_console_thread () at ../common/applications/system/system.c:548
>     Reading in symbols for ../ukern/common/thread.c...done.
>     #7  0x0400ba00 in thread_debug () at ../ukern/common/thread.c:893

> I wonder if perhaps this attempt to prevent this sort of output is
> misguided.  With verbose on, we typically expect to see additional
> verbose output interspersed with other output.  So perhaps the best
> solution is also the simplest, just delete that code.

At least it's on its own lines, not mixed in with the lines of the
backtrace.  I think deleting the prereading loop is reasonable.  If
you have some reason to keep it, though, you could wrap it in
TRY_CATCH.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb-patches mailing list