On Thu, Aug 25, 2011 at 12:10:06PM +0200, Denys Vlasenko wrote:
>  #ifdef LINUX
>  # if defined (I386)
> -static long eax;
> +struct i386_user_regs_struct {
> +     long ebx;
> +     long ecx;
> +     long edx;
> +     long esi;
> +     long edi;
> +     long ebp;
> +     long eax;
> +     long xds;
> +     long xes;
> +     long xfs;
> +     long xgs;
> +     long orig_eax;
> +     long eip;
> +     long xcs;
> +     long eflags;
> +     long esp;
> +     long xss;
> +     /* Just in case we forgot a few fields and kernel would write more... */
> +     long paranoia[8];
> +};
> +static struct i386_user_regs_struct i386_regs;

strace is not going to call PTRACE_GETREGS with different regs structures,
so is there any use to include the architecture name to the structure
name?  Maybe just call it ptrace_regs, create linux/i386/regs.h file and
place it there?


-- 
ldv

Attachment: pgpHqEOQOnUqz.pgp
Description: PGP signature

------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
Strace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to