[Ltrace-devel] [PATCH 1/2] ltrace: Add support for Imagination Technologies Meta

Petr Machata pmachata at redhat.com
Tue Mar 5 16:50:32 UTC 2013


Markos Chandras <markos.chandras at gmail.com> writes:

> +long gimme_arg(enum tof type, struct process *proc, int arg_num, struct arg_type_info *info)

Function names should start in column 0.  I realize this is a deviation
from Linux coding style, but ltrace is mostly consistent in this regard.
Also lines should have at most 80 characters.  So the above should be:

+long
+gimme_arg(enum tof type, struct process *proc, int arg_num,
+          struct arg_type_info *info)

> +long gimme_arg(enum tof type, struct process *proc, int arg_num, struct arg_type_info *info)

Please consider moving over to fetch backend[*].  gimme_arg is really
very poor interface if one is interested in correctly implementing
parameter passing convention.  (E.g. you can't generally stuff a double
to a long on a 32-bit machine, so a conversion is necessary; many ABI's
allow passing small structures in registers, and there's just no way to
do this in gimme_arg.  Etc.)

If none of this is a problem, and the other points are resolved (the
coding style nits and the problem described in my other mail) then I'll
be happy to include this in ltrace.

Thanks,
PM

[*] You do that by putting the following in arch.h:

    #define ARCH_HAVE_FETCH_ARG

    ... and fixing all the linking errors ;) by implementing
    arch_fetch_arg_init, arch_fetch_arg_clone, arch_fetch_arg_done,
    arch_fetch_arg_next and arch_fetch_retval.  See fetch.h for details.
    You could consult x86, m68k, arm (on pmachata/arm branch), ppc, ia64
    or s390 backend that already use fetch backend.



More information about the Ltrace-devel mailing list