RE: [patch] fix spurious SIGSEGV faults under Cygwin

2006-02-02 Thread Dave Korn
On 02 February 2006 17:46, 'Daniel Jacobowitz' wrote: > "this information" does not refer to "if there is a debugger attached". Ah! Thank you for solving my parsing problem! I still can't tell if that's because "this information" does not refer to the return value of IsDebuggerPresent, or

RE: [patch] fix spurious SIGSEGV faults under Cygwin

2006-02-02 Thread Dave Korn
On 02 February 2006 17:42, Brian Dessent wrote: > Dave Korn wrote: > >> 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? > > The code i

RE: [patch] fix spurious SIGSEGV faults under Cygwin

2006-02-02 Thread Dave Korn
On 02 February 2006 17:38, Daniel Jacobowitz wrote: > On Thu, Feb 02, 2006 at 05:30:23PM -, Dave Korn wrote: >> ?! >> >> 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

Re: [patch] fix spurious SIGSEGV faults under Cygwin

2006-02-02 Thread Brian Dessent
Dave Korn wrote: > 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? The code in question here runs many times in the normal course of any

RE: [patch] fix spurious SIGSEGV faults under Cygwin

2006-02-02 Thread Dave Korn
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

Re: [patch] fix spurious SIGSEGV faults under Cygwin

2006-02-02 Thread Brian Dessent
Christopher Faylor wrote: > Thanks for the patch but I've been working on this too and, so far, I think > it is possible to have a very minimal way of dealing with this problem. I > haven't had time to delve into it too deeply but I have been exploring this > problem on and off for a couple of we

Re: [patch] fix spurious SIGSEGV faults under Cygwin

2006-02-02 Thread Christopher Faylor
On Thu, Feb 02, 2006 at 08:00:01AM -0800, Brian Dessent wrote: >Brian Dessent wrote: > >> #define _CYGWIN_SIGNAL_STRING "cYgSiGw00f" >> +#define _CYGWIN_FAULT_IGNORE_STRING "cYgfAuLtIg" >> +#define _CYGWIN_FAULT_NOIGNORE_STRING "cYgNofAuLtIg" > >Sigh, this breaks strace under Cygwin, I should have

Re: [patch] fix spurious SIGSEGV faults under Cygwin

2006-02-02 Thread Brian Dessent
Brian Dessent wrote: > #define _CYGWIN_SIGNAL_STRING "cYgSiGw00f" > +#define _CYGWIN_FAULT_IGNORE_STRING "cYgfAuLtIg" > +#define _CYGWIN_FAULT_NOIGNORE_STRING "cYgNofAuLtIg" Sigh, this breaks strace under Cygwin, I should have tested more. Sorry about that. Apparently strace expects anything s

[patch] fix spurious SIGSEGV faults under Cygwin

2006-02-02 Thread Brian Dessent
Recently Cygwin has changed the way that it internally checks arguments for bad pointers. Where before it used IsBad{Read,Write}Ptr() from the win32 API, now it installs its own temporary SEH fault handler. However, gdb is not aware of this and so it leads to the program stopping on a SIGSEGV on