lkml.org 
[lkml]   [2010]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRE: [patch] x86: ptrace and core-dump extensions for xstate
> 
> On 02/04/2010 02:05 PM, Suresh Siddha wrote:
> >
> > So in the example you provided before:
> >
> > struct iovec iov = { mybuffer, mylength };
> > ret = ptrace(PTRACE_GETREGSET, NT_X86_XSTATE, &iov);
> >
> > You wanted to propose common data format (iov) for all of the NT_* ?
> >
>
> How about encoding the regset number into the command, e.g.
> ptrace(PTRACE_GETREGS(NT_X86_XSTATE), length, buffer)
>
> ... where we have ...
>
> #define PTRACE_GETREGS(r) (((r) << 16) | PTRACE_GETREGS_CMD)
>
> ... or something like that?
>

I like this idea.

BTW, it should be

ptrace(PTRACE_GETREGS(NT_X86_XSTATE), pid, length, buffer)


H.J.


\
 
 \ /
  Last update: 2010-02-05 20:49    [W:0.069 / U:0.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site