[PATCH] Use PTRACE_GETREGS on i386
Dmitry V. Levin
ldv at altlinux.org
Fri Aug 26 16:36:30 UTC 2011
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
-------------- 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/20110826/a98d77ee/attachment.bin>
More information about the Strace-devel
mailing list