[Lldb-commits] [lldb] [lldb-dap] Add an option to provide a format for threads (PR #72196)
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Mon Nov 13 22:18:01 PST 2023
================
@@ -839,4 +839,19 @@ void DAP::SetFrameFormat(llvm::StringRef format) {
}
}
+void DAP::SetThreadFormat(llvm::StringRef format) {
+ if (format.empty())
+ return;
+ lldb::SBError error;
+ g_dap.thread_format = lldb::SBFormat(format.data(), error);
----------------
clayborg wrote:
if `format` isn't null terminated this can cause problems. You will want to use the following to ensure this is NULL terminated:
```
g_dap.thread_format = lldb::SBFormat(format.str().c_str(), error);
```
If the same thing was being done for the `g_dap.frame_format` lets fix that too.
https://github.com/llvm/llvm-project/pull/72196
More information about the lldb-commits
mailing list