Summary: Add file and line numbers to Linux stack traces using
--- Comment #0 from Jonathan M Davis <jmdavisp...@gmx.com> 2012-02-06 15:10:58
I'm not quite sure what the situation on Windows or other Posix OSes is, but on
Linux, D's stack traces lack files and line numbers. We sort of get the file
name thanks to the fact that the module name _is_ the file name (or at least
close to it) and that ends up as part of the symbol, but the actual file name
would still be nice, and we lack the line number regardless.
Per this answer on stackoveflow (method #4):
it should be possible to get the file and line number for at least some portion
of a stack trace (some lines seem to end up with ??:0 rather than any real
information, but that's still better than nothing).
I did some experimenting on my own, and it appears that the address printed in
the stack trace does indeed work with addr2line with some lines as long as I
compile with -g. So, I don't think that we can always have stack traces with
file names and line numbers, but we _can_ as long as debug symbols are enabled.
As such, I think that we should add file names and line numbers to D's stack
traces on Linux. If we can do it for other OSes, we should do it there as well,
but I'm opening up this enhancement specifically for Linux because that's the
only one for which I have any clue how to do it.
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------