Conrad Scott
Wed Jun 5 18:57:00 GMT 2002

"Christopher Faylor" <> wrote:
> On Thu, Jun 06, 2002 at 02:07:57AM +0100, Conrad Scott wrote:
> >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.
> Did you look at strace::hello?  This is supposed to toggle but, since
> the "inited" field in the strace class is never set, it never toggles.

I saw that code at the start of strace::hello but I hadn't stopped to work
out what was meant to be happening there (except that something seemed to be
adrift). Now you mention it, it is pretty obvious :-) And your patch is much
the better.

> >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 don't understand what this program does.  Are you saying that you run
> other program while stracing a running program?

Yes: you call this other program (or, strace with some relevant option) to
toggle tracing in a program that's being straced at the time.

> I've never had a real use for this myself, but it sounds like this is an
> strace option, not another program.

I've been using this with XEmacs so that I can get strace output just for
some particular action. The strace log is so huge otherwise I can never find
the output that corresponds to what I was trying to test.

If this was to be another option to strace.exe, it would save the effort of
thinking up a name for a new program :-)

Anyhow, I can send a patch to do just that but it'll have to be tomorrow.

Good night for now.

// Conrad

More information about the Cygwin-patches mailing list