[dmd-internals] changeset 455
Sean Kelly
sean at invisibleduck.org
Fri Apr 30 12:46:48 PDT 2010
On Apr 28, 2010, at 1:25 PM, Andrei Alexandrescu wrote:
> On 04/28/2010 03:23 PM, Walter Bright wrote:
>>
>>
>> Robert Clipsham wrote:
>>> On 28/04/10 21:06, Andrei Alexandrescu wrote:
>>>
>>>> should find a solution within the confines of the compiler.
>>>
>>> Catching segfaults on linux is possible, it's hard to do and rather
>>> hacky though, this doesn't seem like something that should be included
>>> in the unittesting functionality. I guess a seperate process could be
>>> spawned for unit testing, and if a segfault occurs a message saying so
>>> could be given, but anything more seems excessive, and is the job of a
>>> debugger. Doesn't seem right to integrate a full debugger into every
>>> app compiled with unit tests.
>>>
>>
>> I agree, although I sympathize with not liking gdb, the solution is not
>> to build a debugger into the compiler, it's build a better debugger.
>
> All I want is the compiler to utter the last started unittest if it segfaults during unittesting. Although I do agree that may be difficult to implement, I don't think it's a tall or unusual order.
It's not hard to write a segfault handler that does this, but it involves doing technically illegal stuff in a signal handler (either IO or throwing an exception) so I don't want to make it a built-in feature.
More information about the dmd-internals
mailing list