aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/API/SBDebugger.cpp
diff options
context:
space:
mode:
authorJeffrey Tan <jeffreytan@fb.com>2023-02-03 17:09:09 -0800
committerJeffrey Tan <jeffreytan@fb.com>2023-03-07 14:48:15 -0800
commitb461398f1ce307ec80708b7eb50f3bc82b76ed3f (patch)
treead2231b14096485f58091b68490b4436615f32af /lldb/source/API/SBDebugger.cpp
parent6e2ade23c7944a09241d6cafe559f05b39cb17e8 (diff)
downloadllvm-b461398f1ce307ec80708b7eb50f3bc82b76ed3f.zip
llvm-b461398f1ce307ec80708b7eb50f3bc82b76ed3f.tar.gz
llvm-b461398f1ce307ec80708b7eb50f3bc82b76ed3f.tar.bz2
Add a new SBDebugger::SetDestroyCallback() API
Adding a new SBDebugger::SetDestroyCallback() API. This API can be used by any client to query for statistics/metrics before exiting debug sessions. Differential Revision: https://reviews.llvm.org/D143520
Diffstat (limited to 'lldb/source/API/SBDebugger.cpp')
-rw-r--r--lldb/source/API/SBDebugger.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lldb/source/API/SBDebugger.cpp b/lldb/source/API/SBDebugger.cpp
index 641c84f..d90fcbf 100644
--- a/lldb/source/API/SBDebugger.cpp
+++ b/lldb/source/API/SBDebugger.cpp
@@ -1684,6 +1684,15 @@ void SBDebugger::SetLoggingCallback(lldb::LogOutputCallback log_callback,
}
}
+void SBDebugger::SetDestroyCallback(
+ lldb::SBDebuggerDestroyCallback destroy_callback, void *baton) {
+ LLDB_INSTRUMENT_VA(this, destroy_callback, baton);
+ if (m_opaque_sp) {
+ return m_opaque_sp->SetDestroyCallback(
+ destroy_callback, baton);
+ }
+}
+
SBTrace
SBDebugger::LoadTraceFromFile(SBError &error,
const SBFileSpec &trace_description_file) {