This is the mail archive of the gdb-prs@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]

backtrace/1767: Backtrace in naked functions


>Number:         1767
>Category:       backtrace
>Synopsis:       Backtrace in naked functions
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 31 12:18:03 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Nigel Hathaway
>Release:        6.1
>Organization:
>Environment:
arm-elf-gdb on i686-cygwin
>Description:
This may or may not be ARM-specific.

Exception handlers are often 'naked' (i.e. no standard prologue/epilogue) because you often work off a different stack or need to manipulate things in some way.

In the exception handler itself it correctly detects that there is no stack frame and can't see back beyond the exception handler.  However, when in a function or further down, it correctly decodes all the stack frames up to the exception handler, and then gets into some sort of circular loop where it reports the exception handler ad infinitum as the previous stack frame. Like this:

#0  __clear_single_step () at gdb-stub.c:1452
#1  0x00008d90 in _gdb_undef_handler () at gdb-stub.c:219
#2  0x00008d90 in _gdb_undef_handler () at gdb-stub.c:219
#3  0x00008d90 in _gdb_undef_handler () at gdb-stub.c:219
#4  0x00008d90 in _gdb_undef_handler () at gdb-stub.c:219
#5  0x00008d90 in _gdb_undef_handler () at gdb-stub.c:219
#6  0x00008d90 in _gdb_undef_handler () at gdb-stub.c:219
#7  0x00008d90 in _gdb_undef_handler () at gdb-stub.c:219
#8  0x00008d90 in _gdb_undef_handler () at gdb-stub.c:219
#9  0x00008d90 in _gdb_undef_handler () at gdb-stub.c:219
.... ad infinitum

You have to kill gdb to get out of it.
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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