From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15903 invoked by alias); 13 May 2002 03:43:16 -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 15891 invoked from network); 13 May 2002 03:43:09 -0000 Received: from unknown (HELO localhost.redhat.com) (24.112.240.27) by sources.redhat.com with SMTP; 13 May 2002 03:43:09 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 843523E08; Sun, 12 May 2002 23:43:12 -0400 (EDT) Message-ID: <3CDF3650.7060708@cygnus.com> Date: Sun, 12 May 2002 20:43:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0rc1) Gecko/20020429 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Craig Hackney Cc: "'gdb@sources.redhat.com'" Subject: Re: Displaying more than 16 registers with GDB for ARM targets References: <2407239113CD914CBA855A47698F01B062232C@SUGAH2.triscend.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-05/txt/msg00135.txt.bz2 > My main issue is that I didn't want to change the > current ARM arch of GDB, rather I wanted to keep as much > of it the same as I could but allow it to be extended to > handle the the extra registers I have. > > So it sounds like, I have to hack into the current ARM arch > to make it support my extra registers, this would mean that > they would be displayed for all ARM targets. Even if the > target does not support them. > > Or.. > > Create a completely new architecture that is based 99% on the > ARM, but has my extra register support. > > Am I missing something, or does that about sum it up? A single GDB executable is capable of handling multiple architectures. I can think of several ways of extending arm-tdep.c to support the extra registers. Off hand: - add a command to ``enable'' the registers - have that command force an architecture change by calling gdbarch_update_p(). - this will force a call to arm_gdbarch_init() - that function is then free to re-layout the register cache the way you want. Andrew