From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16078 invoked by alias); 21 Jun 2007 16:21:44 -0000 Received: (qmail 16067 invoked by uid 22791); 21 Jun 2007 16:21:43 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 21 Jun 2007 16:21:39 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id CB51098301; Thu, 21 Jun 2007 16:21:36 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id A652B982FF; Thu, 21 Jun 2007 16:21:36 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.67) (envelope-from ) id 1I1PPs-0004ld-GE; Thu, 21 Jun 2007 12:21:52 -0400 Date: Thu, 21 Jun 2007 16:21:00 -0000 From: Daniel Jacobowitz To: Joern Rennecke Cc: gdb@sourceware.org Subject: Re: How do I replace DEPRECATED_TM_FILE? Message-ID: <20070621162152.GA18158@caradoc.them.org> Mail-Followup-To: Joern Rennecke , gdb@sourceware.org References: <20070621161305.GD8169@elsdt-razorfish.arc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070621161305.GD8169@elsdt-razorfish.arc.com> User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-06/txt/msg00172.txt.bz2 On Thu, Jun 21, 2007 at 05:13:05PM +0100, Joern Rennecke wrote: > I've read that instead of setting DEPRECATED_TM_FILE, we should add new > members to the target vector. However, how is the target vector supposed to > be initialized differently for different subtargets? The architecture vector (gdbarch), usually, but sometimes the target vector (target_ops). > E.g. arc700 can both be used in an 'embedded' configuration and as a linux > target. The register numbers in gdb are different for these configurations. > The register numbers used to be defined in separate DEPRECATED_TM_FILE > files. > I can add xxx_regnum members to the target vector and ARC_XX_REGNUM > accessor macros, but somehow I have to decide in arc_gdbarch_init how I am > supposed to initialize the target vector. Why are the register numbers different (and which register numbers)? That determines the answer to your question. If it's the dwarf2 mapping, for instance, you'd put overrides in an OS/ABI sniffer in the Linux tdep file. I've done a lot of work lately to isolate GDB's internal register numbering from various external numberings. You can probably use the same internal registers in most places now. -- Daniel Jacobowitz CodeSourcery