This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Re: x86-64-tdep.h cleanup


> On Mar 6,  6:24pm, Andreas Schwab wrote:
> 
> 
>> Michal Ludvig <mludvig@suse.cz> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]