From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2907 invoked by alias); 4 Aug 2011 17:45:56 -0000 Received: (qmail 2899 invoked by uid 22791); 4 Aug 2011 17:45:55 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD 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; Thu, 04 Aug 2011 17:45:42 +0000 Received: (qmail 23467 invoked from network); 4 Aug 2011 17:45:41 -0000 Received: from unknown (HELO scottsdale.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 4 Aug 2011 17:45:41 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [RFA 5/8] New port: TI C6x: gdb port Date: Thu, 04 Aug 2011 17:45:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-8-generic; KDE/4.6.2; x86_64; ; ) Cc: "Joseph S. Myers" , Yao Qi References: <4E2638A6.1070406@codesourcery.com> <201108041333.42945.pedro@codesourcery.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201108041845.35876.pedro@codesourcery.com> X-IsSubscribed: yes 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: 2011-08/txt/msg00076.txt.bz2 On Thursday 04 August 2011 16:11:35, Joseph S. Myers wrote: > On Thu, 4 Aug 2011, Pedro Alves wrote: > > > Seems like there are a lot of non-core registers here. Now that > > the gdbserver patch has been updated to send in standard tic6x xml > > register description features, all registers the target includes in the > > description that are not part of the defined features should not need > > to be hardcoded in gdb, since the xml description itself will describe > > their sizes and names. See arm-tdep.c:arm_register_name for example. > > More comments on this further down. > > Won't GDB need a list of how the register names correspond to DWARF > register numbers (which are allocated for all these registers) somewhere? AFAICS, gdbserver only exposes A0-A15, CSR, PC, A16-A31 B16-B31, TSR, ILC, RILC, so I assumed all other registers would be system dependent non general purpose control registers, but it's probably then that they are only not "user space" registers, and will be acessible by bare metal probes/stubs? Linux programs won't access those, right? I now browsed the ABI's dwarf section and I got that impression. The default is to assume 1-1 mapping between gdb numbers and dwarf numbers, so it's easier to ensure the numbers are the same. I guess that clears up my comment to the register numbers. As for names, types and sizes, if the target doesn't include those registers in the description, then it's as if they don't exist. A description that reports those extra registers should include those properties (name, bitsize, type, regnum) per register, so gdb would still get them from the description. I can't tell if it would make sense to add a new feature or features for those extra registers though. -- Pedro Alves