2011-06-15 Yao Qi gdb/testsuite/ * gdb.cp/mb-inline.exp: Set breakpoint on function marker. XFAIL for uclinux. * gdb.cp/mb-inline1.cc (marker): New. diff --git a/gdb/testsuite/gdb.cp/mb-inline.exp b/gdb/testsuite/gdb.cp/mb-inline.exp index 86cb5ba..62708b0 100644 --- a/gdb/testsuite/gdb.cp/mb-inline.exp +++ b/gdb/testsuite/gdb.cp/mb-inline.exp @@ -101,7 +101,24 @@ gdb_expect { } } -gdb_continue_to_end "disabled breakpoint 1.2" + +gdb_test "break marker" \ + "Breakpoint.*at.* file .*, line.*" \ + "set breakpoint on marker" + +gdb_test_multiple "continue" "continue with disabled breakpoint 1.2" { + -re "Breakpoint \[0-9\]+,.*marker.*$gdb_prompt $" { + pass "continue with disabled breakpoint 1.2" + } + -re "Breakpoint \[0-9\]+,.*foo \\(i=1\\).*$gdb_prompt $" { + # When inferior is restarted, breakpoint locations will be updated. + # On uclinux, it is not guaranteed that new inferior is located the + # same address as previous one, so status/state of breakpoint location + # will loose. + setup_xfail "*-*-uclinux*" + fail "continue with disabled breakpoint 1.2" + } +} # Make sure we can set a breakpoint on a source statement that spans # multiple lines. diff --git a/gdb/testsuite/gdb.cp/mb-inline1.cc b/gdb/testsuite/gdb.cp/mb-inline1.cc index 3259002..86dc697 100644 --- a/gdb/testsuite/gdb.cp/mb-inline1.cc +++ b/gdb/testsuite/gdb.cp/mb-inline1.cc @@ -26,10 +26,15 @@ afn () return foo (0) + multi_line_foo (0); } +void +marker () +{} + int main () { int a = afn (); int b = bfn (); + marker (); return a * b; }