Collateral exceptions seem to be broken

2011-05-08 Thread Andrej Mitrovic
import std.stdio; import std.conv; import std.exception; void main() { try { foo(); } catch (Exception e) { for (Throwable t = e; t !is null; t = t.next) { writeln(t); } } } void foo() { try { throw new Exception(

Re: Collateral exceptions seem to be broken

2011-05-08 Thread KennyTM~
On May 9, 11 04:31, Andrej Mitrovic wrote: import std.stdio; import std.conv; import std.exception; void main() { try { foo(); } catch (Exception e) { for (Throwable t = e; t !is null; t = t.next) { writeln(t); } } }

Re: Collateral exceptions seem to be broken

2011-05-08 Thread Andrej Mitrovic
Yeah it seems to be fixed in 2.053 beta. But why is the stack trace printed out? Is that the new norm when printing caught exceptions with write()? Regardless of that, I don't get any symbols printed out when building with dmd -g -debug: C:\dmd2\windows\bin>dmd -debug -g test.d C:\dmd2\windows\b

Re: Collateral exceptions seem to be broken

2011-05-08 Thread Jonathan M Davis
> Yeah it seems to be fixed in 2.053 beta. > > But why is the stack trace printed out? Is that the new norm when > printing caught exceptions with write()? > > Regardless of that, I don't get any symbols printed out when building > with dmd -g -debug: > > C:\dmd2\windows\bin>dmd -debug -g test.d

Re: Collateral exceptions seem to be broken

2011-05-08 Thread Andrej Mitrovic
No, I'm on Windows. And I can't get any symbols unless I run cv2pdb (http://www.dsource.org/projects/cv2pdb) on the executable. Here's my console log: D:\dev\code\d_code>type test.d import std.exception; void main() { foo(); } void foo() { throw new Exception("foo"); } D:\dev\code\d_co

Re: Collateral exceptions seem to be broken

2011-05-08 Thread Jonathan M Davis
> No, I'm on Windows. And I can't get any symbols unless I run cv2pdb > (http://www.dsource.org/projects/cv2pdb) on the executable. There was a discussion on that recently. From what I understand, your build has to have debug symbols for you to get any function names (otherwise, it won't have an

Re: Collateral exceptions seem to be broken

2011-05-08 Thread Andrej Mitrovic
You mean my build of DMD/Phobos? Well the debug symbols are definitely shown after I run cv2pdb on the executable (it makes a .pdb file with all the symbols which get loaded at runtime by the exe). Perhaps displaying names is just unimplemented yet in 2.053 for Windows. Using cv2pdb is not a prob

Re: Collateral exceptions seem to be broken

2011-05-08 Thread Jonathan M Davis
On 2011-05-08 15:57, Andrej Mitrovic wrote: > You mean my build of DMD/Phobos? > > Well the debug symbols are definitely shown after I run cv2pdb on the > executable (it makes a .pdb file with all the symbols which get loaded > at runtime by the exe). > > Perhaps displaying names is just unimplem

Re: Collateral exceptions seem to be broken

2011-05-09 Thread Rainer Schuetze
Andrej Mitrovic wrote: You mean my build of DMD/Phobos? Well the debug symbols are definitely shown after I run cv2pdb on the executable (it makes a .pdb file with all the symbols which get loaded at runtime by the exe). Perhaps displaying names is just unimplemented yet in 2.053 for Windows.

Re: Collateral exceptions seem to be broken

2011-05-09 Thread Sean Kelly
On May 8, 2011, at 3:57 PM, Andrej Mitrovic wrote: > > Perhaps displaying names is just unimplemented yet in 2.053 for > Windows. Using cv2pdb is not a problem for me (and it allows me to use > VisualD's debugger, which is nice). This should be implemented in the 2.053 beta.

Re: Collateral exceptions seem to be broken

2011-05-09 Thread KennyTM~
On May 10, 11 02:05, Rainer Schuetze wrote: - creating the stack trace uses core.demangle on each symbol, but any symbol that cannot be demangled causes exceptions when trying to demangle it, resulting in recursive attempts to dump the stack. These symbols include C-style, compressed and "SHA'd"

Re: Collateral exceptions seem to be broken

2011-05-10 Thread Rainer Schuetze
Rainer Schuetze wrote: Andrej Mitrovic wrote: You mean my build of DMD/Phobos? Well the debug symbols are definitely shown after I run cv2pdb on the executable (it makes a .pdb file with all the symbols which get loaded at runtime by the exe). Perhaps displaying names is just unimplemented ye

Re: Collateral exceptions seem to be broken

2011-05-10 Thread Stephan
On 09.05.2011 20:05, Rainer Schuetze wrote: I suggest to even add debug symbols to the release build of phobos, as you also don't have debug info for non-template classes and structs declared inside phobos, even if your application is built with -g. Rainer That is a excellent idea. Can you pos

Re: Collateral exceptions seem to be broken

2011-05-14 Thread Rainer Schuetze
Stephan wrote: On 09.05.2011 20:05, Rainer Schuetze wrote: I suggest to even add debug symbols to the release build of phobos, as you also don't have debug info for non-template classes and structs declared inside phobos, even if your application is built with -g. Rainer That is a excellent