hppa fixes

Dmitry V. Levin ldv at altlinux.org
Mon Oct 5 23:19:22 UTC 2009


On Mon, Oct 05, 2009 at 11:10:09PM +0200, Frederik Schüler wrote:
[...]
> hppa issues fixed and tested, patch attached.
[...]
> --- a/syscall.c
> +++ b/syscall.c
> @@ -2119,12 +2119,19 @@ syscall_enter(struct tcb *tcp)
>  	{
>  		int i;
>  
> +		long args[] = { PT_GR26-4*0, PT_GR26-4*1,
> +			PT_GR26-4*2, PT_GR26-4*3,
> +			PT_GR26-4*4, PT_GR26-4*5 };
> +
> +		/* How many arguments does this syscall have?  */
>  		if (tcp->scno >= 0 && tcp->scno < nsyscalls && sysent[tcp->scno].nargs != -1)
> +			/* Syscall is known, and number of arguments is known.  */
>  			tcp->u_nargs = sysent[tcp->scno].nargs;
>  		else
> -			tcp->u_nargs = MAX_ARGS;
> +			/* Unknown syscall, assume maximum number of arguments.  */
> +			tcp->u_nargs = sizeof(args)/sizeof(args[0]);
>  		for (i = 0; i < tcp->u_nargs; i++) {
> -			if (upeek(tcp, PT_GR26-4*i, &tcp->u_arg[i]) < 0)
> +			if (upeek(tcp, args[i], &tcp->u_arg[i]) < 0)
>  				return -1;
>  		}
>  	}

This hunk does not look correct.
If MAX_ARGS should be lowered on HPPA from 32 to 6, let's change it in
the defs.h file.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20091006/24f1d9e8/attachment.bin>


More information about the Strace-devel mailing list