Make CW_STRACE_TOGGLE toggle

Conrad Scott Conrad.Scott@dsl.pipex.com
Wed Jun 5 18:06:00 GMT 2002


Another patch but very small.

Currently calls to:

    cygwin_internal (CW_STRACE_TOGGLE, pid)

doesn't toggle the stracing of pid but simply turns it on again, i.e. a
no-op after the first call. This patch makes strace.exe read the current
value of the strace.active flag and invert it, rather than unilaterally
setting it.

I've got a small program that makes this call for a given process, so you
can turn stracing on and off around events of interest etc. I'll send it
along once I've thought of a good name for it (strtoggle? stroggle?
stronoff? . . . ) Any suggestions?

I find this patch useful since (pre-XP) debuggers can't detach from their
targets. Thus you're stuck with strace.exe once it's attached.

// Conrad

Changelog message:
* strace.cc (handle_output_debug_string): Invert the child's strace.active
flag rather than unilaterally setting it.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: strace.patch
Type: application/octet-stream
Size: 765 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20020605/b63cba02/attachment.obj>


More information about the Cygwin-patches mailing list