Move internal_{,v}warning to common/errors.[ch]
[deliverable/binutils-gdb.git] / gdb / utils.h
index d6df2ee33054f8c02986c5a156d5b9a272632f88..c1948eb652fd1fb0ac794dd0e62a8576542f2c7c 100644 (file)
@@ -23,7 +23,6 @@
 
 #include "cleanups.h"
 #include "exceptions.h"
-#include "print-utils.h"
 
 extern void initialize_utils (void);
 
@@ -31,8 +30,6 @@ extern void initialize_utils (void);
 
 extern int sevenbit_strings;
 
-extern char *savestring (const char *, size_t);
-
 extern int strcmp_iw (const char *, const char *);
 
 extern int strcmp_iw_ordered (const char *, const char *);
@@ -63,7 +60,7 @@ struct timeval get_prompt_for_continue_wait_time (void);
 \f
 /* Parsing utilites.  */
 
-extern int parse_pid_to_attach (char *args);
+extern int parse_pid_to_attach (const char *args);
 
 extern int parse_escape (struct gdbarch *, const char **);
 
@@ -115,6 +112,10 @@ extern struct cleanup *make_cleanup_restore_current_language (void);
 
 extern struct cleanup *make_cleanup_htab_delete (htab_t htab);
 
+struct parser_state;
+extern struct cleanup *make_cleanup_clear_parser_state
+  (struct parser_state **p);
+
 extern void free_current_contents (void *);
 
 extern void init_page_info (void);
@@ -243,6 +244,9 @@ extern void fputstrn_filtered (const char *str, int n, int quotr,
 extern void fputstrn_unfiltered (const char *str, int n, int quotr,
                                 struct ui_file * stream);
 
+/* Return nonzero if filtered printing is initialized.  */
+extern int filtered_printing_initialized (void);
+
 /* Display the host ADDR on STREAM formatted as ``0x%x''.  */
 extern void gdb_print_host_address (const void *addr, struct ui_file *stream);
 
@@ -267,7 +271,6 @@ extern void fprintf_symbol_filtered (struct ui_file *, const char *,
 
 extern void throw_perror_with_name (enum errors errcode, const char *string)
   ATTRIBUTE_NORETURN;
-extern void perror_with_name (const char *) ATTRIBUTE_NORETURN;
 
 extern void perror_warning_with_name (const char *string);
 
@@ -281,34 +284,15 @@ extern void (*deprecated_error_begin_hook) (void);
 
 extern char *warning_pre_print;
 
-extern void verror (const char *fmt, va_list ap)
-     ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (1, 0);
-
-extern void error (const char *fmt, ...)
-     ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (1, 2);
-
 extern void error_stream (struct ui_file *) ATTRIBUTE_NORETURN;
 
-extern void vfatal (const char *fmt, va_list ap)
-     ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (1, 0);
-
-extern void fatal (const char *fmt, ...)
-     ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (1, 2);
-
-extern void internal_verror (const char *file, int line, const char *,
-                            va_list ap)
-     ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (3, 0);
-
-extern void internal_vwarning (const char *file, int line,
+extern void demangler_vwarning (const char *file, int line,
                               const char *, va_list ap)
      ATTRIBUTE_PRINTF (3, 0);
 
-extern void internal_warning (const char *file, int line,
+extern void demangler_warning (const char *file, int line,
                              const char *, ...) ATTRIBUTE_PRINTF (3, 4);
 
-extern void warning (const char *, ...) ATTRIBUTE_PRINTF (1, 2);
-
-extern void vwarning (const char *, va_list args) ATTRIBUTE_PRINTF (1, 0);
 \f
 /* Misc. utilities.  */
 
@@ -362,4 +346,28 @@ extern ULONGEST align_down (ULONGEST v, int n);
 
 extern LONGEST gdb_sign_extend (LONGEST value, int bit);
 
+/* Resource limits used by getrlimit and setrlimit.  */
+
+enum resource_limit_kind
+  {
+    LIMIT_CUR,
+    LIMIT_MAX
+  };
+
+/* Check whether GDB will be able to dump core using the dump_core
+   function.  Returns zero if GDB cannot or should not dump core.
+   If LIMIT_KIND is LIMIT_CUR the user's soft limit will be respected.
+   If LIMIT_KIND is LIMIT_MAX only the hard limit will be respected.  */
+
+extern int can_dump_core (enum resource_limit_kind limit_kind);
+
+/* Print a warning that we cannot dump core.  */
+
+extern void warn_cant_dump_core (const char *reason);
+
+/* Dump core trying to increase the core soft limit to hard limit
+   first.  */
+
+extern void dump_core (void);
+
 #endif /* UTILS_H */
This page took 0.025369 seconds and 4 git commands to generate.