Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "H . J . Lu" <hjl@lucon.org>
To: Andrew Cagney <ac131313@cygnus.com>
Cc: gdb@sources.redhat.com
Subject: Re: prgregset_t vs gdb_gregset_t on Linux: not the same!
Date: Sun, 10 Jun 2001 00:23:00 -0000	[thread overview]
Message-ID: <20010610002356.A1938@lucon.org> (raw)
In-Reply-To: <3B22492E.5020908@cygnus.com>

[-- Attachment #1: Type: text/plain, Size: 1654 bytes --]

On Sat, Jun 09, 2001 at 12:05:02PM -0400, Andrew Cagney wrote:
> > 
> > #include "nm-linux.h"
> > #include "tm-linux.h"
> > 
> > Otherwise, you may not get the header files you want since mips has
> > both liltle and big endians. Once you have done that, your problem
> > should go away.
> 
> 
> Just FYI, this isn't correct.
> 
> GDB configurations don't have -Isrc/gdb/config/$MACHINE added to the 
> include path (if one does then it is broken).  Consequently "tm-linux.h" 
> will find the header in src/gdb/config.

Here is the ticky part. It took me a while to understand what is
going on. For mipsel, I have mips/tm-littlelinux.h in config, which
has

----
#ifndef TM_MIPSLITTLELINUX_H
#define TM_MIPSLITTLELINUX_H

#define TARGET_BYTE_ORDER LITTLE_ENDIAN

#include "mips/tm-linux.h"

#endif /* TM_MIPSLITTLELINUX_H */
----

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
since

#include "tm-linux.h"

for gcc, "" means to search the current directory of the file even if
it is not listed with -I. Therefor, tm-linux.h in config/mips will be
included from mips/tm-linux.h.  Here is an example

# make
gcc -M -I. foo.c
foo.o: foo.c tm.h mips/tm-linux.h
gcc -M -I. foo.c -DFIXED 
foo.o: foo.c tm.h mips/tm-linux.h tm-linux.h
 
Did I miss something here?


H.J.

[-- Attachment #2: cpp.tar.gz --]
[-- Type: application/x-gzip, Size: 421 bytes --]

  reply	other threads:[~2001-06-10  0:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-08 13:27 Daniel Jacobowitz
2001-06-08 15:58 ` Daniel Jacobowitz
2001-06-08 22:14   ` H . J . Lu
2001-06-09 11:50     ` Mark Kettenis
2001-06-09 13:34     ` Andrew Cagney
2001-06-10  0:23       ` H . J . Lu [this message]
     [not found]         ` <Pine.SUN.3.91.1010610105519.5638E-100000@is>
2001-06-10  1:20           ` H . J . Lu
2001-06-11  6:48         ` Andrew Cagney
2001-06-11  8:58           ` H . J . Lu
2001-06-11 10:45             ` Andrew Cagney
2001-06-11  9:24           ` Daniel Jacobowitz
2001-06-11  9:45             ` H . J . Lu
2001-06-11 10:04               ` Daniel Jacobowitz
2001-06-11 10:45                 ` H . J . Lu
2001-06-09 15:23     ` Daniel Jacobowitz
2001-06-09 11:50   ` Mark Kettenis
2001-06-09 15:42     ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010610002356.A1938@lucon.org \
    --to=hjl@lucon.org \
    --cc=ac131313@cygnus.com \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox