Catch exception from external library

2011-08-10 Thread Callum Anderson
Hi, Is there any way to catch unhandled exceptions thrown by external libraries? I am calling an external C library function, which works fine in release mode, however in debug mode it throws a SIGSEV. I would like to debug later parts of the code, but can;t get past this function when debugging

Re: SegFaults when using Fibers

2011-08-10 Thread Kagamin
Danny Arends Wrote: > OK > Thanks very much, made myself an account there and > re-posted the issue. Not OK. You forgot testcase.

Re: Importing D libraries

2011-08-10 Thread Dainius (GreatEmerald)
A question about RDMD - can it compile libraries as well? Since right now it compiles my library code fine, yet I get an .a file that is mere 72 bytes of size, so I'm pretty sure that it's not what I am supposed to be getting. The command I use to compile it is: rdmd --build-only -lib -L-llua

Re: Frontend and backend communication

2011-08-10 Thread Dainius (GreatEmerald)
Oh, so structs themselves are only definitions and not global variables, I see. Thanks.

Re: Unittesting libraries

2011-08-10 Thread simendsjo
On 10.08.2011 12:11, Jonathan M Davis wrote: On Wednesday, August 10, 2011 12:01:00 simendsjo wrote: On 10.08.2011 09:29, Jonathan M Davis wrote: On Wednesday, August 10, 2011 09:11:53 simendsjo wrote: On 08.08.2011 14:11, simendsjo wrote: Is it possible to run unittests in libraries? The fol

Re: SegFaults when using Fibers

2011-08-10 Thread Danny Arends
OK Thanks very much, made myself an account there and re-posted the issue. Though it still feels like I'm doing something wrong

Re: Unittesting libraries

2011-08-10 Thread Jonathan M Davis
On Wednesday, August 10, 2011 12:01:00 simendsjo wrote: > On 10.08.2011 09:29, Jonathan M Davis wrote: > > On Wednesday, August 10, 2011 09:11:53 simendsjo wrote: > >> On 08.08.2011 14:11, simendsjo wrote: > >>> Is it possible to run unittests in libraries? > >>> The following doesn't work: > >>>

Re: Unittesting libraries

2011-08-10 Thread simendsjo
On 10.08.2011 09:29, Jonathan M Davis wrote: On Wednesday, August 10, 2011 09:11:53 simendsjo wrote: On 08.08.2011 14:11, simendsjo wrote: Is it possible to run unittests in libraries? The following doesn't work: l.d === module l; import std.stdio; int f() { return 1; } // just to make sure it

Re: SegFaults when using Fibers

2011-08-10 Thread simendsjo
On 10.08.2011 11:53, Danny Arends wrote: (Also posted this in bugs, but I think it needs to be here) The bugs newsgroup should be read-only. Post bugs here: http://d.puremagic.com/issues/ Events in bugzilla gets posted to the bugs newsgroup

SegFaults when using Fibers

2011-08-10 Thread Danny Arends
(Also posted this in bugs, but I think it needs to be here) When I try to print floats and doubles from a fiber it fails with a segfault, while it is possible to do the same in the main thread. The expected output of the attached code file: 15 15 Done However I get: 15 segfault I am using the D

Re: DDoc adds filename as given on dmd command line in comment

2011-08-10 Thread simendsjo
On 10.08.2011 11:33, Jonathan M Davis wrote: On Wednesday, August 10, 2011 11:24:49 simendsjo wrote: On 10.08.2011 09:36, Jonathan M Davis wrote: On Wednesday, August 10, 2011 09:13:02 simendsjo wrote: On 08.08.2011 15:36, simendsjo wrote: I use absolute paths in a build script, and Ddoc uses

Re: DDoc adds filename as given on dmd command line in comment

2011-08-10 Thread Jonathan M Davis
On Wednesday, August 10, 2011 11:24:49 simendsjo wrote: > On 10.08.2011 09:36, Jonathan M Davis wrote: > > On Wednesday, August 10, 2011 09:13:02 simendsjo wrote: > >> On 08.08.2011 15:36, simendsjo wrote: > >>> I use absolute paths in a build script, and Ddoc uses the full path > >>> in a comment

Re: DDoc adds filename as given on dmd command line in comment

2011-08-10 Thread simendsjo
On 10.08.2011 09:36, Jonathan M Davis wrote: On Wednesday, August 10, 2011 09:13:02 simendsjo wrote: On 08.08.2011 15:36, simendsjo wrote: I use absolute paths in a build script, and Ddoc uses the full path in a comment in the generated files. This makes version control very difficult as all de

Re: Frontend and backend communication

2011-08-10 Thread Pelle
On Wed, 10 Aug 2011 10:35:46 +0200, Dainius (GreatEmerald) wrote: I seem to have run into a problem with the function pointer method here. I have this code: arco.d: struct FrontendFunctions { void function(SoundTypes) Sound_Play; void function() RedrawScreenFull;

Re: Frontend and backend communication

2011-08-10 Thread Dainius (GreatEmerald)
I seem to have run into a problem with the function pointer method here. I have this code: arco.d: struct FrontendFunctions { void function(SoundTypes) Sound_Play; void function() RedrawScreenFull; void function(const char*, int) PrecacheCard; void function(Car

Re: DDoc adds filename as given on dmd command line in comment

2011-08-10 Thread Jonathan M Davis
On Wednesday, August 10, 2011 09:13:02 simendsjo wrote: > On 08.08.2011 15:36, simendsjo wrote: > > I use absolute paths in a build script, and Ddoc uses the full path in a > > comment in the generated files. This makes version control very > > difficult as all developers has to use the same locati

Re: Unittesting libraries

2011-08-10 Thread Jonathan M Davis
On Wednesday, August 10, 2011 09:11:53 simendsjo wrote: > On 08.08.2011 14:11, simendsjo wrote: > > Is it possible to run unittests in libraries? > > The following doesn't work: > > > > l.d > > === > > module l; > > import std.stdio; > > int f() { return 1; } // just to make sure it's actually com

Re: DDoc adds filename as given on dmd command line in comment

2011-08-10 Thread simendsjo
On 08.08.2011 15:36, simendsjo wrote: I use absolute paths in a build script, and Ddoc uses the full path in a comment in the generated files. This makes version control very difficult as all developers has to use the same location (and possibly operating system). Is there a way to avoid this wit

Re: Unittesting libraries

2011-08-10 Thread simendsjo
On 08.08.2011 14:11, simendsjo wrote: Is it possible to run unittests in libraries? The following doesn't work: l.d === module l; import std.stdio; int f() { return 1; } // just to make sure it's actually compiled in unittest { writeln("Unittest from lib"); assert(false); } t.d === import l; i