This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH -tip -v10 5/7] x86: add pt_regs register and stack access APIs


On Mon, Jul 06, 2009 at 03:28:02PM -0400, Masami Hiramatsu wrote:
> I'm not so sure about your idea.
> Would you mean below code?
> 
> int offs_table[NR_REGPARMS] = {

not REGPARMS of course

> 	[0] = offsetof(struct pt_regs, di),
> 	...
> };
> if (n < NR_REGPARMS)
> 	return *((unsigned long *)regs + offs_table[n]);

Yes.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]