aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-01-17 23:33:39 +0000
committerAndrew Cagney <cagney@redhat.com>2002-01-17 23:33:39 +0000
commit375fc9838201e2dfe78c9b9ac1e3aaecdc1e9f43 (patch)
tree9307cac720d1defb1edc684dcd89bb2e5c151761 /gdb
parent3ab9460d38e10baff7b3203a6423533c48ace33f (diff)
downloadgdb-375fc9838201e2dfe78c9b9ac1e3aaecdc1e9f43.zip
gdb-375fc9838201e2dfe78c9b9ac1e3aaecdc1e9f43.tar.gz
gdb-375fc9838201e2dfe78c9b9ac1e3aaecdc1e9f43.tar.bz2
Change behavour of internal-error to quit and dump core by default.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.base/maint.exp6
-rw-r--r--gdb/utils.c29
4 files changed, 28 insertions, 17 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b28666a..bf90a41 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2002-01-17 Andrew Cagney <ac131313@redhat.com>
+ * utils.c (internal_verror): Fix comments, default is yes not no.
+ Update queries to match. Default to quit and dump core.
+
+2002-01-17 Andrew Cagney <ac131313@redhat.com>
+
* breakpoint.c: Update assuming #if UI_OUT is always true. Update
copyright.
* defs.h, event-top.c, gdbcmd.h: Ditto.
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 99e7c55..642a56c 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2002-01-17 Andrew Cagney <ac131313@redhat.com>
+
+ * gdb.base/maint.exp: Update ``maint internal-error'' to match
+ continue/quit query. Update copyright.
+
2002-01-13 Daniel Jacobowitz <drow@mvista.com>
* gdb.c++/demangle.exp: Accept slightly dubious v2 demangler result
diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp
index f4d2577..1ccc712 100644
--- a/gdb/testsuite/gdb.base/maint.exp
+++ b/gdb/testsuite/gdb.base/maint.exp
@@ -1,4 +1,4 @@
-# Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -660,8 +660,8 @@ gdb_expect {
send_gdb "maint internal-error\n"
gdb_expect {
- -re "Continue this debugging session.*\\(y or n\\) $" {
- send_gdb "y\n"
+ -re "Quit this debugging session.*\\(y or n\\) $" {
+ send_gdb "n\n"
gdb_expect {
-re "Create a core file.*\\(y or n\\) $" {
send_gdb "n\n"
diff --git a/gdb/utils.c b/gdb/utils.c
index 5abb741..83d1a97 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -694,7 +694,7 @@ internal_verror (const char *file, int line,
{
static char msg[] = "Internal GDB error: recursive internal error.\n";
static int dejavu = 0;
- int continue_p;
+ int quit_p;
int dump_core_p;
/* don't allow infinite error recursion. */
@@ -719,31 +719,32 @@ internal_verror (const char *file, int line,
vfprintf_unfiltered (gdb_stderr, fmt, ap);
fputs_unfiltered ("\n", gdb_stderr);
- /* Default (no case) is to quit GDB. When in batch mode this
+ /* Default (yes/batch case) is to quit GDB. When in batch mode this
lessens the likelhood of GDB going into an infinate loop. */
- continue_p = query ("\
+ quit_p = query ("\
An internal GDB error was detected. This may make further\n\
-debugging unreliable. Continue this debugging session? ");
+debugging unreliable. Quit this debugging session? ");
- /* Default (no case) is to not dump core. Lessen the chance of GDB
- leaving random core files around. */
+ /* Default (yes/batch case) is to dump core. This leaves a GDB
+ dropping so that it is easier to see that something went wrong to
+ GDB. */
dump_core_p = query ("\
Create a core file containing the current state of GDB? ");
- if (continue_p)
+ if (quit_p)
{
if (dump_core_p)
- {
- if (fork () == 0)
- abort (); /* NOTE: GDB has only three calls to abort(). */
- }
+ abort (); /* NOTE: GDB has only three calls to abort(). */
+ else
+ exit (1);
}
else
{
if (dump_core_p)
- abort (); /* NOTE: GDB has only three calls to abort(). */
- else
- exit (1);
+ {
+ if (fork () == 0)
+ abort (); /* NOTE: GDB has only three calls to abort(). */
+ }
}
dejavu = 0;