aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2010-12-15 21:19:50 +0000
committerTom Tromey <tromey@redhat.com>2010-12-15 21:19:50 +0000
commit5b79abe7f19d73ff246909922f3c2da2af689779 (patch)
tree8142c32892796da119dac7e1a546c9fe16160d48 /gdb/testsuite/gdb.cp/nextoverthrow.cc
parent * mips-tdep.c (mips_pseudo_register_write): Sign extend 32-bit (diff)
downloadbinutils-gdb-5b79abe7f19d73ff246909922f3c2da2af689779.tar.gz
binutils-gdb-5b79abe7f19d73ff246909922f3c2da2af689779.tar.bz2
binutils-gdb-5b79abe7f19d73ff246909922f3c2da2af689779.zip
gdb
* infrun.c (save_infcall_control_state): Handle the exception-resume breakpoint. (restore_infcall_control_state): Likewise. (discard_infcall_control_state): Likewise. gdb/testsuite 2010-12-15 Jan Kratochvil <jan.kratochvil@redhat.com> * gdb.cp/nextoverthrow.cc (dummy): Return int 0. (NextOverThrowDerivates) <resumebpt>: New. (resumebpt_test): New. (main): Call resumebpt_test. * gdb.cp/nextoverthrow.exp: New block for test of "resumebpt".
Diffstat (limited to 'gdb/testsuite/gdb.cp/nextoverthrow.cc')
-rw-r--r--gdb/testsuite/gdb.cp/nextoverthrow.cc36
1 files changed, 34 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.cp/nextoverthrow.cc b/gdb/testsuite/gdb.cp/nextoverthrow.cc
index b25cb34338c..b618f15c223 100644
--- a/gdb/testsuite/gdb.cp/nextoverthrow.cc
+++ b/gdb/testsuite/gdb.cp/nextoverthrow.cc
@@ -19,8 +19,9 @@
using namespace std;
-void dummy ()
+int dummy ()
{
+ return 0;
}
class NextOverThrowDerivates
@@ -89,10 +90,39 @@ public:
function1 (val); // until here
}
+ void resumebpt (int val)
+ {
+ try
+ {
+ throw val;
+ }
+ catch (int x)
+ {
+ dummy ();
+ }
+ }
+
};
NextOverThrowDerivates next_cases;
+int
+resumebpt_test (int x)
+{
+ try
+ {
+ next_cases.resumebpt (x); // Start: resumebpt
+ next_cases.resumebpt (x + 1); // Second: resumebpt
+ }
+ catch (int val)
+ {
+ dummy ();
+ x = val;
+ }
+
+ return x;
+}
+
int main ()
{
int testval = -1;
@@ -198,6 +228,8 @@ int main ()
testval = val; // End: advance
}
+ // Test of "resumebpt".
+ testval = resumebpt_test (10);
+
testval = 32; // done
}
-