[Crash-utility] [PATCH] Use backtrace() instead of __builtin_return_address()

Bernhard Walle bwalle at suse.de
Wed May 14 15:31:58 UTC 2008



* Dave Anderson [2008-05-14 11:11]:
>
> I suppose we could go with 5 instead of 4, and have dump_trace()
> skip the first one, presuming that this anomoly is not architecture-
> or compiler-dependent.  Or maybe make it macro?

Did you compile with some optimisation? I think I remember that gcc
only inlines code with optimisation turned on.

I think it makes sense to use

`always_inline'
     Generally, functions are not inlined unless optimization is
     specified.  For functions declared inline, this attribute inlines
     the function even if no optimization level was specified.

here, i.e. __attribute__((always_inline)). I personally prefer inline
functions over macros.


	Bernhard




More information about the Crash-utility mailing list