This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 3/5] Prec: x86 segment register support: target
- From: Daniel Jacobowitz <dan at codesourcery dot com>
- To: Michael Snyder <msnyder at vmware dot com>
- Cc: Hui Zhu <teawater at gmail dot com>, gdb-patches ml <gdb-patches at sourceware dot org>, "H.J. Lu" <hjl dot tools at gmail dot com>
- Date: Tue, 16 Mar 2010 16:04:30 -0400
- Subject: Re: [RFA 3/5] Prec: x86 segment register support: target
- References: <daef60381003160948q7ba41966o76b6194cd7a8f1d0@mail.gmail.com> <4B9FCA21.9020904@vmware.com>
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