From e3d6ba5d322d871004e84b936e6509749a350325 Mon Sep 17 00:00:00 2001 From: Gary Benson Date: Mon, 4 Aug 2014 12:04:02 +0100 Subject: Move internal_{,v}warning to common/errors.[ch] This commit moves internal_warning and internal_vwarning into common/errors.[ch]. gdb/ChangeLog: * common/errors.h (internal_warning): New declaration. (internal_vwarning): Likewise. * common/errors.c (internal_warning): New function. * utils.h (internal_warning): Don't declare. (internal_vwarning): Likewise. * utils.c (internal_warning): Removed. gdb/gdbserver/ChangeLog: * utils.c (internal_vwarning): New function. --- gdb/common/errors.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'gdb/common/errors.h') 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 -- cgit v1.1