2002-11-11 Andrew Cagney <ac131313@redhat.com>
[deliverable/binutils-gdb.git] / gdb / defs.h
index 996c8fcbcb2681c8eb0fe37b365d566f79cfd2f1..48eb509ebe6a49f7ca5c27ead7bc26dc52e6807c 100644 (file)
 #ifndef DEFS_H
 #define DEFS_H
 
-#include "config.h"            /* Generated by configure */
+#include "config.h"            /* Generated by configure.  */
+
 #include <stdio.h>
-#include <errno.h>             /* System call error return status */
+#include <errno.h>             /* System call error return status */
 #include <limits.h>
 
 #ifdef HAVE_STDDEF_H
 #include <stddef.h>
 #else
-#include <sys/types.h>         /* for size_t */
+#include <sys/types.h>         /* For size_t.  */
 #endif
 
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
 
+/* First include ansidecl.h so we can use the various macro definitions
+   here and in all subsequent file inclusions.  */
+
+#include "ansidecl.h"
+
+#include "gdb_locale.h"
+
 /* For ``enum target_signal''.  */
 #include "gdb/signals.h"
 
-/* Just in case they're not defined in stdio.h. */
+/* Just in case they're not defined in stdio.h.  */
 
 #ifndef SEEK_SET
 #define SEEK_SET 0
 #define SEEK_CUR 1
 #endif
 
-/* First include ansidecl.h so we can use the various macro definitions
-   here and in all subsequent file inclusions.  */
-
-#include "ansidecl.h"
-
-#include <stdarg.h>            /* for va_list */
+#include <stdarg.h>            /* For va_list.  */
 
 #include "libiberty.h"
 
@@ -154,10 +157,6 @@ typedef bfd_vma CORE_ADDR;
 #define STREQ(a,b) (*(a) == *(b) ? !strcmp ((a), (b)) : 0)
 #define STREQN(a,b,c) (*(a) == *(b) ? !strncmp ((a), (b), (c)) : 0)
 
-/* The character GNU C++ uses to build identifiers that must be unique from
-   the program's identifiers (such as $this and $$vptr).  */
-#define CPLUS_MARKER '$'       /* May be overridden to '.' for SysV */
-
 /* Check if a character is one of the commonly used C++ marker characters.  */
 extern int is_cplus_marker (int);
 
@@ -206,8 +205,9 @@ enum language
     language_auto,             /* Placeholder for automatic setting */
     language_c,                        /* C */
     language_cplus,            /* C++ */
+    language_objc,             /* Objective-C */
     language_java,             /* Java */
-    language_chill,            /* Chill */
+    /* OBSOLETE language_chill,        */      /* Chill */
     language_fortran,          /* Fortran */
     language_m2,               /* Modula-2 */
     language_asm,              /* Assembly language */
@@ -222,6 +222,14 @@ enum precision_type
     unspecified_precision
   };
 
+/* A generic, not quite boolean, enumeration.  */
+enum auto_boolean
+{
+  AUTO_BOOLEAN_TRUE,
+  AUTO_BOOLEAN_FALSE,
+  AUTO_BOOLEAN_AUTO
+};
+
 /* the cleanup list records things that have to be undone
    if an error happens (descriptors to be closed, memory to be freed, etc.)
    Each link in the chain records a function to call and an
@@ -290,9 +298,9 @@ extern int inside_entry_file (CORE_ADDR addr);
 
 extern int inside_main_func (CORE_ADDR pc);
 
-/* From ch-lang.c, for the moment. (FIXME) */
+/* OBSOLETE From ch-lang.c, for the moment. (FIXME) */
 
-extern char *chill_demangle (const char *);
+/* OBSOLETE extern char *chill_demangle (const char *); */
 
 /* From utils.c */
 
@@ -372,6 +380,7 @@ extern CORE_ADDR host_pointer_to_address (void *ptr);
 extern void *address_to_host_pointer (CORE_ADDR addr);
 
 extern char *gdb_realpath (const char *);
+extern char *xfullpath (const char *);
 
 /* From demangle.c */
 
@@ -383,7 +392,6 @@ struct type;
 typedef int (use_struct_convention_fn) (int gcc_p, struct type * value_type);
 extern use_struct_convention_fn generic_use_struct_convention;
 
-typedef unsigned char *(breakpoint_from_pc_fn) (CORE_ADDR * pcptr, int *lenptr);
 \f
 /* Annotation stuff.  */
 
@@ -435,6 +443,8 @@ extern void puts_filtered (const char *);
 
 extern void puts_unfiltered (const char *);
 
+extern void puts_filtered_tabular (char *string, int width, int right);
+
 extern void puts_debug (char *prefix, char *string, char *suffix);
 
 extern void vprintf_filtered (const char *, va_list) ATTR_FORMAT (printf, 1, 0);
@@ -525,6 +535,8 @@ extern char *skip_quoted (char *);
 
 extern char *gdb_readline (char *);
 
+extern char *gdb_readline_wrapper (char *);
+
 extern char *command_line_input (char *, int, char *);
 
 extern void print_prompt (void);
@@ -579,10 +591,6 @@ extern void exec_set_find_memory_regions (int (*) (int (*) (CORE_ADDR,
                                                            void *),
                                                   void *));
 
-/* From findvar.c */
-
-extern int read_relative_register_raw_bytes (int, char *);
-
 /* Possible lvalue types.  Like enum language, this should be in
    value.h, but needs to be here for the same reason. */
 
@@ -840,10 +848,11 @@ extern void xmfree (void *md, void *ptr);
    "libiberty.h". */
 extern void xfree (void *);
 
-/* Utility macro to allocate typed memory.  Avoids errors like
+/* Utility macros to allocate typed memory.  Avoids errors like
    ``struct foo *foo = xmalloc (sizeof bar)'' and ``struct foo *foo =
    (struct foo *) xmalloc (sizeof bar)''.  */
 #define XMALLOC(TYPE) ((TYPE*) xmalloc (sizeof (TYPE)))
+#define XCALLOC(NMEMB, TYPE) ((TYPE*) xcalloc ((NMEMB), sizeof (TYPE)))
 
 /* Like asprintf/vasprintf but get an internal_error if the call
    fails. */
@@ -880,6 +889,12 @@ extern NORETURN void internal_verror (const char *file, int line,
 extern NORETURN void internal_error (const char *file, int line,
                                     const char *, ...) ATTR_NORETURN ATTR_FORMAT (printf, 3, 4);
 
+extern void internal_vwarning (const char *file, int line,
+                              const char *, va_list ap);
+
+extern void internal_warning (const char *file, int line,
+                             const char *, ...) ATTR_FORMAT (printf, 3, 4);
+
 extern NORETURN void nomem (long) ATTR_NORETURN;
 
 /* Reasons for calling throw_exception().  NOTE: all reason values
@@ -1062,9 +1077,9 @@ extern void *alloca ();
 
 /* In findvar.c.  */
 
-extern LONGEST extract_signed_integer (void *, int);
+extern LONGEST extract_signed_integer (const void *, int);
 
-extern ULONGEST extract_unsigned_integer (void *, int);
+extern ULONGEST extract_unsigned_integer (const void *, int);
 
 extern int extract_long_unsigned_integer (void *, int, LONGEST *);
 
This page took 0.026525 seconds and 4 git commands to generate.