[patch] fix spurious SIGSEGV faults under Cygwin

Dave Korn dave.korn@artimi.com
Thu Feb 2 17:30:00 GMT 2006


On 02 February 2006 17:21, Brian Dessent wrote:

> The main problem I see with this approach is the extra call to
> IsDebuggerPresent() every time a 'myfault' is created/destroyed, which
> potentially could be a lot.  I'm presuming this is a relatively cheap
> call so it wasn't something I worried too much about.  But then I didn't
> actually try to measure it.   
> 
> If it turns out that it's expensive, I was thinking that the inferior
> could maintain this information in some variable, and just communicate
> its location to gdb once at startup, then gdb could simply read that
> variable in the process' memory before deciding whether to handle the
> fault.

  ?????!

  I'm having a conceptual difficulty here: Under what circumstances would you expect there *not* to be a debugger attached to the
inferior to which the debugger is attached?  That's a bit zen, isn't it?

  Or IOW if a debugger is going to read a variable from its inferior that says if there's a debugger attached, well... it might as
well be #defined to 1 in the gdb source code, mightn't it?


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....



More information about the Cygwin-patches mailing list