diff options
author | Gary Benson <gbenson@redhat.com> | 2014-07-30 15:31:10 +0100 |
---|---|---|
committer | Gary Benson <gbenson@redhat.com> | 2014-08-19 10:07:19 +0100 |
commit | 9239eeabe340e1662c5df8f816785477309e1c0b (patch) | |
tree | b2608885259ccabbe8ce2c73b32dbe8d69f14c42 /gdb/gdbserver | |
parent | ef87c8bbe7d1c4a987578626655f4a15555c7f4a (diff) | |
download | gdb-9239eeabe340e1662c5df8f816785477309e1c0b.zip gdb-9239eeabe340e1662c5df8f816785477309e1c0b.tar.gz gdb-9239eeabe340e1662c5df8f816785477309e1c0b.tar.bz2 |
Introduce common-types.h
This introduces common-types.h. This file defines various standard
types used by gdb and gdbserver.
Currently these types are conditionally defined based on GDBSERVER.
The long term goal is to remove all such tests; however, this is
difficult as currently gdb uses definitions from BFD. In the meantime
this is still a step in the right direction.
gdb/ChangeLog:
* common/common-types.h: New file.
* Makefile.in (HFILES_NO_SRCDIR): Add common/common-types.h.
* common/common-defs.h: Include common-types.h.
* defs.h (gdb_byte, CORE_ADDR, CORE_ADDR_MAX, LONGEST)
(ULONGEST): Remove.
gdb/gdbserver/ChangeLog:
* server.h: Add static assertion.
(gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/gdbserver/server.h | 13 |
2 files changed, 8 insertions, 11 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 00c5324..81db69a 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,6 +1,12 @@ 2014-08-19 Tom Tromey <tromey@redhat.com> Gary Benson <gbenson@redhat.com> + * server.h: Add static assertion. + (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove. + +2014-08-19 Tom Tromey <tromey@redhat.com> + Gary Benson <gbenson@redhat.com> + * Makefile.in (SFILES): Add common/errors.c. (OBS): Add errors.o. (IPA_OBS): Add errors-ipa.o. diff --git a/gdb/gdbserver/server.h b/gdb/gdbserver/server.h index db6ddde..e6b2277 100644 --- a/gdb/gdbserver/server.h +++ b/gdb/gdbserver/server.h @@ -21,6 +21,8 @@ #include "common-defs.h" +gdb_static_assert (sizeof (CORE_ADDR) >= sizeof (void *)); + #ifdef __MINGW32CE__ #include "wincecompat.h" #endif @@ -63,19 +65,8 @@ int vsnprintf(char *str, size_t size, const char *format, va_list ap); # define PROG "gdbserver" #endif -/* A type used for binary buffers. */ -typedef unsigned char gdb_byte; - #include "buffer.h" #include "xml-utils.h" - -/* FIXME: This should probably be autoconf'd for. It's an integer type at - least the size of a (void *). */ -typedef unsigned long long CORE_ADDR; - -typedef long long LONGEST; -typedef unsigned long long ULONGEST; - #include "regcache.h" #include "gdb_signals.h" #include "target.h" |