aboutsummaryrefslogtreecommitdiff
path: root/gdb/defs.h
diff options
context:
space:
mode:
authorDawn Perchik <dawn@cygnus>1996-11-11 21:02:55 +0000
committerDawn Perchik <dawn@cygnus>1996-11-11 21:02:55 +0000
commit28444bf3a1e0d6422cb9236baacb6cac11f384de (patch)
tree22cf8c1c95890224f092567bc591d40f55b7debb /gdb/defs.h
parent77814fa88214b4a2b27284bb66aeb67689e23187 (diff)
downloadgdb-28444bf3a1e0d6422cb9236baacb6cac11f384de.zip
gdb-28444bf3a1e0d6422cb9236baacb6cac11f384de.tar.gz
gdb-28444bf3a1e0d6422cb9236baacb6cac11f384de.tar.bz2
* mips-tdep.c, remote-mips.c, values.c, mdebugread.c,
config/mips/tm-mips.h: Add/fix bugs for 64-bit mips support. * defs.h: Cleanup; add prototypess * corefile.c: Change FIXME #ifdef * win32-nat.c: Include windefs instead of windows.h. * utils.c: Add routines for printing addresses and registers based on type size.
Diffstat (limited to 'gdb/defs.h')
-rw-r--r--gdb/defs.h37
1 files changed, 33 insertions, 4 deletions
diff --git a/gdb/defs.h b/gdb/defs.h
index eb3f85c..2f5ed4a 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -67,8 +67,12 @@ extern char *strsignal PARAMS ((int));
typedef bfd_vma CORE_ADDR;
+#ifndef min
#define min(a, b) ((a) < (b) ? (a) : (b))
+#endif
+#ifndef max
#define max(a, b) ((a) > (b) ? (a) : (b))
+#endif
/* Gdb does *lots* of string compares. Use macros to speed them up by
avoiding function calls if the first characters are not the same. */
@@ -90,11 +94,17 @@ extern int sevenbit_strings;
extern void quit PARAMS ((void));
+#ifdef QUIT
+/* do twice to force compiler warning */
+#define FIXME "FIXME"
+#define FIXME "ignoring redefinition of QUIT"
+#else
#define QUIT { \
if (quit_flag) quit (); \
if (interactive_hook) interactive_hook (); \
PROGRESS (1); \
}
+#endif
/* Command classes are top-level categories into which commands are broken
down for "help" purposes.
@@ -207,10 +217,6 @@ extern char *chill_demangle PARAMS ((const char *));
/* From utils.c */
-extern PTR xmalloc PARAMS ((long));
-
-extern PTR xrealloc PARAMS ((PTR, long));
-
extern void notice_quit PARAMS ((void));
extern int strcmp_iw PARAMS ((const char *, const char *));
@@ -330,6 +336,12 @@ extern void gdb_printchar PARAMS ((int, GDB_FILE *, int));
extern void gdb_print_address PARAMS ((void *, GDB_FILE *));
+typedef bfd_vma t_addr;
+typedef bfd_vma t_reg;
+extern char* paddr PARAMS ((t_addr addr));
+
+extern char* preg PARAMS ((t_reg reg));
+
extern void fprintf_symbol_filtered PARAMS ((GDB_FILE *, char *,
enum language, int));
@@ -559,9 +571,15 @@ extern char *strsave PARAMS ((const char *));
extern char *mstrsave PARAMS ((void *, const char *));
+#ifdef _WIN32 /* FIXME; was long, but this causes compile errors in msvc if already defined */
+extern PTR xmmalloc PARAMS ((PTR, size_t));
+
+extern PTR xmrealloc PARAMS ((PTR, PTR, size_t));
+#else
extern PTR xmmalloc PARAMS ((PTR, long));
extern PTR xmrealloc PARAMS ((PTR, PTR, long));
+#endif
extern int parse_escape PARAMS ((char **));
@@ -627,8 +645,19 @@ extern char *getenv PARAMS ((const char *));
#endif
#ifdef HAVE_STDLIB_H
+#if defined(_MSC_VER) && !defined(__cplusplus)
+/* msvc defines these in stdlib.h for c code */
+#undef min
+#undef max
+#endif
#include <stdlib.h>
#endif
+#ifndef min
+#define min(a, b) ((a) < (b) ? (a) : (b))
+#endif
+#ifndef max
+#define max(a, b) ((a) > (b) ? (a) : (b))
+#endif
/* We take the address of fclose later, but some stdio's forget