aboutsummaryrefslogtreecommitdiff
path: root/gdb/maint.c
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>1999-08-16 19:57:19 +0000
committerJason Molenda <jmolenda@apple.com>1999-08-16 19:57:19 +0000
commit7be570e7ce77920e2e628a03bdfe2d295fc2568f (patch)
treea49512270bb021f1d5171b362dc973e28c97ca94 /gdb/maint.c
parented288bb597072176e84fc8279707a3f2f475779b (diff)
downloadfsf-binutils-gdb-7be570e7ce77920e2e628a03bdfe2d295fc2568f.zip
fsf-binutils-gdb-7be570e7ce77920e2e628a03bdfe2d295fc2568f.tar.gz
fsf-binutils-gdb-7be570e7ce77920e2e628a03bdfe2d295fc2568f.tar.bz2
import gdb-1999-08-16 snapshot
Diffstat (limited to 'gdb/maint.c')
-rw-r--r--gdb/maint.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gdb/maint.c b/gdb/maint.c
index 4ec051a..10cf6bb 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -45,6 +45,8 @@ static void maintenance_command PARAMS ((char *, int));
static void maintenance_dump_me PARAMS ((char *, int));
+static void maintenance_internal_error PARAMS ((char *args, int from_tty));
+
static void maintenance_demangle PARAMS ((char *, int));
static void maintenance_time_display PARAMS ((char *, int));
@@ -99,12 +101,29 @@ maintenance_dump_me (args, from_tty)
{
if (query ("Should GDB dump core? "))
{
+#ifdef __DJGPP__
+ /* SIGQUIT by default is ignored, so use SIGABRT instead. */
+ signal (SIGABRT, SIG_DFL);
+ kill (getpid (), SIGABRT);
+#else
signal (SIGQUIT, SIG_DFL);
kill (getpid (), SIGQUIT);
+#endif
}
}
#endif
+/* Stimulate the internal error mechanism that GDB uses when an
+ internal problem is detected. Allows testing of the mechanism.
+ Also useful when the user wants to drop a core file but not exit
+ GDB. */
+
+static void
+maintenance_internal_error (char *args, int from_tty)
+{
+ internal_error ("internal maintenance");
+}
+
/* 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
@@ -378,6 +397,11 @@ itself a SIGQUIT signal.",
&maintenancelist);
#endif
+ add_cmd ("internal-error", class_maintenance, maintenance_internal_error,
+ "Give GDB an internal error.\n\
+Cause GDB to behave as if an internal error was detected.",
+ &maintenancelist);
+
add_cmd ("demangle", class_maintenance, maintenance_demangle,
"Demangle a C++ mangled name.\n\
Call internal GDB demangler routine to demangle a C++ link name\n\