From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19269 invoked by alias); 6 Mar 2002 18:26:47 -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 19204 invoked from network); 6 Mar 2002 18:26:46 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 6 Mar 2002 18:26:46 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 7FB6E3D1D; Wed, 6 Mar 2002 13:26:44 -0500 (EST) Message-ID: <3C865F64.1040302@cygnus.com> Date: Wed, 06 Mar 2002 10:26:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.8) Gecko/20020210 X-Accept-Language: en-us MIME-Version: 1.0 To: Kevin Buettner Cc: Andreas Schwab , Michal Ludvig , gdb-patches@sources.redhat.com Subject: Re: [RFA] Re: x86-64-tdep.h cleanup References: <3C84EAA8.2000900@suse.cz> <3C8647D7.40302@suse.cz> <1020306173521.ZM23202@localhost.localdomain> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-03/txt/msg00077.txt.bz2 > On Mar 6, 6:24pm, Andreas Schwab wrote: > > >> Michal Ludvig writes: >> >> |> Andreas Schwab wrote: >> |> > I think the registration of the Linux specific gdbarch functions should be >> |> > moved to x86-64-linux-tdep.c. >> |> > |> It seems reasonable. Perhaps I can do it like in the attachment? >> >> No, x86-64-tdep.c should not have _any_ reference to >> x86-64-linux-tdep.c. The former must be usable without the latter. > > > How is that possible though? I've studied this problem for other > targets and have (up to now, anyway) concluded that the main tdep.c > file is going to need to know about the (OS or ABI) variants in some > fashion. I think AndreasS is correct. x86-64-tdep.c only contains ISA and ABI stuff while x86-64-linux.c contains GNU/Linux specific OS functions. Two problems are tripping up the theory. First is that gdbarch doesn't currently groak this arangement - x86-64-linux-tdep is derived (correct O-O word?) from x86-64-tdep. The second problem is that gdbarch doesn't handle the concept of OS variants within an ISA/ABI. Up until now people have side stepped the issue by retaining macro definitions in config/*/tm-linux.h. I'm personally ok with this - it retains the status quo and at least manages to retain the separation. enjoy, Andrew