aboutsummaryrefslogtreecommitdiff
path: root/gdb/common
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/common')
-rw-r--r--gdb/common/errors.c12
-rw-r--r--gdb/common/errors.h15
2 files changed, 27 insertions, 0 deletions
diff --git a/gdb/common/errors.c b/gdb/common/errors.c
index 7d0bb6e..d6e17a8 100644
--- a/gdb/common/errors.c
+++ b/gdb/common/errors.c
@@ -59,3 +59,15 @@ internal_error (const char *file, int line, const char *fmt, ...)
internal_verror (file, line, fmt, ap);
va_end (ap);
}
+
+/* See common/errors.h. */
+
+void
+internal_warning (const char *file, int line, const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start (ap, fmt);
+ internal_vwarning (file, line, fmt, ap);
+ va_end (ap);
+}
diff --git a/gdb/common/errors.h b/gdb/common/errors.h
index 4e6c2b3..88d77e5 100644
--- a/gdb/common/errors.h
+++ b/gdb/common/errors.h
@@ -58,6 +58,21 @@ extern void internal_error (const char *file, int line,
extern void internal_verror (const char *file, int line,
const char *fmt, va_list args)
ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (3, 0);
+
+/* An internal problem was detected, but the requested operation can
+ still proceed. Internal warnings indicate programming errors as
+ opposed to more general issues beyond the application's control.
+ A warning message is constructed using a printf- or vprintf-style
+ argument list. The function "internal_vwarning" must be provided
+ by the client. */
+
+extern void internal_warning (const char *file, int line,
+ const char *fmt, ...)
+ ATTRIBUTE_PRINTF (3, 4);
+
+extern void internal_vwarning (const char *file, int line,
+ const char *fmt, va_list args)
+ ATTRIBUTE_PRINTF (3, 0);
/* Like "error", but the error message is constructed by combining