[Lldb-commits] [lldb] [lldb][Commands] Show symbol change bit in SB API (PR #66144)
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Wed Sep 13 19:45:55 PDT 2023
================
@@ -57,6 +57,29 @@ 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_load(self):
+ """Test that when adding a symbol file, the eBroadcastBitSymbolsLoaded event gets broadcasted."""
+ self.generate_main_cpp(version=1)
+ self.build(debug_info="dsym")
+
+ listener = lldb.SBListener("listener")
+ listener.StartListeningForEventClass(
+ self.dbg,
+ lldb.SBTarget.GetBroadcasterClassName(),
+ lldb.SBTarget.eBroadcastBitSymbolsLoaded,
+ )
+
+ # Add the dSYM
+ self.do_add_dsym_with_success(self.exe_name)
+
+ # Get the next event
+ event = lldb.SBEvent()
+ listener.WaitForEvent(1, event)
+
+ # Check that the event is valid
+ self.assertTrue(event.IsValid(), "Got a valid eBroadcastBitSymbolsLoaded event.")
----------------
clayborg wrote:
Can we test that we can extract the SBModuleSpec for the module that changed from this event?
https://github.com/llvm/llvm-project/pull/66144
More information about the lldb-commits
mailing list