This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: [patch] fix spurious SIGSEGV faults under Cygwin
- From: Brian Dessent <brian at dessent dot net>
- To: cygwin-patches at cygwin dot com
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 02 Feb 2006 09:41:54 -0800
- Subject: Re: [patch] fix spurious SIGSEGV faults under Cygwin
- References: <009001c6281e$5907ef60$a501a8c0@CAM.ARTIMI.COM>
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
Cygwin program -- debugger or no. The idea behind guarding the call to
OutputDebugString() with "if (being_debugged())" was that the call to
IsDebuggerPresent() was cheaper than the call to OutputDebugString(),
and that a well-behaived, non-debug build of a binary should not
needlessly send tons and tons of nonsense to OutputDebugString unless
it's actually being debugged and there is something there to interpret
the nonsense.
Brian