[Lldb-commits] [PATCH] D120919: Reverse the order of modules-loaded/unloaded & breakpoint-changed events

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 3 10:12:54 PST 2022


jingham created this revision.
jingham added reviewers: clayborg, JDevlieghere, labath.
Herald added a project: All.
jingham requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Currently, when a new module is loaded/unloaded and it causes new breakpoint locations to be created or resolved, you get two events, an modules-loaded event and a breakpoint-changed event.  But they come out in the order:

breakpoint-changed
modules-loaded

which doesn't make much sense.  This patch reverses the order.

This should be uncontroversial, but I put the patch up to check that vscode or other clients haven't coded around this odd behavior.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D120919

Files:
  lldb/source/Target/Target.cpp


Index: lldb/source/Target/Target.cpp
===================================================================
--- lldb/source/Target/Target.cpp
+++ lldb/source/Target/Target.cpp
@@ -1642,11 +1642,11 @@
 void Target::ModulesDidUnload(ModuleList &module_list, bool delete_locations) {
   if (m_valid && module_list.GetSize()) {
     UnloadModuleSections(module_list);
+    BroadcastEvent(eBroadcastBitModulesUnloaded,
+                   new TargetEventData(this->shared_from_this(), module_list));
     m_breakpoint_list.UpdateBreakpoints(module_list, false, delete_locations);
     m_internal_breakpoint_list.UpdateBreakpoints(module_list, false,
                                                  delete_locations);
-    BroadcastEvent(eBroadcastBitModulesUnloaded,
-                   new TargetEventData(this->shared_from_this(), module_list));
   }
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120919.412757.patch
Type: text/x-patch
Size: 852 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220303/c99595ef/attachment.bin>


More information about the lldb-commits mailing list