From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25004 invoked by alias); 16 Mar 2010 20:04:43 -0000 Received: (qmail 24994 invoked by uid 22791); 16 Mar 2010 20:04:42 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 16 Mar 2010 20:04:34 +0000 Received: (qmail 3253 invoked from network); 16 Mar 2010 20:04:32 -0000 Received: from unknown (HELO caradoc.them.org) (dan@127.0.0.2) by mail.codesourcery.com with ESMTPA; 16 Mar 2010 20:04:32 -0000 Date: Tue, 16 Mar 2010 20:04:00 -0000 From: Daniel Jacobowitz To: Michael Snyder Cc: Hui Zhu , gdb-patches ml , "H.J. Lu" Subject: Re: [RFA 3/5] Prec: x86 segment register support: target Message-ID: <20100316200424.GA29097@caradoc.them.org> Mail-Followup-To: Michael Snyder , Hui Zhu , gdb-patches ml , "H.J. Lu" References: <4B9FCA21.9020904@vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B9FCA21.9020904@vmware.com> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-03/txt/msg00607.txt.bz2 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