[Lldb-commits] [lldb] [lldb][Commands] Show symbol change bit in SB API (PR #66144)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 12 14:36:59 PDT 2023


================
@@ -57,6 +57,30 @@ def test_add_dsym_with_dSYM_bundle(self):
         self.exe_name = "a.out"
         self.do_add_dsym_with_dSYM_bundle(self.exe_name)
 
+    @no_debug_info_test
+    def test_report_symbol_change(self):
+        """Test that when adding a symbol file, the eBroadcastBitSymbolChange event gets broadcasted."""
+        self.generate_main_cpp(version=1)
+        self.build(debug_info="dsym")
+
+        self.exe_name = "a.out"
+
+        # Get the broadcaster and listen for the symbol change event
+        self.broadcaster = self.dbg.GetBroadcaster()
+        self.listener = lldbutil.start_listening_from(
+            self.broadcaster, lldb.SBDebugger.eBroadcastBitSymbolChange
+        )
+
+        # Add the dSYM
+        self.do_add_dsym_with_success(self.exe_name)
+
+        # Get the next event
+        event = lldbutil.fetch_next_event(self, self.listener, self.broadcaster)
+
+        # Check that the event is valid
+        self.assertTrue(event.IsValid(), "Got a valid event.")
----------------
JDevlieghere wrote:

"Got a valid eBroadcastBitSymbolChange event."

https://github.com/llvm/llvm-project/pull/66144


More information about the lldb-commits mailing list