diff options
Diffstat (limited to 'gdb/maint.c')
-rw-r--r-- | gdb/maint.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gdb/maint.c b/gdb/maint.c index 30a9d3b..5f34af3 100644 --- a/gdb/maint.c +++ b/gdb/maint.c @@ -131,6 +131,15 @@ maintenance_internal_warning (char *args, int from_tty) internal_warning (__FILE__, __LINE__, "%s", (args == NULL ? "" : args)); } +/* Stimulate the internal error mechanism that GDB uses when an + demangler problem is detected. Allows testing of the mechanism. */ + +static void +maintenance_demangler_warning (char *args, int from_tty) +{ + demangler_warning (__FILE__, __LINE__, "%s", (args == NULL ? "" : args)); +} + /* Someday we should allow demangling for things other than just explicit strings. For example, we might want to be able to specify the address of a string in either GDB's process space or the @@ -1055,6 +1064,12 @@ Give GDB an internal warning.\n\ Cause GDB to behave as if an internal warning was reported."), &maintenancelist); + add_cmd ("demangler-warning", class_maintenance, + maintenance_demangler_warning, _("\ +Give GDB a demangler warning.\n\ +Cause GDB to behave as if a demangler warning was reported."), + &maintenancelist); + add_cmd ("demangle", class_maintenance, maintenance_demangle, _("\ Demangle a C++/ObjC mangled name.\n\ Call internal GDB demangler routine to demangle a C++ link name\n\ |