From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15468 invoked by alias); 12 Dec 2003 00:34:18 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 15461 invoked from network); 12 Dec 2003 00:34:17 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 12 Dec 2003 00:34:17 -0000 Received: from drow by nevyn.them.org with local (Exim 4.24 #1 (Debian)) id 1AUbG4-0002t7-Kq; Thu, 11 Dec 2003 19:34:16 -0500 Date: Fri, 12 Dec 2003 00:34:00 -0000 From: Daniel Jacobowitz To: Anthony Booker Cc: gdb@sources.redhat.com Subject: Re: x86_64 register cache layout Message-ID: <20031212003416.GA11046@nevyn.them.org> Mail-Followup-To: Anthony Booker , gdb@sources.redhat.com References: <1071188179.30671.61.camel@boom.wc.cray.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1071188179.30671.61.camel@boom.wc.cray.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-12/txt/msg00178.txt.bz2 On Thu, Dec 11, 2003 at 04:16:19PM -0800, Anthony Booker wrote: > Hello gdb, > > I am trying to implement a simple remote protocol server for an AMD > Opteron based system. I am happily getting exchanges back and forth, > I'm ignoring a whole bunch of comands but eventually gdb settles down > and says it's attached to the remote process. I can modify memory on > the target and see the effects on the process. > > What I'd like to do is have the 'g' command actually provide register > contents, preferably all the registers and preferably the real data. :) > > To do this I'll need to find the right packing order for the reply > frame. From my reading so far I believe this is, with a couple of minor > exceptions, the hex string representation of the register cache. > > So I follow the bouncing ball and get down to supply_register which > calls register data which uses reg_defs to define the order and length > of entries in the cache. > > Now reg_defs seems to be set set_register_cache but I can't find where > that is called. I did attach to a gdbserver and found that the caller > seems to give regs_x86_64 as the initialiser. But I can find neither > hide nor hair of that variable in the gdb source I have and the > gdbserver is sans symbols. So I'm stuffed. > > Can anyone help me join the final dot and locate the table? Take a look at regformats/reg-x86-64.dat. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer