diff options
Diffstat (limited to 'lldb')
| -rw-r--r-- | lldb/include/lldb/Core/ModuleList.h | 8 | ||||
| -rw-r--r-- | lldb/include/lldb/Target/Target.h | 9 | ||||
| -rw-r--r-- | lldb/source/Core/ModuleList.cpp | 12 | ||||
| -rw-r--r-- | lldb/source/Target/Target.cpp | 20 |
4 files changed, 24 insertions, 25 deletions
diff --git a/lldb/include/lldb/Core/ModuleList.h b/lldb/include/lldb/Core/ModuleList.h index 7c9f4932539..8d13ed5aa29 100644 --- a/lldb/include/lldb/Core/ModuleList.h +++ b/lldb/include/lldb/Core/ModuleList.h @@ -32,14 +32,14 @@ public: { public: virtual void - ModuleAdded (const lldb::ModuleSP& module_sp) = 0; + ModuleAdded (const ModuleList& module_list, const lldb::ModuleSP& module_sp) = 0; virtual void - ModuleRemoved (const lldb::ModuleSP& module_sp) = 0; + ModuleRemoved (const ModuleList& module_list, const lldb::ModuleSP& module_sp) = 0; virtual void - ModuleUpdated (const lldb::ModuleSP& old_module_sp, + ModuleUpdated (const ModuleList& module_list, const lldb::ModuleSP& old_module_sp, const lldb::ModuleSP& new_module_sp) = 0; virtual void - WillClearList () = 0; + WillClearList (const ModuleList& module_list) = 0; virtual ~Notifier () diff --git a/lldb/include/lldb/Target/Target.h b/lldb/include/lldb/Target/Target.h index 851ca3b9ce3..e19b9105de8 100644 --- a/lldb/include/lldb/Target/Target.h +++ b/lldb/include/lldb/Target/Target.h @@ -621,16 +621,17 @@ protected: //------------------------------------------------------------------ virtual void - ModuleAdded (const lldb::ModuleSP& module_sp); + ModuleAdded (const ModuleList& module_list, const lldb::ModuleSP& module_sp); virtual void - ModuleRemoved (const lldb::ModuleSP& module_sp); + ModuleRemoved (const ModuleList& module_list, const lldb::ModuleSP& module_sp); virtual void - ModuleUpdated (const lldb::ModuleSP& old_module_sp, + ModuleUpdated (const ModuleList& module_list, + const lldb::ModuleSP& old_module_sp, const lldb::ModuleSP& new_module_sp); virtual void - WillClearList (); + WillClearList (const ModuleList& module_list); public: diff --git a/lldb/source/Core/ModuleList.cpp b/lldb/source/Core/ModuleList.cpp index c7f7484934e..f2f39204688 100644 --- a/lldb/source/Core/ModuleList.cpp +++ b/lldb/source/Core/ModuleList.cpp @@ -45,7 +45,6 @@ ModuleList::ModuleList(const ModuleList& rhs) : Mutex::Locker lhs_locker(m_modules_mutex); Mutex::Locker rhs_locker(rhs.m_modules_mutex); m_modules = rhs.m_modules; - m_notifier = rhs.m_notifier; } ModuleList::ModuleList (ModuleList::Notifier* notifier) : @@ -66,7 +65,6 @@ ModuleList::operator= (const ModuleList& rhs) Mutex::Locker lhs_locker(m_modules_mutex); Mutex::Locker rhs_locker(rhs.m_modules_mutex); m_modules = rhs.m_modules; - m_notifier = rhs.m_notifier; } return *this; } @@ -86,7 +84,7 @@ ModuleList::AppendImpl (const ModuleSP &module_sp, bool use_notifier) Mutex::Locker locker(m_modules_mutex); m_modules.push_back(module_sp); if (use_notifier && m_notifier) - m_notifier->ModuleAdded(module_sp); + m_notifier->ModuleAdded(*this, module_sp); } } @@ -170,7 +168,7 @@ ModuleList::RemoveImpl (const ModuleSP &module_sp, bool use_notifier) { m_modules.erase (pos); if (use_notifier && m_notifier) - m_notifier->ModuleRemoved(module_sp); + m_notifier->ModuleRemoved(*this, module_sp); return true; } } @@ -184,7 +182,7 @@ ModuleList::RemoveImpl (ModuleList::collection::iterator pos, bool use_notifier) ModuleSP module_sp(*pos); collection::iterator retval = m_modules.erase(pos); if (use_notifier && m_notifier) - m_notifier->ModuleRemoved(module_sp); + m_notifier->ModuleRemoved(*this, module_sp); return retval; } @@ -201,7 +199,7 @@ ModuleList::ReplaceModule (const lldb::ModuleSP &old_module_sp, const lldb::Modu return false; AppendImpl (new_module_sp, false); if (m_notifier) - m_notifier->ModuleUpdated(old_module_sp,new_module_sp); + m_notifier->ModuleUpdated(*this, old_module_sp,new_module_sp); return true; } @@ -293,7 +291,7 @@ ModuleList::ClearImpl (bool use_notifier) { Mutex::Locker locker(m_modules_mutex); if (use_notifier && m_notifier) - m_notifier->WillClearList(); + m_notifier->WillClearList(*this); m_modules.clear(); } diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp index b9616039125..ec88710a843 100644 --- a/lldb/source/Target/Target.cpp +++ b/lldb/source/Target/Target.cpp @@ -1059,31 +1059,31 @@ Target::SetArchitecture (const ArchSpec &arch_spec) } void -Target::WillClearList () +Target::WillClearList (const ModuleList& module_list) { } void -Target::ModuleAdded (const ModuleSP &module_sp) +Target::ModuleAdded (const ModuleList& module_list, const ModuleSP &module_sp) { // A module is being added to this target for the first time - ModuleList module_list; - module_list.Append(module_sp); + ModuleList my_module_list; + my_module_list.Append(module_sp); LoadScriptingResourceForModule(module_sp, this); - ModulesDidLoad (module_list); + ModulesDidLoad (my_module_list); } void -Target::ModuleRemoved (const ModuleSP &module_sp) +Target::ModuleRemoved (const ModuleList& module_list, const ModuleSP &module_sp) { // A module is being added to this target for the first time - ModuleList module_list; - module_list.Append(module_sp); - ModulesDidUnload (module_list); + ModuleList my_module_list; + my_module_list.Append(module_sp); + ModulesDidUnload (my_module_list); } void -Target::ModuleUpdated (const ModuleSP &old_module_sp, const ModuleSP &new_module_sp) +Target::ModuleUpdated (const ModuleList& module_list, const ModuleSP &old_module_sp, const ModuleSP &new_module_sp) { // A module is replacing an already added module m_breakpoint_list.UpdateBreakpointsWhenModuleIsReplaced(old_module_sp, new_module_sp); |

