This is the mail archive of the cygwin-developers@sourceware.cygnus.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]

Re: 19990705 snapshot


On Sat, Jul 10, 1999 at 08:10:34PM +0400, Egor Duda wrote:
>>>Another question: has the CYGWIN=strace=1,somefile functionality been
>>>deprecated with the advent of the strace program?
>
>CF> It hasn't been deprecated.  It has been removed.  You have to use
>CF> the strace program.
>
>I've got some problems with new strace mechanism too :( Issuing
>command
>
>strace -otrace.dump -f man man
>
>leads to some strange results.
>
>At least one thing that had to be added to strace.cc code is to make
>it handle EVENT_EXCEPTION. Sometimes stracing "man man" just freezes
>because /usr/local/bin/tbl (called by man) traps and starts to send
>EXCEPTION event to strace process over and over again.
>
>Would you consider making selection between new and old tracing scheme
>to be an option at dll build time?

strace.exe is only a few weeks old.  I don't see any reason to give
up yet because people are finding bugs.

I would like to stick with this mechanism for a few reasons:  1) It
is more UNIX-like, 2) It removes some ugly synchronization code from
the DLL, simplifying such things as signal handling, and 3) it shrinks
the size of the DLL.

>I've even built strace.exe under mingw, but results was the same. :(

Did you have to patch strace to do this?  If so, I'd be interested in
the patches.  Either way, could you tell me what you did to do this.  I
think that strace (and cygcheck for that matter) should be mingw by
default.

>Sometimes strace.exe just got killed by kernel (i've inserted debug
>printf at the exit from main cycle at proc_child, but it didn't show
>up), and groff, had been left alone and popped a dialog window that
>noone can handle his breakpoint. Can it have something to do with
>reparenting?

Thanks for the bug report.  I duplicated the problem and hopefully
the attached patch fixes it.  It was dying here because strace couldn't
read the memory from one of the child processes for some reason.  Then
when it went to report the error the error was never actually printed.
The attached patch may fix these problems.  It works for me.

I plan on improving strace in the coming months.  There are some speedups
possible and I would like to eventually be able to perform an strace on
another process.  Eventually, I would like to add the ability to
auto-strace a specific process to allow easier debugging of processes
started as services.

cgf

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