http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54572
--- Comment #9 from Janne Blomqvist <jb at gcc dot gnu.org> 2012-11-27 08:58:59 UTC --- (In reply to comment #7) > Why are there no line numbers in the backtrace from gdb? You said you > compiled > with -g. Are you sure that libbacktrace itself was compiled with -g? I meant that I compiled the Fortran testcase with -g; GCC itself, including libbacktrace, was built with default flags which ought to be "-O2 -g", but I didn't specifically check how libbacktrace was built. Now that you mention it, it does indeed seem like libbacktrace doesn't have debug symbols for some reason. (In reply to comment #8) > The crash within libbacktrace is occurring as it tries to read the debug > info. > This is presumably a bug in libbacktrace, but I don't know what the problem is > without more information. libbacktrace is pretty careful to only read memory > that was explicitly read. There is presumably a bug there, but I don't know > what it is. > > I doubt the fact that a signal occurred has anything to do with this. There > seems to be something odd about the debug info, as shown both by the fact that > libbacktrace crashes trying to read it and that gdb does not display file/line > information. I forgot to mention, that I'm able to get a symbolic backtrace from outside a signal handler. Though in that case my testcase used external procedures rather than module procedures, so I guess it's possible there's a bug in handling debug info for module procedures. I'll recheck this..