This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Make CW_STRACE_TOGGLE toggle


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.

Attachment: strace.patch
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]