This is the mail archive of the
mailing list for the GCC project.
Re: __builtin_return_address question
- From: "H. J. Lu" <hjl at lucon dot org>
- To: "Neal D. Becker" <nbecker at hns dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 21 Aug 2002 07:05:21 -0700
- Subject: Re: __builtin_return_address question
- References: <firstname.lastname@example.org>
On Wed, Aug 21, 2002 at 09:27:15AM -0400, Neal D. Becker wrote:
> I'm trying to make a stack trace function. Use of
> __builtin_return_address looks promising, but the arg has to be a
> constant expression. Because the arg can't be a variable, I don't see
> how I can traceback more than one level of the stack. Any ideas?
If you use glibc, you can use <execinfo.h>.