* NEWS: Update.
* python/python.c (finalize_python): New function. (_initialize_python): Make a final cleanup. testsuite * gdb.python/python.exp: Test atexit.register.
This commit is contained in:
parent
05eade73e1
commit
d7de8e3ce9
5 changed files with 49 additions and 0 deletions
|
@ -141,6 +141,24 @@ gdb_test "python print a" ".*aliases -- Aliases of other commands.*" "verify hel
|
|||
gdb_py_test_silent_cmd "python nothread = gdb.selected_thread()" "Attempt to aquire thread with no inferior" 1
|
||||
gdb_test "python print nothread == None" "True" "Ensure that no threads are returned"
|
||||
|
||||
gdb_py_test_multiple "register atexit function" \
|
||||
"python" "" \
|
||||
"import atexit" "" \
|
||||
"def printit(arg):" "" \
|
||||
" print arg" "" \
|
||||
"atexit.register(printit, 'good bye world')" "" \
|
||||
"end" ""
|
||||
|
||||
send_gdb "quit\n"
|
||||
gdb_expect {
|
||||
-re "good bye world" {
|
||||
pass "atexit handling"
|
||||
}
|
||||
default {
|
||||
fail "atexit handling"
|
||||
}
|
||||
}
|
||||
|
||||
# Start with a fresh gdb.
|
||||
clean_restart ${testfile}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue