- To: libc-gnats at gnu dot org, gnats-admin at gnu dot org
- Subject: libc/2632: backtrace function on arm-linux doesn't work
- From: ben at somanetworks dot com
- Date: Mon, 05 Nov 2001 19:57:22 -0500
>Number: 2632
>Category: libc
>Synopsis: backtrace function on arm-linux doesn't work
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: libc-gnats
>State: open
>Quarter:
>Keywords:
>Class: sw-bug
>Submitter-Id: gnatsweb
>Arrival-Date: Mon Nov 05 19:57:22 -0500 2001
>Cases:
>Originator: Ben Gamsa
>Release: 2.2.4
>Organization:
SOMA Networks, Inc
>Environment:
arm-linux
gcc version 2.95.2 19991024
>Description:
Using the backtrace() function returns an empty list, or
sometimes with a single null entry.
>How-To-Repeat:
>Fix:
The code appears to come from sysdeps/generic/backtrace.c
The top_frame variable is correctly set to the top-of-frame
but the code assumes that the address it gets points to the
beginning of the frame structure. However, on the arm, it
actually points just past the frame structure. The
ADVANCE_STACK_FRAME correctly deals with this by
subtracting 1 from the pointer to the frame, but the very
first frame doesn't appear to have any compensation code.
>Unformatted: