Skip to content

Commit

Permalink
Reland "[lldb][sbdebugger] Move SBDebugger Broadcast bit enum into ll… (
Browse files Browse the repository at this point in the history
llvm#88331)

…db-enumerations.h" (llvm#88324)"

This reverts commit 9f6d08f. This broke
the build because of a usage of one of the original SBDebugger broadcast
bits that wasn't updated in the original commit.
  • Loading branch information
chelcassanova authored Apr 11, 2024
1 parent db9a17a commit 8c3cb6b
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 13 deletions.
7 changes: 0 additions & 7 deletions lldb/include/lldb/API/SBDebugger.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@ class LLDB_API SBInputReader {

class LLDB_API SBDebugger {
public:
FLAGS_ANONYMOUS_ENUM(){
eBroadcastBitProgress = (1 << 0),
eBroadcastBitWarning = (1 << 1),
eBroadcastBitError = (1 << 2),
eBroadcastBitProgressCategory = (1 << 3),
};

SBDebugger();

SBDebugger(const lldb::SBDebugger &rhs);
Expand Down
8 changes: 8 additions & 0 deletions lldb/include/lldb/lldb-enumerations.h
Original file line number Diff line number Diff line change
Expand Up @@ -1339,6 +1339,14 @@ enum AddressMaskRange {
eAddressMaskRangeAll = eAddressMaskRangeAny,
};

/// Used by the debugger to indicate which events are being broadcasted.
enum DebuggerBroadcastBit {
eBroadcastBitProgress = (1 << 0),
eBroadcastBitWarning = (1 << 1),
eBroadcastBitError = (1 << 2),
eBroadcastBitProgressCategory = (1 << 3),
};

} // namespace lldb

#endif // LLDB_LLDB_ENUMERATIONS_H
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def setUp(self):
self.broadcaster = self.dbg.GetBroadcaster()
self.listener = lldbutil.start_listening_from(
self.broadcaster,
lldb.SBDebugger.eBroadcastBitWarning | lldb.SBDebugger.eBroadcastBitError,
lldb.eBroadcastBitWarning | lldb.eBroadcastBitError,
)

def test_dwarf_symbol_loading_diagnostic_report(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def setUp(self):
TestBase.setUp(self)
self.broadcaster = self.dbg.GetBroadcaster()
self.listener = lldbutil.start_listening_from(
self.broadcaster, lldb.SBDebugger.eBroadcastBitProgress
self.broadcaster, lldb.eBroadcastBitProgress
)

def test_dwarf_symbol_loading_progress_report(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_clang_module_build_progress_report(self):
# other unrelated progress events.
broadcaster = self.dbg.GetBroadcaster()
listener = lldbutil.start_listening_from(
broadcaster, lldb.SBDebugger.eBroadcastBitProgress
broadcaster, lldb.eBroadcastBitProgress
)

# Trigger module builds.
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/API/macosx/rosetta/TestRosetta.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def test_rosetta(self):
if rosetta_debugserver_installed():
broadcaster = self.dbg.GetBroadcaster()
listener = lldbutil.start_listening_from(
broadcaster, lldb.SBDebugger.eBroadcastBitWarning
broadcaster, lldb.eBroadcastBitWarning
)

target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
Expand Down
4 changes: 2 additions & 2 deletions lldb/tools/lldb-dap/lldb-dap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,8 @@ void SendStdOutStdErr(lldb::SBProcess &process) {

void ProgressEventThreadFunction() {
lldb::SBListener listener("lldb-dap.progress.listener");
g_dap.debugger.GetBroadcaster().AddListener(
listener, lldb::SBDebugger::eBroadcastBitProgress);
g_dap.debugger.GetBroadcaster().AddListener(listener,
lldb::eBroadcastBitProgress);
g_dap.broadcaster.AddListener(listener, eBroadcastBitStopProgressThread);
lldb::SBEvent event;
bool done = false;
Expand Down

0 comments on commit 8c3cb6b

Please sign in to comment.