Skip to content

Commit 0e5035c

Browse files
authored
Merge pull request #8569 from chelcassanova/cherrypick/reland-move-sbdebugger-bits
Reland "[lldb][sbdebugger] Move SBDebugger Broadcast bit enum into ll…
2 parents b0403cd + aa8bbc4 commit 0e5035c

File tree

10 files changed

+27
-26
lines changed

10 files changed

+27
-26
lines changed

lldb/bindings/python/static-binding/LLDBWrapPython.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98821,6 +98821,10 @@ SWIG_init(void) {
9882198821
SWIG_Python_SetConstant(d, "eAddressMaskRangeAll",SWIG_From_int(static_cast< int >(lldb::eAddressMaskRangeAll)));
9882298822
SWIG_Python_SetConstant(d, "ChildCacheState_eRefetch",SWIG_From_int(static_cast< int >(lldb::ChildCacheState::eRefetch)));
9882398823
SWIG_Python_SetConstant(d, "ChildCacheState_eReuse",SWIG_From_int(static_cast< int >(lldb::ChildCacheState::eReuse)));
98824+
SWIG_Python_SetConstant(d, "eBroadcastBitProgress",SWIG_From_int(static_cast< int >(lldb::eBroadcastBitProgress)));
98825+
SWIG_Python_SetConstant(d, "eBroadcastBitWarning",SWIG_From_int(static_cast< int >(lldb::eBroadcastBitWarning)));
98826+
SWIG_Python_SetConstant(d, "eBroadcastBitError",SWIG_From_int(static_cast< int >(lldb::eBroadcastBitError)));
98827+
SWIG_Python_SetConstant(d, "eBroadcastBitProgressCategory",SWIG_From_int(static_cast< int >(lldb::eBroadcastBitProgressCategory)));
9882498828
SWIG_Python_SetConstant(d, "SBCommandInterpreter_eBroadcastBitThreadShouldExit",SWIG_From_int(static_cast< int >(lldb::SBCommandInterpreter::eBroadcastBitThreadShouldExit)));
9882598829
SWIG_Python_SetConstant(d, "SBCommandInterpreter_eBroadcastBitResetPrompt",SWIG_From_int(static_cast< int >(lldb::SBCommandInterpreter::eBroadcastBitResetPrompt)));
9882698830
SWIG_Python_SetConstant(d, "SBCommandInterpreter_eBroadcastBitQuitCommandReceived",SWIG_From_int(static_cast< int >(lldb::SBCommandInterpreter::eBroadcastBitQuitCommandReceived)));
@@ -98832,10 +98836,6 @@ SWIG_init(void) {
9883298836
SWIG_Python_SetConstant(d, "SBCommunication_eBroadcastBitReadThreadShouldExit",SWIG_From_int(static_cast< int >(lldb::SBCommunication::eBroadcastBitReadThreadShouldExit)));
9883398837
SWIG_Python_SetConstant(d, "SBCommunication_eBroadcastBitPacketAvailable",SWIG_From_int(static_cast< int >(lldb::SBCommunication::eBroadcastBitPacketAvailable)));
9883498838
SWIG_Python_SetConstant(d, "SBCommunication_eAllEventBits",SWIG_From_int(static_cast< int >(lldb::SBCommunication::eAllEventBits)));
98835-
SWIG_Python_SetConstant(d, "SBDebugger_eBroadcastBitProgress",SWIG_From_int(static_cast< int >(lldb::SBDebugger::eBroadcastBitProgress)));
98836-
SWIG_Python_SetConstant(d, "SBDebugger_eBroadcastBitWarning",SWIG_From_int(static_cast< int >(lldb::SBDebugger::eBroadcastBitWarning)));
98837-
SWIG_Python_SetConstant(d, "SBDebugger_eBroadcastBitError",SWIG_From_int(static_cast< int >(lldb::SBDebugger::eBroadcastBitError)));
98838-
SWIG_Python_SetConstant(d, "SBDebugger_eBroadcastBitProgressCategory",SWIG_From_int(static_cast< int >(lldb::SBDebugger::eBroadcastBitProgressCategory)));
9883998839
SWIG_Python_SetConstant(d, "SBProcess_eBroadcastBitStateChanged",SWIG_From_int(static_cast< int >(lldb::SBProcess::eBroadcastBitStateChanged)));
9884098840
SWIG_Python_SetConstant(d, "SBProcess_eBroadcastBitInterrupt",SWIG_From_int(static_cast< int >(lldb::SBProcess::eBroadcastBitInterrupt)));
9884198841
SWIG_Python_SetConstant(d, "SBProcess_eBroadcastBitSTDOUT",SWIG_From_int(static_cast< int >(lldb::SBProcess::eBroadcastBitSTDOUT)));

lldb/bindings/python/static-binding/lldb.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1777,6 +1777,14 @@ def lldb_iter(obj, getsize, getelem):
17771777

17781778
ChildCacheState_eReuse = _lldb.ChildCacheState_eReuse
17791779

1780+
eBroadcastBitProgress = _lldb.eBroadcastBitProgress
1781+
1782+
eBroadcastBitWarning = _lldb.eBroadcastBitWarning
1783+
1784+
eBroadcastBitError = _lldb.eBroadcastBitError
1785+
1786+
eBroadcastBitProgressCategory = _lldb.eBroadcastBitProgressCategory
1787+
17801788
class SBAddress(object):
17811789
r"""
17821790
A section + offset based address class.
@@ -4369,14 +4377,6 @@ def disassemble_instructions (insts):
43694377
"""
43704378

43714379
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4372-
eBroadcastBitProgress = _lldb.SBDebugger_eBroadcastBitProgress
4373-
4374-
eBroadcastBitWarning = _lldb.SBDebugger_eBroadcastBitWarning
4375-
4376-
eBroadcastBitError = _lldb.SBDebugger_eBroadcastBitError
4377-
4378-
eBroadcastBitProgressCategory = _lldb.SBDebugger_eBroadcastBitProgressCategory
4379-
43804380

43814381
def __init__(self, *args):
43824382
r"""

lldb/include/lldb/API/SBDebugger.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,6 @@ class LLDB_API SBInputReader {
4242

4343
class LLDB_API SBDebugger {
4444
public:
45-
FLAGS_ANONYMOUS_ENUM(){
46-
eBroadcastBitProgress = (1 << 0),
47-
eBroadcastBitWarning = (1 << 1),
48-
eBroadcastBitError = (1 << 2),
49-
eBroadcastBitProgressCategory = (1 << 3),
50-
};
51-
5245
SBDebugger();
5346

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

lldb/include/lldb/lldb-enumerations.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,6 +1363,14 @@ enum class ChildCacheState {
13631363
///< re-use what we computed the last time we called Update.
13641364
};
13651365

1366+
/// Used by the debugger to indicate which events are being broadcasted.
1367+
enum DebuggerBroadcastBit {
1368+
eBroadcastBitProgress = (1 << 0),
1369+
eBroadcastBitWarning = (1 << 1),
1370+
eBroadcastBitError = (1 << 2),
1371+
eBroadcastBitProgressCategory = (1 << 3),
1372+
};
1373+
13661374
} // namespace lldb
13671375

13681376
#endif // LLDB_LLDB_ENUMERATIONS_H

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

Lines changed: 1 addition & 1 deletion
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.SBDebugger.eBroadcastBitWarning | lldb.SBDebugger.eBroadcastBitError,
18+
lldb.eBroadcastBitWarning | lldb.eBroadcastBitError,
1919
)
2020

2121
def test_dwarf_symbol_loading_diagnostic_report(self):

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

Lines changed: 1 addition & 1 deletion
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.SBDebugger.eBroadcastBitProgress
16+
self.broadcaster, lldb.eBroadcastBitProgress
1717
)
1818

1919
def test_dwarf_symbol_loading_progress_report(self):

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

Lines changed: 1 addition & 1 deletion
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.SBDebugger.eBroadcastBitProgress
37+
broadcaster, lldb.eBroadcastBitProgress
3838
)
3939

4040
# Trigger module builds.

lldb/test/API/functionalities/progress_reporting/swift_progress_reporting/TestSwiftProgressReporting.py

Lines changed: 1 addition & 1 deletion
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(self.broadcaster,
16-
lldb.SBDebugger.eBroadcastBitProgress)
16+
lldb.eBroadcastBitProgress)
1717

1818
@skipIf(setting=('plugin.typesystem.clang.experimental-redecl-completion', 'true'))
1919
# Don't run ClangImporter tests if Clangimporter is disabled.

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

Lines changed: 1 addition & 1 deletion
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.SBDebugger.eBroadcastBitWarning
52+
broadcaster, lldb.eBroadcastBitWarning
5353
)
5454

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

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,8 @@ void SendStdOutStdErr(lldb::SBProcess &process) {
406406

407407
void ProgressEventThreadFunction() {
408408
lldb::SBListener listener("lldb-dap.progress.listener");
409-
g_dap.debugger.GetBroadcaster().AddListener(
410-
listener, lldb::SBDebugger::eBroadcastBitProgress);
409+
g_dap.debugger.GetBroadcaster().AddListener(listener,
410+
lldb::eBroadcastBitProgress);
411411
g_dap.broadcaster.AddListener(listener, eBroadcastBitStopProgressThread);
412412
lldb::SBEvent event;
413413
bool done = false;

0 commit comments

Comments
 (0)