import gdb-1999-08-16 snapshot
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / maint.exp
index b1f7c53f28d3420c9609064e546ea2b5ecb986f6..4c64b97356312d7e4f3fc555ddd3d86717dbc17e 100644 (file)
@@ -31,6 +31,7 @@
 #maintenance dump-me -- Get fatal error; make debugger dump its core
 #maintenance print -- Maintenance command for printing GDB internal state
 #maintenance info -- Commands for showing internal info about the program being debugged
+#maintenance internal-error -- Give GDB an internal error.
 #
 #maintenance print statistics -- Print statistics about internal gdb state
 #maintenance print objfiles -- Print dump of current object file definitions
@@ -442,7 +443,7 @@ set timeout $oldtimeout
 
 send_gdb "help maint\n"
 gdb_expect  {
-        -re "Commands for use by GDB maintainers\\..*Includes commands to dump specific internal GDB structures in.*a human readable form, to cause GDB to deliberately dump core,.*to test internal functions such as the C.. demangler, etc\\..*List of maintenance subcommands:.*maintenance check-symtabs.*maintenance demangle.*maintenance dump-me.*maintenance info.*maintenance print.*maintenance space.*maintenance time.*Type.*help maintenance.*followed by maintenance subcommand name for full documentation\\..*Command name abbreviations are allowed if unambiguous\\..*$gdb_prompt $"\
+        -re "Commands for use by GDB maintainers\\..*Includes commands to dump specific internal GDB structures in.*a human readable form, to cause GDB to deliberately dump core,.*to test internal functions such as the C.. demangler, etc\\..*List of maintenance subcommands:.*maintenance check-symtabs.*maintenance demangle.*maintenance dump-me.*maintenance info.*maintenance internal-error.*maintenance print.*maintenance space.*maintenance time.*Type.*help maintenance.*followed by maintenance subcommand name for full documentation\\..*Command name abbreviations are allowed if unambiguous\\..*$gdb_prompt $"\
  { pass "help maint" }
         -re ".*$gdb_prompt $"       { fail "help maint" }
         timeout         { fail "(timeout) help maint" }
@@ -489,6 +490,14 @@ gdb_expect  {
         timeout         { fail "(timeout) help maint dump-me" }
         }
 
+send_gdb "help maint internal-error\n"
+gdb_expect  {
+        -re "Give GDB an internal error\\.\r\nCause GDB to behave as if an internal error was detected\\..*$gdb_prompt $"\
+                        { pass "help maint internal-error" }
+        -re ".*$gdb_prompt $"       { fail "help maint internal-error" }
+        timeout         { fail "(timeout) help maint internal-error" }
+        }
+
 send_gdb "help maint print statistics\n"
 gdb_expect  {
         -re "Print statistics about internal gdb state\\..*$gdb_prompt $"\
@@ -612,6 +621,38 @@ gdb_expect  {
         timeout         { fail "(timeout) maint dump-me" }
         }
 
+send_gdb "maint internal-error\n"
+gdb_expect  {
+    -re "Continue this debugging session.*\\(y or n\\) $" {
+       send_gdb "y\n"
+       gdb_expect {
+           -re "Create a core file.*\\(y or n\\) $" {
+               send_gdb "n\n"
+               gdb_expect {
+                   -re ".*$gdb_prompt $" {
+                       pass "maint internal-error"
+                   }
+                   timeout {
+                       fail "(timeout)  maint internal-error"
+                   }
+               }
+           }
+           -re ".*$gdb_prompt $" {
+               fail "maint internal-error"
+           }
+           timeout {
+               fail "(timeout)  maint internal-error"
+           }
+       }
+    }
+    -re ".*$gdb_prompt $" {
+       fail "maint internal-error"
+    }
+    timeout {
+       fail "(timeout) maint internal-error"
+    }
+}
+
 #set timeout $oldtimeout
 
 
This page took 0.028832 seconds and 4 git commands to generate.