https://github.com/Jlalond created https://github.com/llvm/llvm-project/pull/123826
Recently I added SBProgress (#119052), and during that original commit I tested if the progress event was sent over LLDB-DAP, and it was. However upon the suggestion of @JDevlieghere and @labath we added an external category (#120171), which I did not test. This small patch wires up DAP to listen for external events by default, and adds the external category to the SBDebugger enumeration. >From f16aab0a3b715cd294d61a4bb7278ff24610598a Mon Sep 17 00:00:00 2001 From: Jacob Lalonde <jalalo...@fb.com> Date: Tue, 21 Jan 2025 13:40:23 -0800 Subject: [PATCH] Wire up DAP to listen to external progress events, and list the enumeration in SBDebugger --- lldb/include/lldb/API/SBDebugger.h | 4 ++-- lldb/tools/lldb-dap/lldb-dap.cpp | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lldb/include/lldb/API/SBDebugger.h b/lldb/include/lldb/API/SBDebugger.h index eb371e33c4951c..7f56bf34c37388 100644 --- a/lldb/include/lldb/API/SBDebugger.h +++ b/lldb/include/lldb/API/SBDebugger.h @@ -46,8 +46,8 @@ class LLDB_API SBDebugger { eBroadcastBitProgress = lldb::DebuggerBroadcastBit::eBroadcastBitProgress, eBroadcastBitWarning = lldb::DebuggerBroadcastBit::eBroadcastBitWarning, eBroadcastBitError = lldb::DebuggerBroadcastBit::eBroadcastBitError, - eBroadcastBitProgressCategory = - lldb::DebuggerBroadcastBit::eBroadcastBitProgressCategory, + eBroadcastBitExternalProgress = + lldb::DebuggerBroadcastBit::eBroadcastBitExternalProgress, }; SBDebugger(); diff --git a/lldb/tools/lldb-dap/lldb-dap.cpp b/lldb/tools/lldb-dap/lldb-dap.cpp index 7e8f7b5f6df679..6b12569d90a831 100644 --- a/lldb/tools/lldb-dap/lldb-dap.cpp +++ b/lldb/tools/lldb-dap/lldb-dap.cpp @@ -414,7 +414,8 @@ void SendStdOutStdErr(DAP &dap, lldb::SBProcess &process) { void ProgressEventThreadFunction(DAP &dap) { lldb::SBListener listener("lldb-dap.progress.listener"); dap.debugger.GetBroadcaster().AddListener( - listener, lldb::SBDebugger::eBroadcastBitProgress); + listener, lldb::SBDebugger::eBroadcastBitProgress | + lldb::SBDebugger::eBroadcastBitExternalProgress); dap.broadcaster.AddListener(listener, eBroadcastBitStopProgressThread); lldb::SBEvent event; bool done = false; _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits