diff options
author | Doug Evans <dje@google.com> | 2009-04-29 22:45:11 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2009-04-29 22:45:11 +0000 |
commit | 9ab4e7442222be784ac8ffbb33631f7172acf7ad (patch) | |
tree | 10767ccea5521f748a14d7fb0f6afedfdf2c9ebf /gdb/testsuite/gdb.cp/mb-templates.exp | |
parent | c5af0dad33ff96dbb404710539f01b011cff0453 (diff) | |
download | gdb-9ab4e7442222be784ac8ffbb33631f7172acf7ad.zip gdb-9ab4e7442222be784ac8ffbb33631f7172acf7ad.tar.gz gdb-9ab4e7442222be784ac8ffbb33631f7172acf7ad.tar.bz2 |
* gdb.cp/mb-ctor.exp: Add multi-line source statement test.
* gdb.cp/mb-ctor.cc: Ditto.
* gdb.cp/mb-inline.exp: Add multi-line source statement test.
* gdb.cp/mb-inline.h (multi_line_foo): New function.
* gdb.cp/mb-inline1.cc: Call it.
* gdb.cp/mb-inline2.cc: Ditto.
* gdb.cp/mb-templates.exp: Add multi-line source statement test.
* gdb.cp/mb-templates.cc (multi_line_foo): New template.
Diffstat (limited to 'gdb/testsuite/gdb.cp/mb-templates.exp')
-rw-r--r-- | gdb/testsuite/gdb.cp/mb-templates.exp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.cp/mb-templates.exp b/gdb/testsuite/gdb.cp/mb-templates.exp index e32dc52..5f93228 100644 --- a/gdb/testsuite/gdb.cp/mb-templates.exp +++ b/gdb/testsuite/gdb.cp/mb-templates.exp @@ -165,3 +165,25 @@ gdb_test "continue" \ ".*Breakpoint.*foo<int> \\(i=1\\).*" \ "instantiation: run to breakpoint 2" + +# Make sure we can set a breakpoint on a source statement that spans +# multiple lines. + +delete_breakpoints + +set bp_location [gdb_get_line_number "set multi-line breakpoint here"] + +if { ![runto_main] } { + fail "Can't run to main for multi_line_foo tests." + return 0 +} + +gdb_test "break $srcfile:$bp_location" \ + "Breakpoint.*at.* file .*$srcfile, line.*\\(2 locations\\).*" \ + "set multi_line_foo breakpoint" +gdb_test "continue" \ + ".*Breakpoint.*multi_line_foo<int> \\(i=0\\).*" \ + "run to multi_line_foo breakpoint 2 <int>" +gdb_test "continue" \ + ".*Breakpoint.*multi_line_foo<double> \\(i=0\\).*" \ + "run to multi_line_foo breakpoint 2 <double>" |