[Ltrace-devel] fixes for tracing -p, -L

Petr Machata pmachata at redhat.com
Fri Jan 19 17:01:55 CET 2007


Hey!

I suspect something changed in linux kernel or toolchain again, or maybe 
it was always broken and I didn't notice... anyway, trunk testsuite 
fails on mouth.  I tracked the problem down to the following.

  * -p: we do this with PTRACE_ATTACH.  man states that tracing process 
will observe the traced process stop, and wait is to be used to catch 
the stop.  We didn't do that, and attach testcase hung indefinitely. 
With the fix trace_pid waits, open_pid calls continue_process, and test 
passes.

  * -L: with -L, ltrace SIGSEGVs when trying to access uninitialized 
proc->brakpoints.  We now initialize proc->breakpoints always, which 
makes a check in insert_breakpoint superfluous.

I'm attaching the patch that fixes these two problems for me.  I'd very 
much appreciate if you gave it a test run on the distro of your choice, 
as my experience is pretty much Fedora/RHEL-centric.

Hmm, and I see my pie patch became completely wrecked over the 
christmas.  Maybe indeed some change in kernel or toolchain...

Thanks, PM
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ltrace-0.5-p+L.patch
Type: text/x-patch
Size: 2616 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/ltrace-devel/attachments/20070119/3c9afcb3/ltrace-0.5-pL.bin


More information about the Ltrace-devel mailing list