[RFA 3/5] Prec: x86 segment register support: target

Daniel Jacobowitz dan@codesourcery.com
Tue Mar 16 20:04:00 GMT 2010


On Tue, Mar 16, 2010 at 11:12:49AM -0700, Michael Snyder wrote:
> However, isn't target.c the wrong place for this function?
> Wouldn't it belong better in the gdbarch?  It is architecture-
> specific, if I understand correctly.
> 
> That is, this will be the same between i386-ptrace and i386-remote,
> but different between i386-remote and (say) mips-remote.

IMO, these should simply be added as new registers.  Since the name
$gs is already taken, why not add a $gs_base register?

H.J. Lu has recently converted the i386 target to use target
descriptions; it should be easy to add new registers now.
They could go in 32bit-linux.xml or in some other file that could be
shared among OS's.  H.J. may have some more ideas.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb-patches mailing list