summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Target.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2013-04-05 18:49:06 +0000
committerEnrico Granata <egranata@apple.com>2013-04-05 18:49:06 +0000
commitf15ee4e89fbb475c0979aa09775f8495dad3a19c (patch)
tree6f01793d13107986269b9b72d3ffbd1a5fbc70b1 /lldb/source/Target/Target.cpp
parent4386fa99486429ebb50067f320117aa16ce934b3 (diff)
downloadbcm5719-llvm-f15ee4e89fbb475c0979aa09775f8495dad3a19c.tar.gz
bcm5719-llvm-f15ee4e89fbb475c0979aa09775f8495dad3a19c.zip
<rdar://problem/13563628>
Introducing a negative cache for ObjCLanguageRuntime::LookupInCompleteClassCache() This helps speed up the (common) case of us looking for classes that are hidden deep within Cocoa internals and repeatedly failing at finding type information for them. In order for this to work, we need to clean this cache whenever debug information is added. A new symbols loaded event is added that is triggered with add-dsym (before modules loaded would be triggered for both adding modules and adding symbols). Interested parties can register for this event. Internally, we make sure to clean the negative cache whenever symbols are added. Lastly, ClassDescriptor::IsTagged() has been refactored to GetTaggedPointerInfo() that also (optionally) returns info and value bits. In this way, data formatters can share tagged pointer code instead of duplicating the required arithmetic. llvm-svn: 178897
Diffstat (limited to 'lldb/source/Target/Target.cpp')
-rw-r--r--lldb/source/Target/Target.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index ba61678375b..ea97fd7d641 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -90,6 +90,7 @@ Target::Target(Debugger &debugger, const ArchSpec &target_arch, const lldb::Plat
SetEventName (eBroadcastBitModulesLoaded, "modules-loaded");
SetEventName (eBroadcastBitModulesUnloaded, "modules-unloaded");
SetEventName (eBroadcastBitWatchpointChanged, "watchpoint-changed");
+ SetEventName (eBroadcastBitSymbolsLoaded, "symbols-loaded");
CheckInWithManager();
@@ -1126,6 +1127,23 @@ Target::ModulesDidLoad (ModuleList &module_list)
}
void
+Target::SymbolsDidLoad (ModuleList &module_list)
+{
+ if (module_list.GetSize() == 0)
+ return;
+ if (m_process_sp)
+ {
+ LanguageRuntime* runtime = m_process_sp->GetLanguageRuntime(lldb::eLanguageTypeObjC);
+ if (runtime)
+ {
+ ObjCLanguageRuntime *objc_runtime = (ObjCLanguageRuntime*)runtime;
+ objc_runtime->SymbolsDidLoad(module_list);
+ }
+ }
+ BroadcastEvent(eBroadcastBitSymbolsLoaded, NULL);
+}
+
+void
Target::ModulesDidUnload (ModuleList &module_list)
{
if (module_list.GetSize())
OpenPOWER on IntegriCloud