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

2009-06-01 Thread Ingo Molnar
* Christoph Hellwig h...@infradead.org wrote: + if (n NR_REGPARMS) { + switch (n) { + case 0: return regs-ax; + case 1: return regs-dx; + case 2: return regs-cx; + } Normal kernel style would be switch (n) {

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

2009-05-30 Thread Christoph Hellwig
You might want to run this past linux-arch to make sure this is suitable for other architectures. --- a/arch/x86/include/asm/ptrace.h +++ b/arch/x86/include/asm/ptrace.h @@ -7,6 +7,7 @@ #ifdef __KERNEL__ #include asm/segment.h +#include asm/page_types.h #endif I really wonder if we

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

2009-05-30 Thread Masami Hiramatsu
Hi Christoph, Thank you for review. Christoph Hellwig wrote: You might want to run this past linux-arch to make sure this is suitable for other architectures. Frankly, I'm not sure about linux-arch, could you explain it? Anyway, I'm interested in that idea. ---

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

2009-05-28 Thread Masami Hiramatsu
Add following APIs for accessing registers and stack entries from pt_regs. - query_register_offset(const char *name) Query the offset of name register. - query_register_name(unsigned offset) Query the name of register by its offset. - get_register(struct pt_regs *regs, unsigned offset)