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

Luis Machado luisgpm at linux.vnet.ibm.com
Fri Feb 15 16:54:52 UTC 2008


Hi,

I was just about to submit this updated version. :-)

Based on Petr's comments i've updated the patch replacing the code
duplication with a mechanism to call arch-specific functions through a
#define.

There's also a naming problem. It would be better to rename the
umovelong function as it doesn't state clearly its purpose, but i would
like some feedback from other developers. I thought about
inferior_read_long as it's just what it does, reads a single long value
from a memory address in the inferior program.

> - the code in gimme_arg*() functions seems to assume that when arg_num
> == 0, we are entering a function. This is bad, IMHO, as code changes
> in other parts may break this assumption. Why note keep a stack of
> called functions like in i386?

That might be a good idea. I want to keep track exactly of how many
arguments we have and what are their types, in order to know where they
are (registers/stack etc). The idea behind the globals is that we can
use them to update these mappings on each gimme_arg*() call. I'll take a
look at the i386 code for the function stack. Thanks.

> - you are using global variables for keeping track which registers map
> to which arguments (if I understand the code correctly). How would
> that work when tracing multiple processes at the same time?

We have a problem there. I think we would need a better data structure
to hold this into. Do you have any idea here?

As i said, support for the ABI is still incomplete but i'm working on
making it solid.

Thanks for your feedback Anderson.

Best 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: 12045 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/ltrace-devel/attachments/20080215/ca705ef0/attachment.bin 


More information about the Ltrace-devel mailing list