Untitled
By: a guest | Mar 19th, 2010 | Syntax:
None | Size: 0.76 KB | Hits: 109 | Expires: Never
# Test commands.
set bp_location2 [gdb_get_line_number "Break at add."]
send_gdb "break $bp_location2\n"
gdb_expect {
-re "Breakpoint (\[0-9\]*) at .*, line $bp_location2.*$gdb_prompt $"\
{pass "Manually set breakpoint for condition test."}
-re "$gdb_prompt $"\
{fail "Manually set breakpoint for condition test."}
timeout {fail "Manually set breakpoint for condition test."}
}
send_gdb "commands $expect_out(1,string)\n"
send_gdb "print \"Command for bp_location2 has been executed.\"\n"
send_gdb "print result\n"
send_gdb "end\n"
gdb_py_test_silent_cmd "python blist = gdb.breakpoints()" "Get Breakpoint List" 0
gdb_test "python print blist\[len(blist)-1\].commands" "print \"Command for bp_location2 has been executed.\".*print result"