SHORT Re: Suggestion: "fix" assert(obj)
Tom S
h3r3tic at remove.mat.uni.torun.pl
Sat Jun 16 18:42:02 PDT 2007
Jascha Wetzel wrote:
> Tom S wrote:
>> Uh... I just don't feel like teaching all my potential testers what a
>> debugger is, and that they should always run the game from within the
>> debugger, or I won't be able to help when something goes wrong :/
>
> you don't need to. just write a batch file that runs your program in the
> debugger and make it the default way to start the game for the testers.
> you'll have
>
> Unhandled Exception: EXCEPTION_ACCESS_VIOLATION(0xc0000005) at _Dmain
> debugees\debuggee.d:237 (0x00402768)
>
> instead of
>
> Error: Access Violation
>
> The problem with access violations is that the CPU raises them, the OS
> handles them and throws the exception. In order to have the same info in
> those exceptions as we have in D exceptions, they need to be intercepted
> and decorated with filenames and source line numbers - data that is
> available at runtime only from debug symbols. That means, that there
> needs to be a runtime that can interpret debug symbols and that
> basically is shipping half a debugger with the executable.
Ok, point. Thanks! :) But now a tougher question.. What happens if the
crash occurs inside a dynamically (DDL) loaded module? Can I somehow
tell the debugger where to look for symbols? Right now I'm using the
famous Phobos hack for backtraces. I modified it so it provides an
interface for feeding new symbols, e.g. from DDLs.
--
Tomasz Stachowiak
http://h3.team0xf.com/
h3/h3r3tic on #D freenode
More information about the Digitalmars-d
mailing list