2013-02-01 Andreas Tobler <andreast@fgznet.ch>
[deliverable/binutils-gdb.git] / gdb / defs.h
index 7be99a2d60f8aabecfa7b8fd2b5036d221b0b8c2..10089b0d2c552d5c4a9b9bdbb5e515d2490398bf 100644 (file)
@@ -1,8 +1,7 @@
 /* *INDENT-OFF* */ /* ATTRIBUTE_PRINTF confuses indent, avoid running it
                      for now.  */
 /* Basic, host-specific, and target-specific definitions for GDB.
-   Copyright (C) 1986, 1988-2005, 2007-2012 Free Software Foundation,
-   Inc.
+   Copyright (C) 1986-2013 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -27,6 +26,7 @@
 #endif
 
 #include "config.h"            /* Generated by configure.  */
+#include "build-gnulib/config.h"
 
 #include <sys/types.h>
 #include <stdio.h>
@@ -115,8 +115,6 @@ typedef bfd_vma CORE_ADDR;
 
 /* This is to make sure that LONGEST is at least as big as CORE_ADDR.  */
 
-#ifndef LONGEST
-
 #ifdef BFD64
 
 #define LONGEST BFD_HOST_64_BIT
@@ -124,25 +122,11 @@ typedef bfd_vma CORE_ADDR;
 
 #else /* No BFD64 */
 
-#ifdef CC_HAS_LONG_LONG
 #define LONGEST long long
 #define ULONGEST unsigned long long
-#else
-#ifdef BFD_HOST_64_BIT
-/* BFD_HOST_64_BIT is defined for some hosts that don't have long long
-   (e.g. i386-windows) so try it.  */
-#define LONGEST BFD_HOST_64_BIT
-#define ULONGEST BFD_HOST_U_64_BIT
-#else
-#define LONGEST long
-#define ULONGEST unsigned long
-#endif
-#endif
 
 #endif /* No BFD64 */
 
-#endif /* ! LONGEST */
-
 #ifndef min
 #define min(a, b) ((a) < (b) ? (a) : (b))
 #endif
@@ -171,7 +155,27 @@ extern char *python_libdir;
 /* Search path for separate debug files.  */
 extern char *debug_file_directory;
 
-extern int quit_flag;
+/* GDB has two methods for handling SIGINT.  When immediate_quit is
+   nonzero, a SIGINT results in an immediate longjmp out of the signal
+   handler.  Otherwise, SIGINT simply sets a flag; code that might
+   take a long time, and which ought to be interruptible, checks this
+   flag using the QUIT macro.
+   
+   If GDB is built with Python support, it uses Python's low-level
+   interface to implement the flag.  This approach makes it possible
+   for Python and GDB SIGINT handling to coexist seamlessly.
+
+   If GDB is built without Python, it instead uses its traditional
+   variables.  */
+
+/* Clear the quit flag.  */
+extern void clear_quit_flag (void);
+/* Evaluate to non-zero if the quit flag is set, zero otherwise.  This
+   will clear the quit flag as a side effect.  */
+extern int check_quit_flag (void);
+/* Set the quit flag.  */
+extern void set_quit_flag (void);
+
 extern int immediate_quit;
 
 extern void quit (void);
@@ -184,7 +188,7 @@ extern void quit (void);
    needed.  */
 
 #define QUIT { \
-  if (quit_flag) quit (); \
+  if (check_quit_flag ()) quit (); \
   if (deprecated_interactive_hook) deprecated_interactive_hook (); \
 }
 
@@ -352,8 +356,6 @@ extern void mod_path (char *, char **);
 
 extern void add_path (char *, char **, int);
 
-extern void directory_command (char *, int);
-
 extern void directory_switch (char *, int);
 
 extern char *source_path;
@@ -362,9 +364,14 @@ extern void init_source_path (void);
 
 /* From exec.c */
 
+/* Process memory area starting at ADDR with length SIZE.  Area is readable iff
+   READ is non-zero, writable if WRITE is non-zero, executable if EXEC is
+   non-zero.  Area is possibly changed against its original file based copy if
+   MODIFIED is non-zero.  DATA is passed without changes from a caller.  */
+
 typedef int (*find_memory_region_ftype) (CORE_ADDR addr, unsigned long size,
                                         int read, int write, int exec,
-                                        void *data);
+                                        int modified, void *data);
 
 /* Take over the 'find_mapped_memory' vector from exec.c.  */
 extern void exec_set_find_memory_regions
@@ -587,6 +594,7 @@ enum gdb_osabi
   GDB_OSABI_DARWIN,
   GDB_OSABI_SYMBIAN,
   GDB_OSABI_OPENVMS,
+  GDB_OSABI_LYNXOS178,
 
   GDB_OSABI_INVALID            /* keep this last */
 };
@@ -604,12 +612,6 @@ enum gdb_osabi
 #ifdef HAVE_STDLIB_H
 #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
 
 
 #ifndef atof
This page took 0.025981 seconds and 4 git commands to generate.