Skip to content

Commit a4c21d1

Browse files
[lldb][sbapi] Fix API break in SBDebugger broadcast bits (#90261)
#87409 removed the broadcast bits from SBDebugger and placed them in `lldb-enumerations.h`. This is API-breaking so this commits places the enum back into `SBDebugger.h` and references the bits from `lldb-enumerations.h`. rdar://127128536
1 parent 022dc6b commit a4c21d1

File tree

6 files changed

+13
-6
lines changed

6 files changed

+13
-6
lines changed

lldb/include/lldb/API/SBDebugger.h

+7
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ class LLDB_API SBInputReader {
4242

4343
class LLDB_API SBDebugger {
4444
public:
45+
FLAGS_ANONYMOUS_ENUM(){
46+
eBroadcastBitProgress = lldb::DebuggerBroadcastBit::eBroadcastBitProgress,
47+
eBroadcastBitWarning = lldb::DebuggerBroadcastBit::eBroadcastBitWarning,
48+
eBroadcastBitError = lldb::DebuggerBroadcastBit::eBroadcastBitError,
49+
eBroadcastBitProgressCategory =
50+
lldb::DebuggerBroadcastBit::eBroadcastBitProgressCategory,
51+
};
4552
SBDebugger();
4653

4754
SBDebugger(const lldb::SBDebugger &rhs);

lldb/test/API/functionalities/diagnostic_reporting/TestDiagnosticReporting.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def setUp(self):
1515
self.broadcaster = self.dbg.GetBroadcaster()
1616
self.listener = lldbutil.start_listening_from(
1717
self.broadcaster,
18-
lldb.eBroadcastBitWarning | lldb.eBroadcastBitError,
18+
lldb.SBDebugger.eBroadcastBitWarning | lldb.SBDebugger.eBroadcastBitError,
1919
)
2020

2121
def test_dwarf_symbol_loading_diagnostic_report(self):

lldb/test/API/functionalities/progress_reporting/TestProgressReporting.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def setUp(self):
1313
TestBase.setUp(self)
1414
self.broadcaster = self.dbg.GetBroadcaster()
1515
self.listener = lldbutil.start_listening_from(
16-
self.broadcaster, lldb.eBroadcastBitProgress
16+
self.broadcaster, lldb.SBDebugger.eBroadcastBitProgress
1717
)
1818

1919
def test_dwarf_symbol_loading_progress_report(self):

lldb/test/API/functionalities/progress_reporting/clang_modules/TestClangModuleBuildProgress.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def test_clang_module_build_progress_report(self):
3434
# other unrelated progress events.
3535
broadcaster = self.dbg.GetBroadcaster()
3636
listener = lldbutil.start_listening_from(
37-
broadcaster, lldb.eBroadcastBitProgress
37+
broadcaster, lldb.SBDebugger.eBroadcastBitProgress
3838
)
3939

4040
# Trigger module builds.

lldb/test/API/macosx/rosetta/TestRosetta.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def test_rosetta(self):
4949
if rosetta_debugserver_installed():
5050
broadcaster = self.dbg.GetBroadcaster()
5151
listener = lldbutil.start_listening_from(
52-
broadcaster, lldb.eBroadcastBitWarning
52+
broadcaster, lldb.SBDebugger.eBroadcastBitWarning
5353
)
5454

5555
target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(

lldb/tools/lldb-dap/lldb-dap.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -421,8 +421,8 @@ void SendStdOutStdErr(lldb::SBProcess &process) {
421421

422422
void ProgressEventThreadFunction() {
423423
lldb::SBListener listener("lldb-dap.progress.listener");
424-
g_dap.debugger.GetBroadcaster().AddListener(listener,
425-
lldb::eBroadcastBitProgress);
424+
g_dap.debugger.GetBroadcaster().AddListener(
425+
listener, lldb::SBDebugger::eBroadcastBitProgress);
426426
g_dap.broadcaster.AddListener(listener, eBroadcastBitStopProgressThread);
427427
lldb::SBEvent event;
428428
bool done = false;

0 commit comments

Comments
 (0)