diff options
author | Yao Qi <yao@codesourcery.com> | 2011-06-28 08:36:18 +0000 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2011-06-28 08:36:18 +0000 |
commit | af69a5cef74c0fee461cf1dcae8abfe28dd0ca05 (patch) | |
tree | f200cebc7039c7906418721db03734ca42cc7d64 /gdb/testsuite/gdb.cp/exception.exp | |
parent | 9b02d212412d53a8d7e85f5824b1813a9f0a18eb (diff) | |
download | binutils-gdb-af69a5cef74c0fee461cf1dcae8abfe28dd0ca05.tar.gz |
2011-06-28 Yao Qi <yao@codesourcery.com>
* gdb.cp/exception.cc: Don't include iostream.
(bar): Remove print statement.
(catcher): New.
(main): Remove print statements. Call function catcher.
* gdb.cp/exception.exp : Don't match inferior's output in regexp.
Set breakpoint on catcher, and check the value of parameter.
Diffstat (limited to 'gdb/testsuite/gdb.cp/exception.exp')
-rw-r--r-- | gdb/testsuite/gdb.cp/exception.exp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.cp/exception.exp b/gdb/testsuite/gdb.cp/exception.exp index d055d3c7f99..50759cde21d 100644 --- a/gdb/testsuite/gdb.cp/exception.exp +++ b/gdb/testsuite/gdb.cp/exception.exp @@ -127,6 +127,8 @@ gdb_test_multiple "info breakpoints" $name { } } +gdb_test "break catcher" "Breakpoint \[0-9\]+ at.*" + # Get the first exception thrown set name "continue to first throw" @@ -173,14 +175,17 @@ gdb_test_multiple "backtrace" $name { } } +# Continue to breakpoint on catcher. +gdb_test "continue" ".*catcher \\(x=13\\).*" "continue to catcher for the first time" + # Continue to second throw. set name "continue to second throw" gdb_test_multiple "continue" $name { - -re "Continuing.${ws}Got an except 13${ws}Catchpoint \[0-9\]+ \\(exception thrown\\), throw location.*${srcfile}:30, catch location .*${srcfile}:58\r\n$gdb_prompt $" { + -re "Continuing.${ws}Catchpoint \[0-9\]+ \\(exception thrown\\), throw location.*${srcfile}:30, catch location .*${srcfile}:58\r\n$gdb_prompt $" { pass $name } - -re "Continuing.${ws}Got an except 13${ws}Catchpoint \[0-9\]+ \\(exception thrown\\).*\r\n$gdb_prompt $" { + -re "Continuing.${ws}Catchpoint \[0-9\]+ \\(exception thrown\\).*\r\n$gdb_prompt $" { pass $name } } @@ -217,6 +222,9 @@ gdb_test_multiple "backtrace" $name { } } +# Continue to breakpoint on catcher. +gdb_test "continue" ".*catcher \\(x=13\\).*" "continue to catcher for the second time" + # That is all for now. # # The original code had: |