From: Mike Stump <mikestump@comcast.net>
To: gdb-patches@sourceware.org
Subject: remote-sim.h
Date: Mon, 31 Oct 2011 23:24:00 -0000 [thread overview]
Message-ID: <42696E6D-92F3-4F66-B2C9-D79C76B12D2F@comcast.net> (raw)
So, gdb includes remote-sim.h, but CORE_ADDR_TYPE isn't defined by the time the header is included. On my platform, CORE_ADDR_TYPE is defined in sim-main.h. I checked and the BFD bits are defined, so, I just use them as a fallback, works for my purposes. I don't think this is the cleanest solution, so I don't think this is the right patch for the tree. So, I kinda want to include sim-basics.h before this point, as that file, the sim people decided, would ensure that CORE_ADDR_TYPE is defined. So, we can include that file here? The problem is, there is no -I for any of the sim things, and that header will want to include things like cconfig.h... Ick. I kinda want the api to just use a fixed type that is big enough for any of the bfd targets and be done with it. Thoughts?
Index: include/gdb/remote-sim.h
===================================================================
--- include/gdb/remote-sim.h (revision 1866)
+++ include/gdb/remote-sim.h (working copy)
@@ -32,8 +32,12 @@ extern "C" {
gdb does (unsigned int - from defs.h). */
#ifndef CORE_ADDR_TYPE
+#if BFD_ARCH_SIZE <= 32
typedef unsigned int SIM_ADDR;
#else
+typedef unsigned long SIM_ADDR;
+#endif
+#else
typedef CORE_ADDR_TYPE SIM_ADDR;
#endif
next reply other threads:[~2011-10-31 18:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-31 23:24 Mike Stump [this message]
2011-11-01 3:55 ` remote-sim.h Mike Frysinger
2011-11-01 5:38 ` remote-sim.h Mike Stump
2011-11-01 18:55 ` remote-sim.h Tom Tromey
2011-11-01 19:50 ` remote-sim.h Mike Stump
2011-11-02 17:02 ` remote-sim.h Tom Tromey
2011-11-06 17:35 ` remote-sim.h Mike Frysinger
2011-11-06 18:31 ` remote-sim.h Mike Stump
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=42696E6D-92F3-4F66-B2C9-D79C76B12D2F@comcast.net \
--to=mikestump@comcast.net \
--cc=gdb-patches@sourceware.org \
/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