[Ltrace-devel] [PATCH] Fix ppc64 ABI support

Luis Machado luisgpm at linux.vnet.ibm.com
Wed Feb 27 17:01:36 UTC 2008


> Your patch seems to not follow coding style of the rest of the code,
> mainly that your conditional blocks look like (GNU style ?):

> Also, in a few places you replaced tabs with spaces, which is wrong IMHO.

Yes, i took the GNU style steps on that. How about the formatting now?

> Besides that, you still use global variables on
> sysdeps/linux-gnu/ppc/trace.c for keeping state. AFAIK, this will
> cause problems when tracing multiple processes at the same time (e.g.
> after a fork() or when passing multiple PIDs using -p option).

These globals will only be used for printing the arguments in a given
function call. They are initialized everytime we have a function call
(LT_OF_FUNCTION && arg_num == 0), in order to track parameter locations.
As far as i could see, this doesn't get interrupted by any other
processes. The printing will go on until we have no more parameters left
for a specific function call, in which case we won't need those
variables anymore. So they're only there to keep states between printing
of various arguments for one specific function call.

Correct me if i'm wrong, but i don't think we could possibly have two
functions being printed at the same time concurrently, could we? The
solution could be better (working on a better one), but for now i think
this does improve things a bit.

Regards,

-- 
Luis Machado
Software Engineer 
IBM Linux Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_ppc_abi.diff
Type: text/x-patch
Size: 10051 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/ltrace-devel/attachments/20080227/a78eb5a7/attachment.bin 


More information about the Ltrace-devel mailing list