summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectMemory.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2016-02-10 21:28:13 +0000
committerGreg Clayton <gclayton@apple.com>2016-02-10 21:28:13 +0000
commitae088e52f315943762023fa90be439864ac54378 (patch)
tree766f450dc88e7f6700ba209584b96685e75eb961 /lldb/source/Commands/CommandObjectMemory.cpp
parenta2623c87392e3e741fa5aac1beb81fc58062b949 (diff)
downloadbcm5719-llvm-ae088e52f315943762023fa90be439864ac54378.tar.gz
bcm5719-llvm-ae088e52f315943762023fa90be439864ac54378.zip
Now that SymbolFileDWARF supports having types in completely separate .pcm file with "-fmodules -gmodules", each SymbolFileDWARF can reference module DWARF info by looking in other DWARF files. Then if you have 1000 .o files that each reference one or more .pcm files in their debug info, a simple Module::FindTypes(...) call can end up searching the same .pcm file over and over and over. Now all internal FindTypes methods in classes (ModuleList, Module, SymbolFile) now take an extra argument:
llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files Each time a SymbolFile::FindTypes() is called, it needs to check the searched_symbol_files list to make sure it hasn't already been asked to find the type and return immediately if it has been checked. This will stop circular dependencies from also crashing LLDB during type queries. This has proven to be an issue when debugging large applications on MacOSX that use DWARF in .o files. <rdar://problem/24581488> llvm-svn: 260434
Diffstat (limited to 'lldb/source/Commands/CommandObjectMemory.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectMemory.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp
index f8fe456d4d4..cfb28b2d6f2 100644
--- a/lldb/source/Commands/CommandObjectMemory.cpp
+++ b/lldb/source/Commands/CommandObjectMemory.cpp
@@ -35,6 +35,7 @@
#include "lldb/Interpreter/OptionValueString.h"
#include "lldb/Symbol/ClangASTContext.h"
#include "lldb/Symbol/TypeList.h"
+#include "lldb/Symbol/SymbolFile.h"
#include "lldb/Target/MemoryHistory.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/StackFrame.h"
@@ -514,6 +515,7 @@ protected:
}
}
+ llvm::DenseSet<lldb_private::SymbolFile *> searched_symbol_files;
ConstString lookup_type_name(type_str.c_str());
StackFrame *frame = m_exe_ctx.GetFramePtr();
if (frame)
@@ -524,7 +526,8 @@ protected:
sc.module_sp->FindTypes (sc,
lookup_type_name,
exact_match,
- 1,
+ 1,
+ searched_symbol_files,
type_list);
}
}
@@ -533,7 +536,8 @@ protected:
target->GetImages().FindTypes (sc,
lookup_type_name,
exact_match,
- 1,
+ 1,
+ searched_symbol_files,
type_list);
}
OpenPOWER on IntegriCloud