Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 19th, 2010 | Syntax: None | Size: 0.76 KB | Hits: 109 | Expires: Never
Copy text to clipboard
  1. # Test commands.
  2. set bp_location2 [gdb_get_line_number "Break at add."]
  3. send_gdb "break $bp_location2\n"
  4. gdb_expect {
  5.   -re "Breakpoint (\[0-9\]*) at .*, line $bp_location2.*$gdb_prompt $"\
  6.           {pass "Manually set breakpoint for condition test."}
  7.   -re "$gdb_prompt $"\
  8.           {fail "Manually set breakpoint for condition test."}
  9.   timeout {fail "Manually set breakpoint for condition test."}
  10. }
  11.  
  12. send_gdb "commands $expect_out(1,string)\n"
  13. send_gdb "print \"Command for bp_location2 has been executed.\"\n"
  14. send_gdb "print result\n"
  15. send_gdb "end\n"
  16.  
  17. gdb_py_test_silent_cmd "python blist = gdb.breakpoints()" "Get Breakpoint List" 0
  18. gdb_test "python print blist\[len(blist)-1\].commands" "print \"Command for bp_location2 has been executed.\".*print result"