From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21550 invoked by alias); 7 Jan 2003 23:16:16 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 21527 invoked from network); 7 Jan 2003 23:16:15 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by 209.249.29.67 with SMTP; 7 Jan 2003 23:16:15 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18W4pk-0006rj-00; Tue, 07 Jan 2003 19:16:40 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18W2xJ-0007NQ-00; Tue, 07 Jan 2003 18:16:21 -0500 Date: Tue, 07 Jan 2003 23:16:00 -0000 From: Daniel Jacobowitz To: Andrew Cagney Cc: Kevin Buettner , gdb-patches@sources.redhat.com Subject: Re: [RFA] Add support for 64-bit MIPS GNU/Linux targets Message-ID: <20030107231621.GF20617@nevyn.them.org> Mail-Followup-To: Andrew Cagney , Kevin Buettner , gdb-patches@sources.redhat.com References: <1021223225021.ZM25698@localhost.localdomain> <20021223235639.GA6927@nevyn.them.org> <3E1A1E43.10201@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3E1A1E43.10201@redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-01/txt/msg00300.txt.bz2 On Mon, Jan 06, 2003 at 07:24:35PM -0500, Andrew Cagney wrote: > >+ register_addr_data = > >>+ register_gdbarch_data (init_register_addr_data, 0); > >>+ > >> gdbarch_register_osabi (bfd_arch_mips, 0, GDB_OSABI_LINUX, > >> mips_linux_init_abi); > >> add_core_fns (®set_core_fns); > > > > > >Blech. So, the way _I_ would have done this would have been to put > >this in the tdep structure. In fact I have several patches which add > >similar methods to the tdep structure, for signal handling. Of course, > >this is not compatible with the way Andrew asked to leave the tdep > >struct in mips-tdep.c. This is OK for now, but hopefully we can get > >rid of it eventually. We could multi-arch register_addr (is that > >appropriate? It's a native-only function, isn't it?) to do that. > > > > Using the gdbarch data mechanism is a good idea - it keeps that > architecture dependency local to that file. It definitly doesn't belong > in the tdep structure since nothing, other than this file, needs it. > > Hmm, should the actual code live in mips-linux-nat.c though? Well, here's the situation: other files call register_addr. I think core-regset? It's a native only method, but which one we want depends on the current gdbarch. I suppose we can just use a gdbarch_data to handle this, but it seems as if there should be a better way. Should it be properly multi-arched (is there any point?)? -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer