Re: line numbers for linux exception traces

2015-08-07 Thread Martin Nowak via Digitalmars-d-announce
On 08/06/2015 05:32 PM, Colin wrote: I wonder how difficult implementing this in the compiler would be? Obviously cant use external tools... I also opened an ER to collect some ideas for nicer backtraces. https://issues.dlang.org/show_bug.cgi?id=14885

Re: line numbers for linux exception traces

2015-08-07 Thread Martin Nowak via Digitalmars-d-announce
On 08/06/2015 05:32 PM, Colin wrote: I wonder how difficult implementing this in the compiler would be? Obviously cant use external tools... It's not too complex to implement in the *runtime*. The code already exists, someone just needs to remove the phobos dependencies.

Re: line numbers for linux exception traces

2015-08-07 Thread Martin Nowak via Digitalmars-d-announce
On 08/07/2015 08:00 PM, Martin Nowak wrote: On 08/06/2015 05:32 PM, Colin wrote: Here is that card in our backlog btw. https://trello.com/c/FbuWfpVE/13-backtraces-with-line-numbers

Re: line numbers for linux exception traces

2015-08-06 Thread Colin via Digitalmars-d-announce
On Wednesday, 5 August 2015 at 15:57:46 UTC, Adam D. Ruppe wrote: If you just download this little file: http://arsdnet.net/dcode/linetrace.d [...] This is v nice - thanks! I wonder how difficult implementing this in the compiler would be? Obviously cant use external tools...

line numbers for linux exception traces

2015-08-05 Thread Adam D. Ruppe via Digitalmars-d-announce
If you just download this little file: http://arsdnet.net/dcode/linetrace.d and add it to your build, when compiling in debug mode, it will translate the addresses into line numbers (by simply piping out to addr2line on the command line) No modification to your program is required.

Re: line numbers for linux exception traces

2015-08-05 Thread Adam D. Ruppe via Digitalmars-d-announce
Oh also a note about addr2line's output on my computer at least: it prints the line of the *next* instruction after the function call, which can be a few lines away sometimes. But still, close enough: go to the line it references then look immediately before it and you should see the function

Re: line numbers for linux exception traces

2015-08-05 Thread Martin Nowak via Digitalmars-d-announce
On Wednesday, 5 August 2015 at 15:57:46 UTC, Adam D. Ruppe wrote: If you just download this little file: http://arsdnet.net/dcode/linetrace.d and add it to your build, when compiling in debug mode, it will translate the addresses into line numbers (by simply piping out to addr2line on the