On Fri, 25 Oct 2013 18:22:25 +0200, Jan Kratochvil wrote:
On Fri, 25 Oct 2013 16:56:23 +0200, Mark Wielaard wrote:
> Sorry for a late suggestion, but I only thought of it now. Before I
> didn't fully appreciate why you wanted to see the difference between
> "real error" and "no information available".
>
> Since dwfl_thread_getframes returns an int, could we change it to:
Sorry but I do not think it matters too much to differentiate
CFI-interpretation-error vs. CFI-not-found-error.
I forgot the primary reason. One of the next features out of the
critical-path of this patchset is the planned fallback to unwinding by frame
pointer (%bp). Still gcc-4.4 compiles for '-m32' (with -O0 or -O2) without
.eh_frame/.debug_frame for all functions. -m64 or gcc-4.6+ already use
.eh_frame by default.
Although I was never sure with such a feature, it is not needed for system
binaries and it at least finds a bug in compilation options. The problem is
that if you use 'gcc-4.4 -m32 -O2 -fomit-frame-pointer' then frame pointer
unwinding will unwind garbage. One could check for frame pointer setup
prologue but only if .symtab has been kept in the binary.
So in the end I am not sure it is good to implement the frame pointer
unwinding fallback at all.
Jan