diff --git a/src/debug_lldb.cpp b/src/debug_lldb.cpp index 49fe600..9250529 100644 --- a/src/debug_lldb.cpp +++ b/src/debug_lldb.cpp @@ -10,8 +10,8 @@ #include "utility.hpp" #include #include -#include #include +#include extern char **environ; @@ -601,6 +601,7 @@ void Debug::LLDB::init_module(pybind11::module &api) { dbg .def(py::init([]() { return &(Debug::LLDB::get()); })) + .def_static("destroy", &Debug::LLDB::destroy) .def_readwrite("on_exit", &Debug::LLDB::on_exit) .def("continue_debug", &Debug::LLDB::continue_debug) .def("stop", &Debug::LLDB::stop) diff --git a/tests/python_bindings/Debug_lldb_tests/debug_lldb_test.py b/tests/python_bindings/Debug_lldb_tests/debug_lldb_test.py index 09e05fa..154674a 100644 --- a/tests/python_bindings/Debug_lldb_tests/debug_lldb_test.py +++ b/tests/python_bindings/Debug_lldb_tests/debug_lldb_test.py @@ -18,4 +18,4 @@ def start_on_exit(exec_path): while not exited: sleep(0.1) - l.cancel() + LLDB.destroy()