diff options
author | Tom Tromey <tromey@redhat.com> | 2010-12-09 19:23:49 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2010-12-09 19:23:49 +0000 |
commit | 305aeedc41771066e7283a798b108c95b027997e (patch) | |
tree | d70f4243ed04ef7a18ff2553a8b93c98ea200c20 /gdb/testsuite | |
parent | 90ecf1736cbde5d0ca94914e52a765d3ca01e5f5 (diff) | |
download | gdb-305aeedc41771066e7283a798b108c95b027997e.zip gdb-305aeedc41771066e7283a798b108c95b027997e.tar.gz gdb-305aeedc41771066e7283a798b108c95b027997e.tar.bz2 |
gdb
* mi/mi-parse.h (mi_parse): Update.
* mi/mi-parse.c (mi_parse_cleanup): New function.
(mi_parse): Add 'token' argument. Throw exception on error.
* mi/mi-main.c (mi_print_exception): New function.
(mi_execute_command): Use mi_print_exception. Catch exceptions
from mi_parse.
gdb/testsuite
* gdb.base/interp.exp: Add regression test.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/interp.exp | 11 |
2 files changed, 15 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 6ed7ab3..d60aa7c 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2010-12-09 Tom Tromey <tromey@redhat.com> + * gdb.base/interp.exp: Add regression test. + +2010-12-09 Tom Tromey <tromey@redhat.com> + * gdb.java/jnpe.java: New file. * gdb.java/jnpe.exp: New file. * gdb.cp/nextoverthrow.exp: New file. diff --git a/gdb/testsuite/gdb.base/interp.exp b/gdb/testsuite/gdb.base/interp.exp index ece2552..a923f1a 100644 --- a/gdb/testsuite/gdb.base/interp.exp +++ b/gdb/testsuite/gdb.base/interp.exp @@ -33,4 +33,15 @@ gdb_test_multiple $cmd $cmd { } gdb_test "interpreter-exec console \"show version\"" "GNU gdb .*" +# Regression test for crash when an exception occurs in mi_parse. +gdb_test_multiple "interpreter-exec mi \"-break-insert --thread a\"" \ + "regression test for mi_parse crash" { + -re ".error,msg=.Invalid value for the '--thread' option.\r\n$gdb_prompt " { + pass "$cmd" + gdb_expect 1 { + -re "\r\n$gdb_prompt $" { } + } + } + } + gdb_exit |