[Ltrace-devel] [PATCH] Add fetch back end for m68k

Petr Machata pmachata at redhat.com
Thu Sep 13 12:00:18 UTC 2012


Andreas Schwab <schwab at linux-m68k.org> writes:
> This ports the m68k backend to ARCH_HAVE_FETCH_ARG, which fixes all
> remaining testsuite failures.

Thanks, this looks mostly good, I just have a couple nits to pick:

> Andreas.

This shouldn't be in commit log.

> --- /dev/null
> +++ b/sysdeps/linux-gnu/m68k/fetch.c

[...]

> +struct fetch_context *
> +arch_fetch_arg_init(enum tof type, struct Process *proc,
> +		    struct arg_type_info *ret_info)

[...]

> +		context->retval.where = VAL_LOC_WORD;
> +		context->retval.u.value = context->regs[PT_A1];

This should be replaced by a call to value_set_word.  (Though there's no
similar interface for VAL_LOC_INFERIOR.)

> +int
> +arch_fetch_arg_next(struct fetch_context *context, enum tof type,
> +		    struct Process *proc, struct arg_type_info *info,
> +		    struct value *valuep)

[...]

> +		valuep->where = VAL_LOC_WORD;
> +		valuep->u.value = context->regs[reg];

And this as well.

> +		context->stack_pointer
> +			= (void *)align((unsigned long)context->stack_pointer, a);

This line is too long (break at 79).

> +int
> +arch_fetch_retval(struct fetch_context *context, enum tof type,
> +		  struct Process *proc, struct arg_type_info *info,
> +		  struct value *valuep)

[...]

> +			int reg = info->type == ARGTYPE_POINTER ? PT_A0 : PT_D0;
> +			unsigned char *val = (unsigned char *)&context->regs[reg];

These two are as well.

> +			unsigned char *val = (unsigned char *)&context->regs[PT_D0];

And this one.

Thank you,
PM



More information about the Ltrace-devel mailing list