www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Stack trace, can we do something ?

reply "deadalnix" <deadalnix gmail.com> writes:
A paste is worth a long story : http://pastebin.com/XbL2dv9S

That is really bad, and debugging horribly difficult. Basically, 
no file/line numbers and no demangling.

We tend to get used to it, unless it gets exceptionally bad, but 
I'm pretty sure this kind of things can scare newcomers.
Mar 21 2014
next sibling parent "Yazan Dabain" <yazan.dabain gmail.com> writes:
On Saturday, 22 March 2014 at 05:52:49 UTC, deadalnix wrote:
 A paste is worth a long story : http://pastebin.com/XbL2dv9S

 That is really bad, and debugging horribly difficult. 
 Basically, no file/line numbers and no demangling.

 We tend to get used to it, unless it gets exceptionally bad, 
 but I'm pretty sure this kind of things can scare newcomers.

For ELF binaries with DWARF debug symbols, it's not that hard to provide filenames and line numbers. I have some code which reads the debug symbols without using any external libraries, but the symbols produced by DMD are inaccurate which I would say would be worse to display as inaccurate file/line info. Check http://d.puremagic.com/issues/show_bug.cgi?id=10679. And so I stopped at the proof of concept. I have some time to resume work on that, I'll clean it up and push it to github in hope that this issue is looked at. In the meantime, you can use addr2line to get file/line information and I provide a way to do that automatically with this library: https://github.com/yazd/backtrace-d
Mar 22 2014
prev sibling next sibling parent Martin Nowak <code dawg.eu> writes:
On 03/22/2014 06:52 AM, deadalnix wrote:
 A paste is worth a long story : http://pastebin.com/XbL2dv9S

 That is really bad, and debugging horribly difficult. Basically, no
 file/line numbers and no demangling.

 We tend to get used to it, unless it gets exceptionally bad, but I'm
 pretty sure this kind of things can scare newcomers.

Something that I want for quite a while is to reverse the stacktrace order. It's mostly the message and the last two or three stackframes, that are actually interesting. Having them at the bottom of the console would be helpful. Another point is to fix the demangler, also fully qualified names are overly verbose. Last thing is to gather file locations from debug info, but that required much more effort. https://d.puremagic.com/issues/show_bug.cgi?id=11870
Mar 27 2014
prev sibling next sibling parent "Andrea Fontana" <nospam example.com> writes:
On Saturday, 22 March 2014 at 05:52:49 UTC, deadalnix wrote:
 A paste is worth a long story : http://pastebin.com/XbL2dv9S

 That is really bad, and debugging horribly difficult. 
 Basically, no file/line numbers and no demangling.

 We tend to get used to it, unless it gets exceptionally bad, 
 but I'm pretty sure this kind of things can scare newcomers.

True story
Mar 27 2014
prev sibling parent =?UTF-8?B?IlRow6lv?= Bueno" <munrek gmx.com> writes:
On Saturday, 22 March 2014 at 05:52:49 UTC, deadalnix wrote:
 A paste is worth a long story : http://pastebin.com/XbL2dv9S

 That is really bad, and debugging horribly difficult. 
 Basically, no file/line numbers and no demangling.

 We tend to get used to it, unless it gets exceptionally bad, 
 but I'm pretty sure this kind of things can scare newcomers.

As a newcomer, I was using DMD and I had very clever stacktraces when I made errors with arrays ( including file/line numbers ). I don't know if it is related to the compiler, but I am quite satisfacted with the stacktraces I have when they happend ... ... but sometimes, I also had programs crashing without any further information. In these cases indeed I would like improvements concerning errors.
Mar 28 2014