[uClibc] backtrace() function

Andrew May acmay at acmay.homeip.net
Thu Apr 28 04:51:31 UTC 2005


On Wed, 2005-04-27 at 19:41 -0700, maryam wrote:
> Hello All,
> I was wondering if anybody has any suggestion or 
> know of a workaround until the following feature 
> has been implemented:
> 0000101: Implementation of backtrace() from glibc
> would be useful

There is a gcc built in to do the return address, but it needs
a hardcoded number. So you can't loop over this, but you can
do it a few levels deep without too much trouble.

printf( "trace %p %p\n",
	__builtin_return_address (0),
	__builtin_return_address (1) );

I would like to see a better way too.





More information about the uClibc mailing list