aboutsummaryrefslogtreecommitdiff
path: root/gdb/defs.h
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1991-11-21 18:42:05 +0000
committerJohn Gilmore <gnu@cygnus>1991-11-21 18:42:05 +0000
commit7d9884b92772d5b4fa0de57de5caca2d9308c16c (patch)
tree061a8482b03bad9fd11d08bec0cc8e14ad99b839 /gdb/defs.h
parentd51bea8d2c6f8392d6a981c7293aee126e5914d5 (diff)
downloadgdb-7d9884b92772d5b4fa0de57de5caca2d9308c16c.zip
gdb-7d9884b92772d5b4fa0de57de5caca2d9308c16c.tar.gz
gdb-7d9884b92772d5b4fa0de57de5caca2d9308c16c.tar.bz2
* defs.h: Incorporate param.h. All users changed.
* param-no-tm.h: Change users to define TM_FILE_OVERRIDE instead. * param.h, param-no-tm.h: Removed. * Update copyrights in all changed files. * dbxread.c, dwarfread.c, inflow.c, infrun.c, m2-exp.y, putenv.c, solib.c, symtab.h, tm-umax.h, valprint.c: Lint. * tm-convex.h, tm-hp300hpux.h, tm-merlin.h, tm-sparc.h, xm-merlin.h: Avoid host include files in target descriptions. * getpagesize.h: Removed, libiberty copes now.
Diffstat (limited to 'gdb/defs.h')
-rw-r--r--gdb/defs.h78
1 files changed, 77 insertions, 1 deletions
diff --git a/gdb/defs.h b/gdb/defs.h
index 52d8496..3457ff0 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -1,4 +1,4 @@
-/* Basic definitions for GDB, the GNU debugger.
+/* Basic, host-specific, and target-specific definitions for GDB.
Copyright (C) 1986, 1989, 1991 Free Software Foundation, Inc.
This file is part of GDB.
@@ -69,6 +69,7 @@ extern int parse_escape ();
extern char *reg_names[];
/* Indicate that these routines do not return to the caller. */
extern volatile void error(), fatal();
+extern void warning_setup(), warning();
/* Various possibilities for alloca. */
#ifndef alloca
@@ -274,6 +275,7 @@ enum language
language_unknown, /* Language not known */
language_auto, /* Placeholder for automatic setting */
language_c, /* C */
+ language_cplus, /* C++ */
language_m2, /* Modula-2 */
};
@@ -292,5 +294,79 @@ char *local_hex_format_custom(); /* language.c */
char *local_hex_string (); /* language.c */
char *local_hex_string_custom (); /* language.c */
+
+/* System-dependent parameters for GDB.
+
+ The standard thing is to include defs.h. However, files that are
+ specific to a particular target can define TM_FILE_OVERRIDE before
+ including defs.h, then can include any particular tm-file they desire. */
+
+/* Target machine definition. This will be a symlink to one of the
+ tm-*.h files, built by the `configure' script. */
+
+#ifndef TM_FILE_OVERRIDE
+#include "tm.h"
+#endif
+
+/* Host machine definition. This will be a symlink to one of the
+ xm-*.h files, built by the `configure' script. */
+
+#include "xm.h"
+
+/* TARGET_BYTE_ORDER and HOST_BYTE_ORDER should be defined to one of these. */
+#if !defined (BIG_ENDIAN)
+#define BIG_ENDIAN 4321
+#endif
+
+#if !defined (LITTLE_ENDIAN)
+#define LITTLE_ENDIAN 1234
+#endif
+
+/* The bit byte-order has to do just with numbering of bits in
+ debugging symbols and such. Conceptually, it's quite separate
+ from byte/word byte order. */
+
+#if !defined (BITS_BIG_ENDIAN)
+#if TARGET_BYTE_ORDER == BIG_ENDIAN
+#define BITS_BIG_ENDIAN 1
+#endif /* Big endian. */
+
+#if TARGET_BYTE_ORDER == LITTLE_ENDIAN
+#define BITS_BIG_ENDIAN 0
+#endif /* Little endian. */
+#endif /* BITS_BIG_ENDIAN not defined. */
+
+/* Swap LEN bytes at BUFFER between target and host byte-order. */
+#if TARGET_BYTE_ORDER == HOST_BYTE_ORDER
+#define SWAP_TARGET_AND_HOST(buffer,len)
+#else /* Target and host byte order differ. */
+#define SWAP_TARGET_AND_HOST(buffer,len) \
+ { \
+ char tmp; \
+ char *p = (char *)(buffer); \
+ char *q = ((char *)(buffer)) + len - 1; \
+ for (; p < q; p++, q--) \
+ { \
+ tmp = *q; \
+ *q = *p; \
+ *p = tmp; \
+ } \
+ }
+#endif /* Target and host byte order differ. */
+
+/* On some machines there are bits in addresses which are not really
+ part of the address, but are used by the kernel, the hardware, etc.
+ for special purposes. ADDR_BITS_REMOVE takes out any such bits
+ so we get a "real" address such as one would find in a symbol
+ table. ADDR_BITS_SET sets those bits the way the system wants
+ them. */
+#if !defined (ADDR_BITS_REMOVE)
+#define ADDR_BITS_REMOVE(addr) (addr)
+#define ADDR_BITS_SET(addr) (addr)
+#endif /* No ADDR_BITS_REMOVE. */
+
+#if !defined (SYS_SIGLIST_MISSING)
+#define SYS_SIGLIST_MISSING defined (USG)
+#endif /* No SYS_SIGLIST_MISSING */
#endif /* no DEFS_H */