I checked again the source code and made some tests. For what I saw, that arch specififc code is no longer needed. On older systems, backtrace() returned everything but the instruction pointer of the place where the segmentation fault occured (obviously the most interesting one). This was due to the way how signal handling worked. The arch specific code tried to fetch the corresponding address and store it in the array before passing it to backtrace_symbols() for looking up the function names.

My tests showed that this behaviour is different today. I don't know whether a change in the kernel or libc is the reason, but it looks as if the arch specififc code is no longer needed and thus, in libguytools 2.0.4, it has been commented out. 2.0.4 is available on Sourceforge.

Another thing that needs attention: Due to several code optimisations, notably frame pointer elimination (but others also), backtracing not always works. The code in toolsignal.cpp should be regarded as a best effort for getting valuable information in case a program causes a segfault.

Guy Voncken


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to