[Vm-dev] CCodeGenerator>>emitCHeaderOn:

Andreas Raab andreas.raab at gmx.de
Thu Mar 11 08:38:30 UTC 2010


Thanks David, that worked fine. I would actually prefer that we just rip 
out the definition and leave it a support responsibility to implement 
error() but I'll take what I can get for now :-)

Cheers,
   - Andreas

On 3/10/2010 8:12 PM, David T. Lewis wrote:
>
>
>
>
> On Wed, Mar 10, 2010 at 12:02:58AM -0800, Andreas Raab wrote:
>>
>> I'd like to propose to REMOVE the inline definition of void error(char*)
>> from CCodeGenerator>>emitCHeaderOn:.
>>
>> Rationale:
>> Allow the support code to handle fatal errors and provide proper
>> feedback. Currently a fatal error will cause the VM to silently quit
>> instead of telling the user that a fatal error happened. It also
>> prevents gathering additional information that the VM could other
>> provide (such as the crash.dmp on Windows).
>
> Andreas,
>
> Attached is a patch for VMMaker that should enable a replacement
> error() function without requiring updates to existing platform
> support code (RiscOS, unix, etc).
>
> You can implement the replacement error() function in platform
> code, e.g. win32ErrorProc(char *), then:
>     '#define error(str) win32ErrorProc(str)'
> in the platforms/win32/vm/config.h header file.
>
> If this approach makes sense, I'll add it to VMMaker.
>
> Note, I have not built a win32 VM with this, so mistakes are
> possible.
>
> Cheers,
> Dave
>


More information about the Vm-dev mailing list