-
-
Notifications
You must be signed in to change notification settings - Fork 421
Print source file directory in stack traces #2945
Conversation
|
Thanks for your pull request and interest in making D better, @yazd! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + druntime#2945" |
|
Please also add a test and either a changelog entry or reference a bugzilla issue |
|
There is already a test in druntime for this (line_trace under https://github.com/dlang/druntime/blob/master/test/exceptions/). |
|
Don't worry about LDC, it has its own version of druntime that is updated periodically. |
|
Is the test failure random? If there is anything left for me to do, let me know. Edit: oh I see, it's due to a conflict. I'll resolve that now. |
DMD's implementation of dwarf debug data puts the directory in the filename directly. A more correct implementation, like LDC's, uses the
include_directoriesfor that.The current implementation only uses the filenames when printing the stacktrace. This means that stacktraces for programs compiled using LDC only contained the filename (not including the filepath).
vs
This commit fixes the stack trace printing to use directory name as well if available so that it works for DMD and LDC.