This is the mail archive of the gdb@sourceware.cygnus.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]

Re: Moving Linux-specific stuff out of i386-tdep.c


   Date: Wed, 08 Mar 2000 14:51:05 -0800
   From: Stan Shebs <shebs@apple.com>

   Mark Kettenis wrote:
   > 
   > Hi,
   > 
   > Over time quite a lot of Linux-dependent stuff has been added to
   > i386-tdep.c, and I think it's time to move that into its own file.

   Bear in mind that it should be possible to build a foo-x-linux
   cross debugger, if for no other reason than to bootstrap new
   systems.  *-nat.c files are by definition native-only, and won't
   get linked into a cross debugger.

Sorry if I was not clear, but I don't want to move the code in
i386-linux-nat.c, but to a new file i386-linux-tdep.c.

   I generally like to look at foo-tdep.c as a quasi-library of
   knowledge about foo.  It makes it easier to share code that
   is the same or nearly the same for different OSes running on
   the architecture.

Indeed.  i386-tdep.c is for code shared by many of the supported OSes
running on the ix86 processors.  However, right now it contains a
large chunk of code that's definitely Linux-specific.  That's the bit
of code that I want to move out.  If you'd build a GDB target add a
generic i386 system you'd link with i386-tdep.o.  If you'd want to
include support for Linux, you'd also link with i386-linux-tdep.o.

   > 2. Should I postpone creating the new -tdep.c file until after the
   >    release or not.  Andrew has been telling us to avoid gratuitous
   >    changes to make it easier to apply outstanding patches.  But on the
   >    other hand, after 5.0 is released, I hope to see a lot new patches
   >    generated against 5.0.  So creating the new file before 5.0 would
   >    make applying those new patches a lot easier.

   If the Linux patch backlog were to be emptied out, you wouldn't have
   this problem. :-)  But seriously, if you change it now, before all
   submitted patches have been dealt with, then it would only be fair
   for you to adapt those patches yourself.  So it seems more like a
   question of whether you want to do more work now vs later.

I'm not aware of any outstanding patches to i386-tdep.c that wouldn't
need any significant work anyway.

If I do not hear any objections, I'll see if I can figure out how to
create a new file in the CVS archive :-).

Mark

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