2008-11-12 Tristan Gingold <gingold@adacore.com>
[binutils-gdb.git] / gdb / defs.h
index b0d18d2cd34842c5da6df773d49aaf4ca99ae15a..b04726693d56ea70599f97dd3793343f225e12c9 100644 (file)
 #include <limits.h>
 #include <stdint.h>
 
+/* The libdecnumber library, on which GDB depends, includes a header file
+   called gstdint.h instead of relying directly on stdint.h.  GDB, on the
+   other hand, includes stdint.h directly, relying on the fact that gnulib
+   generates a copy if the system doesn't provide one or if it is missing
+   some features.  Unfortunately, gstdint.h and stdint.h cannot be included
+   at the same time, which may happen when we include a file from
+   libdecnumber.
+
+   The following macro definition effectively prevents the inclusion of
+   gstdint.h, as all the definitions it provides are guarded against
+   the GCC_GENERATED_STDINT_H macro.  We already have gnulib/stdint.h
+   included, so it's ok to blank out gstdint.h.  */
+#define GCC_GENERATED_STDINT_H 1
+
 #ifdef HAVE_STDDEF_H
 #include <stddef.h>
 #endif
@@ -348,6 +362,8 @@ extern struct cleanup *(make_cleanup_free_section_addr_info
 
 extern struct cleanup *make_cleanup_close (int fd);
 
+extern struct cleanup *make_cleanup_fclose (FILE *file);
+
 extern struct cleanup *make_cleanup_bfd_close (bfd *abfd);
 
 extern struct cleanup *make_cleanup_restore_integer (int *variable);
@@ -391,6 +407,8 @@ ULONGEST strtoulst (const char *num, const char **trailer, int base);
 
 char *ldirname (const char *filename);
 
+char **gdb_buildargv (const char *);
+
 /* From demangle.c */
 
 extern void set_demangling_style (char *);
@@ -683,8 +701,12 @@ extern void free_command_lines (struct command_line **);
 
 struct continuation;
 struct thread_info;
+struct inferior;
 
 /* From utils.c */
+
+/* Thread specific continuations.  */
+
 extern void add_continuation (struct thread_info *,
                              void (*)(void *), void *,
                              void (*)(void *));
@@ -701,6 +723,14 @@ extern void do_all_intermediate_continuations_thread (struct thread_info *);
 extern void discard_all_intermediate_continuations (void);
 extern void discard_all_intermediate_continuations_thread (struct thread_info *);
 
+/* Inferior specific (any thread) continuations.  */
+
+extern void add_inferior_continuation (void (*) (void *),
+                                      void *,
+                                      void (*) (void *));
+extern void do_all_inferior_continuations (void);
+extern void discard_all_inferior_continuations (struct inferior *inf);
+
 /* String containing the current directory (what getwd would return).  */
 
 extern char *current_directory;
@@ -736,6 +766,7 @@ enum val_prettyprint
       ptid_get_lwp     - Fetch the lwp component of a ptid.
       ptid_get_tid     - Fetch the tid component of a ptid.
       ptid_equal       - Test to see if two ptids are equal.
+      ptid_is_pid      - Test to see if this ptid represents a process id.
 
    Please do NOT access the struct ptid members directly (except, of
    course, in the implementation of the above ptid manipulation