aboutsummaryrefslogtreecommitdiff
path: root/gdb/defs.h
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2004-01-20 02:04:19 +0000
committerJeff Johnston <jjohnstn@redhat.com>2004-01-20 02:04:19 +0000
commit4fcef00ad0f7de5a38ce1431e9db564aa3508871 (patch)
treec6c24f8ed847db8e72d197e8dbaaab60bc0e84c3 /gdb/defs.h
parent53a83a21c7ab484d1e5c3dec1ccb976cbeb50924 (diff)
downloadgdb-4fcef00ad0f7de5a38ce1431e9db564aa3508871.zip
gdb-4fcef00ad0f7de5a38ce1431e9db564aa3508871.tar.gz
gdb-4fcef00ad0f7de5a38ce1431e9db564aa3508871.tar.bz2
2004-01-19 Jeff Johnston <jjohnstn@redhat.com>
* linespec.c (decode_variable, symtab_from_filename): Call error_silent with error message instead of throwing an exception directly. * defs.h (error_silent, error_output_message): Add prototypes. (catch_exceptions_with_msg): Ditto. * utils.c (error_silent, error_output_message): New functions. * top.c (catch_exceptions_with_msg): New function.
Diffstat (limited to 'gdb/defs.h')
-rw-r--r--gdb/defs.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/gdb/defs.h b/gdb/defs.h
index c40e768..7df193d 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -1,7 +1,7 @@
/* *INDENT-OFF* */ /* ATTR_FORMAT confuses indent, avoid running it for now */
/* Basic, host-specific, and target-specific definitions for GDB.
Copyright 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
- 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of GDB.
@@ -911,6 +911,8 @@ extern NORETURN void verror (const char *fmt, va_list ap) ATTR_NORETURN;
extern NORETURN void error (const char *fmt, ...) ATTR_NORETURN ATTR_FORMAT (printf, 1, 2);
+extern NORETURN void error_silent (const char *fmt, ...) ATTR_NORETURN ATTR_FORMAT (printf, 1, 2);
+
extern NORETURN void error_stream (struct ui_file *) ATTR_NORETURN;
/* Initialize the error buffer. */
@@ -920,6 +922,9 @@ extern void error_init (void);
message. */
extern char *error_last_message (void);
+/* Output arbitrary error message. */
+extern void error_output_message (char *pre_print, char *msg);
+
extern NORETURN void internal_verror (const char *file, int line,
const char *, va_list ap) ATTR_NORETURN;
@@ -982,6 +987,11 @@ extern NORETURN void throw_exception (enum return_reason) ATTR_NORETURN;
new cleanup_chain is established. The old values are restored
before catch_exceptions() returns.
+ The variant catch_exceptions_with_msg() is the same as
+ catch_exceptions() but adds the ability to return an allocated
+ copy of the gdb error message. This is used when a silent error is
+ issued and the caller wants to manually issue the error message.
+
FIXME; cagney/2001-08-13: The need to override the global UIOUT
builder variable should just go away.
@@ -994,6 +1004,11 @@ typedef int (catch_exceptions_ftype) (struct ui_out *ui_out, void *args);
extern int catch_exceptions (struct ui_out *uiout,
catch_exceptions_ftype *func, void *func_args,
char *errstring, return_mask mask);
+extern int catch_exceptions_with_msg (struct ui_out *uiout,
+ catch_exceptions_ftype *func,
+ void *func_args,
+ char *errstring, char **gdberrmsg,
+ return_mask mask);
/* If CATCH_ERRORS_FTYPE throws an error, catch_errors() returns zero
otherwize the result from CATCH_ERRORS_FTYPE is returned. It is