Re: [patch v3 19/36] Hexagon: Add ptrace support

Arnd Bergmann
2011-09-10T11:21:25Z

On Saturday 10 September 2011 08:42:26 Jonas Bonn wrote:
> > Putting a printk into case PTRACE_POKEUSR seemed to show that
> > gdb was using this (and was somehow mis-numbering the registers
> > ... sigh.) Are you saying that the default should handle this?
>
> I'm really not an expert on GDB, but I believe it can use either the
> PEEK/POKE functions to access regs, or it can use GET/SETREGS; it's an
> architecture-dependent configuration. I think the second variant can
> be easily modified to become GET/SETREGSET instead, and the PEEK/POKE
> variant wouldn't be needed at all.

Yes, I think that is the way to go for new architectures, although
practically no architecture in the upstream kernel does it this
way.

The PEEKUSR/POKEUSR stuff is a relic from ancient Unix time where you
would directly access a kernel data structure with it, we should get
over it.

Arnd