Mail Archives: cygwin-developers/1999/08/25/05:32:31
------------33104228565668
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi!
I needed some debugging info from ever-running cygwin daemon, so i've
patched strace a bit to allow it to attach to already running process.
Suppling windows pid of process in a form
strace -o <file> -p <winpid>
will do the job. There's two drawbacks, however, both due to features
of DebugActiveProcess API. First -- when strace exits, debugee exits
too. And second -- '-f' option don't work. Working around second
limitation seems possible, but solution i see is quite ugly -- it
suppose that when debugee starts child processes through fork or
spawn, it'll pass DEBUG_PROCESS flag to CreateProcess, and redirect
all children's debug output to actual strace. But it will require that
debugee must stay alive as long as children are running, so, a bunch of
additional syncronization is needed. Anyway, stracing single running
process seems to work ok.
Egor. mailto:deo AT logos-m DOT ru ICQ 5165414 FidoNet 2:5020/496.19
------------33104228565668
Content-Type: application/x-gzip; name="strace_by_pid.diff.gz"
Content-Transfer-Encoding: X-UUE
Content-Disposition: attachment; filename="strace_by_pid.diff.gz"
filetime 655977088
begin 644 strace_by_pid.diff.gz
M'XL("`+<NC<``W-T<F%C95]B>5]P:60N9&EF9@#-6&U3VT AT 2_@R_HN,KP"^R
MD2P9C+U)%0D.RQ:!JX14[BJ[ZY*EL:5%EE2:,5XVQ7^_[IG1BVV1NZNDMN(/
M(&MZ>OKEZ:=[[(?S.70]&[H9K,.8K])C'B[2+/%ZGJ??]*S*N_UVN[TKN7<7
MK.!\M0"K#Y8S,H>C_ AT E89V=G^]UNMT[-WB?FJPU#L,R1/1S13MK0WOS(\ZR!
MT3=!?B5]]-4"?.KN`_PCC+UHY3/XB3_RX[4;BE[P:N,]R[(XV7[)A1^%,WK;
MV7P;;HLVM/E!8T/!THTB=$7*UAH]-(WAH#1Z:!G#86[T!^&*T(.?SV\NKB>`
M8?&291HQP:9Q$B_=,(:7<//Q^GI\?`P?V-)-@R1CD+DAQ[#-DPQ0K$MRJ&N/
M/B@'(LB8ZW-8!RP&E[3&;@2!RV$>QB$/F%^5ID0PSL-X AT 1'8L8>+S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