[Lldb-commits] [lldb] Reland "[lldb][sbdebugger] Move SBDebugger Broadcast bit enum into ll… (PR #88331)

2024-04-11 Thread Chelsea Cassanova via lldb-commits

https://github.com/chelcassanova closed 
https://github.com/llvm/llvm-project/pull/88331
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] Reland "[lldb][sbdebugger] Move SBDebugger Broadcast bit enum into ll… (PR #88331)

2024-04-11 Thread Med Ismail Bennani via lldb-commits

https://github.com/medismailben approved this pull request.

LGTM!

https://github.com/llvm/llvm-project/pull/88331
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] Reland "[lldb][sbdebugger] Move SBDebugger Broadcast bit enum into ll… (PR #88331)

2024-04-10 Thread via lldb-commits

llvmbot wrote:




@llvm/pr-subscribers-lldb

Author: Chelsea Cassanova (chelcassanova)


Changes

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

This reverts commit 9f6d08f2566a26144ea1753f80aebb1f2ecfdc63. This broke the 
build because of a usage of one of the original SBDebugger broadcast bits that 
wasn't updated in the original commit.

---
Full diff: https://github.com/llvm/llvm-project/pull/88331.diff


7 Files Affected:

- (modified) lldb/include/lldb/API/SBDebugger.h (-7) 
- (modified) lldb/include/lldb/lldb-enumerations.h (+8) 
- (modified) 
lldb/test/API/functionalities/diagnostic_reporting/TestDiagnosticReporting.py 
(+1-1) 
- (modified) 
lldb/test/API/functionalities/progress_reporting/TestProgressReporting.py 
(+1-1) 
- (modified) 
lldb/test/API/functionalities/progress_reporting/clang_modules/TestClangModuleBuildProgress.py
 (+1-1) 
- (modified) lldb/test/API/macosx/rosetta/TestRosetta.py (+1-1) 
- (modified) lldb/tools/lldb-dap/lldb-dap.cpp (+2-2) 


``diff
diff --git a/lldb/include/lldb/API/SBDebugger.h 
b/lldb/include/lldb/API/SBDebugger.h
index 62b2f91f5076d5..cf5409a12a056a 100644
--- a/lldb/include/lldb/API/SBDebugger.h
+++ b/lldb/include/lldb/API/SBDebugger.h
@@ -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 );
diff --git a/lldb/include/lldb/lldb-enumerations.h 
b/lldb/include/lldb/lldb-enumerations.h
index 646f7bfda98475..f3b07ea6d20395 100644
--- a/lldb/include/lldb/lldb-enumerations.h
+++ b/lldb/include/lldb/lldb-enumerations.h
@@ -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
diff --git 
a/lldb/test/API/functionalities/diagnostic_reporting/TestDiagnosticReporting.py 
b/lldb/test/API/functionalities/diagnostic_reporting/TestDiagnosticReporting.py
index 36a3be695628f5..6353e3e8cbedbd 100644
--- 
a/lldb/test/API/functionalities/diagnostic_reporting/TestDiagnosticReporting.py
+++ 
b/lldb/test/API/functionalities/diagnostic_reporting/TestDiagnosticReporting.py
@@ -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):
diff --git 
a/lldb/test/API/functionalities/progress_reporting/TestProgressReporting.py 
b/lldb/test/API/functionalities/progress_reporting/TestProgressReporting.py
index 9af53845ca1b77..98988d7624da3c 100644
--- a/lldb/test/API/functionalities/progress_reporting/TestProgressReporting.py
+++ b/lldb/test/API/functionalities/progress_reporting/TestProgressReporting.py
@@ -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):
diff --git 
a/lldb/test/API/functionalities/progress_reporting/clang_modules/TestClangModuleBuildProgress.py
 
b/lldb/test/API/functionalities/progress_reporting/clang_modules/TestClangModuleBuildProgress.py
index 228f676aedf6ac..33c7c269c081e4 100644
--- 
a/lldb/test/API/functionalities/progress_reporting/clang_modules/TestClangModuleBuildProgress.py
+++ 
b/lldb/test/API/functionalities/progress_reporting/clang_modules/TestClangModuleBuildProgress.py
@@ -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.
diff --git a/lldb/test/API/macosx/rosetta/TestRosetta.py 
b/lldb/test/API/macosx/rosetta/TestRosetta.py
index ce40de475ef16c..669db95a1624c6 100644
--- a/lldb/test/API/macosx/rosetta/TestRosetta.py
+++ b/lldb/test/API/macosx/rosetta/TestRosetta.py
@@ -49,7 +49,7 @@ def test_rosetta(self):
 if rosetta_debugserver_installed():
 broadcaster = self.dbg.GetBroadcaster()
 listener = lldbutil.start_listening_from(

[Lldb-commits] [lldb] Reland "[lldb][sbdebugger] Move SBDebugger Broadcast bit enum into ll… (PR #88331)

2024-04-10 Thread Chelsea Cassanova via lldb-commits

https://github.com/chelcassanova created 
https://github.com/llvm/llvm-project/pull/88331

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

This reverts commit 9f6d08f2566a26144ea1753f80aebb1f2ecfdc63. This broke the 
build because of a usage of one of the original SBDebugger broadcast bits that 
wasn't updated in the original commit.

>From 535923f710c61ab1273ac527099691e32e08a2df Mon Sep 17 00:00:00 2001
From: Chelsea Cassanova 
Date: Wed, 10 Apr 2024 16:22:44 -0700
Subject: [PATCH] Reland "[lldb][sbdebugger] Move SBDebugger Broadcast bit enum
 into lldb-enumerations.h" (#88324)"

This reverts commit 9f6d08f2566a26144ea1753f80aebb1f2ecfdc63. This broke
the build because of a usage of one of the original SBDebugger broadcast
bits that wasn't updated in the original commit.
---
 lldb/include/lldb/API/SBDebugger.h| 7 ---
 lldb/include/lldb/lldb-enumerations.h | 8 
 .../diagnostic_reporting/TestDiagnosticReporting.py   | 2 +-
 .../progress_reporting/TestProgressReporting.py   | 2 +-
 .../clang_modules/TestClangModuleBuildProgress.py | 2 +-
 lldb/test/API/macosx/rosetta/TestRosetta.py   | 2 +-
 lldb/tools/lldb-dap/lldb-dap.cpp  | 4 ++--
 7 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/lldb/include/lldb/API/SBDebugger.h 
b/lldb/include/lldb/API/SBDebugger.h
index 62b2f91f5076d5..cf5409a12a056a 100644
--- a/lldb/include/lldb/API/SBDebugger.h
+++ b/lldb/include/lldb/API/SBDebugger.h
@@ -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 );
diff --git a/lldb/include/lldb/lldb-enumerations.h 
b/lldb/include/lldb/lldb-enumerations.h
index 646f7bfda98475..f3b07ea6d20395 100644
--- a/lldb/include/lldb/lldb-enumerations.h
+++ b/lldb/include/lldb/lldb-enumerations.h
@@ -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
diff --git 
a/lldb/test/API/functionalities/diagnostic_reporting/TestDiagnosticReporting.py 
b/lldb/test/API/functionalities/diagnostic_reporting/TestDiagnosticReporting.py
index 36a3be695628f5..6353e3e8cbedbd 100644
--- 
a/lldb/test/API/functionalities/diagnostic_reporting/TestDiagnosticReporting.py
+++ 
b/lldb/test/API/functionalities/diagnostic_reporting/TestDiagnosticReporting.py
@@ -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):
diff --git 
a/lldb/test/API/functionalities/progress_reporting/TestProgressReporting.py 
b/lldb/test/API/functionalities/progress_reporting/TestProgressReporting.py
index 9af53845ca1b77..98988d7624da3c 100644
--- a/lldb/test/API/functionalities/progress_reporting/TestProgressReporting.py
+++ b/lldb/test/API/functionalities/progress_reporting/TestProgressReporting.py
@@ -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):
diff --git 
a/lldb/test/API/functionalities/progress_reporting/clang_modules/TestClangModuleBuildProgress.py
 
b/lldb/test/API/functionalities/progress_reporting/clang_modules/TestClangModuleBuildProgress.py
index 228f676aedf6ac..33c7c269c081e4 100644
--- 
a/lldb/test/API/functionalities/progress_reporting/clang_modules/TestClangModuleBuildProgress.py
+++ 
b/lldb/test/API/functionalities/progress_reporting/clang_modules/TestClangModuleBuildProgress.py
@@ -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.
diff --git a/lldb/test/API/macosx/rosetta/TestRosetta.py 
b/lldb/test/API/macosx/rosetta/TestRosetta.py
index