From: Ulrich Drepper Date: Thu, 6 Jan 2000 00:06:01 +0000 (+0000) Subject: (struct layout): Delete definition; include frame.h instead. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=90dc2e33acb28265fe3783bf294f626eac7558a0;p=thirdparty%2Fglibc.git (struct layout): Delete definition; include frame.h instead. (__backtrace): Use ADVANCE_STACK_FRAME. --- diff --git a/sysdeps/generic/backtrace.c b/sysdeps/generic/backtrace.c index 2d329e19cff..3eae3f44f7e 100644 --- a/sysdeps/generic/backtrace.c +++ b/sysdeps/generic/backtrace.c @@ -19,7 +19,8 @@ Boston, MA 02111-1307, USA. */ #include - +#include +#include /* This is a global variable set at program start time. It marks the highest used stack address. */ @@ -49,11 +50,11 @@ extern void *__libc_stack_end; # define INNER_THAN < #endif -struct layout -{ - struct layout *next; - void *return_address; -}; +/* By default assume the `next' pointer in struct layout points to the + next struct layout. */ +#ifndef ADVANCE_STACK_FRAME +# define ADVANCE_STACK_FRAME(next) ((struct layout *) (next)) +#endif int __backtrace (array, size) @@ -81,7 +82,7 @@ __backtrace (array, size) array[cnt++] = current->return_address; - current = current->next; + current = ADVANCE_STACK_FRAME (current->next); } return cnt;