This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: prgregset_t vs gdb_gregset_t on Linux: not the same!
- To: Eli Zaretskii <eliz at is dot elta dot co dot il>
- Subject: Re: prgregset_t vs gdb_gregset_t on Linux: not the same!
- From: "H . J . Lu" <hjl at lucon dot org>
- Date: Sun, 10 Jun 2001 01:20:39 -0700
- Cc: Andrew Cagney <ac131313 at cygnus dot com>, gdb at sources dot redhat dot com
- References: <20010610002356.A1938@lucon.org> <Pine.SUN.3.91.1010610105519.5638E-100000@is>
On Sun, Jun 10, 2001 at 11:01:20AM +0300, Eli Zaretskii wrote:
>
> On Sun, 10 Jun 2001, H . J . Lu wrote:
>
> > The gdb configure links/copies mips/tm-littlelinux.h to tm.h. Now
> > gdb/tm.h has
> >
> > ---
> > #ifndef TM_MIPSLITTLELINUX_H
> > #define TM_MIPSLITTLELINUX_H
> >
> > #define TARGET_BYTE_ORDER LITTLE_ENDIAN
> >
> > #include "mips/tm-linux.h"
> > ---
> >
> > If in mips/tm-linux.h, there are
> >
> > #include "mips/tm-mips.h"
> > #include "tm-linux.h"
> >
> > mips/tm-linux.h is found by -Isrc/gdb/config. But can you guess which
> > tm-linux.h is included from mips/tm-linux.h? It is mips/tm-linux.h
>
> This is all expected. Perhaps it means that it's a bad idea to have
> several headers by the same name in different directories, if some port
It is a common practice in gcc and gdb.
> might include more than one of those headers, because small changes in
> the order of the -I options can break the build.
It is ok to have files with the same name in src/gdb/config and
src/gdb/config/machine as long as
1. We never use -Isrc/gdb/config/machine. It has been true and I don't
think we should change.
2. We always use <> to include files in src/gdb/config/machine. That is
how it is done in gcc and I have sent a patch to do the same in gdb for
Linux:
http://sources.redhat.com/ml/gdb-patches/2001-05/msg00048.html
H.J.