[Ltrace-devel] [PATCH] Check return value of PTRACE_PEEKTEXT for ppc64

Petr Machata pmachata at redhat.com
Thu Dec 15 17:44:18 UTC 2011


Edjunior Barbosa Machado <emachado at linux.vnet.ibm.com> writes:

> Hi,
>
> the current upstream version of ltrace shows an ugly testsuite result on ppc64:
>
> # of expected passes            23
> # of unexpected failures        74
>
> Taking a closer look, I noticed ltrace is unable to track mostly of
> the library calls on PowerPC 64-bit. This seems to be happening due to
> a failure in a PTRACE_PEEKTEXT call in the function sym2addr(), which
> returns -1 ('No such process', according to perror()) that is saved as
> a valid address for a breakpoint. The following patch ignores this
> error and sets addr = 0, which means this address will be checked
> again in the future. This patch fixes mostly of the failures in the
> testsuite on ppc64:

Great, I noticed this problem, but haven't had time to look into it yet.
It's fallout of my multi-threading merge.  Thanks for the patch, I'll
commit it soonish.

PM



More information about the Ltrace-devel mailing list