summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/minidump
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2019-04-02 22:03:22 +0000
committerAdrian Prantl <aprantl@apple.com>2019-04-02 22:03:22 +0000
commit1b5310c2df3f39ca96dc3f1d9239d151a7204cd0 (patch)
tree5e70e941e599d2306804218c7ce1592c748ede43 /lldb/source/Plugins/Process/minidump
parent00f6cfe90842e6a1a232657360c4590b1d57ab53 (diff)
downloadbcm5719-llvm-1b5310c2df3f39ca96dc3f1d9239d151a7204cd0.tar.gz
bcm5719-llvm-1b5310c2df3f39ca96dc3f1d9239d151a7204cd0.zip
Revert r357504, r357491, r357482 because of bot breakage.
See discussion in https://reviews.llvm.org/D60001. Revert Clean up windows build bot. This reverts r357504 (git commit 380c2420ecb0c3e809b04f385d37b89800df1ecf) Revert Fix buildbot where paths were not matching up. This reverts r357491 (git commit 5050586860140b55a0cc68c77dd1438f44a23ca5) Revert Allow partial UUID matching in Minidump core file plug-in This reverts r357482 (git commit 838bba9c34bf1e5500c2e100327bc764afc8d367) llvm-svn: 357534
Diffstat (limited to 'lldb/source/Plugins/Process/minidump')
-rw-r--r--lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp42
1 files changed, 7 insertions, 35 deletions
diff --git a/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp b/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp
index 4d16f82c493..a7f35b46946 100644
--- a/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp
+++ b/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp
@@ -351,8 +351,6 @@ void ProcessMinidump::ReadModuleList() {
std::vector<const MinidumpModule *> filtered_modules =
m_minidump_parser->GetFilteredModuleList();
- Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_MODULES));
-
for (auto module : filtered_modules) {
llvm::Optional<std::string> name =
m_minidump_parser->GetMinidumpString(module->module_name_rva);
@@ -360,6 +358,7 @@ void ProcessMinidump::ReadModuleList() {
if (!name)
continue;
+ Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_MODULES));
if (log) {
log->Printf("ProcessMinidump::%s found module: name: %s %#010" PRIx64
"-%#010" PRIx64 " size: %" PRIu32,
@@ -375,46 +374,14 @@ void ProcessMinidump::ReadModuleList() {
m_is_wow64 = true;
}
- if (log) {
- log->Printf("ProcessMinidump::%s load module: name: %s", __FUNCTION__,
- name.getValue().c_str());
- }
-
const auto uuid = m_minidump_parser->GetModuleUUID(module);
auto file_spec = FileSpec(name.getValue(), GetArchitecture().GetTriple());
FileSystem::Instance().Resolve(file_spec);
ModuleSpec module_spec(file_spec, uuid);
module_spec.GetArchitecture() = GetArchitecture();
Status error;
- // Try and find a module with a full UUID that matches. This function will
- // add the module to the target if it finds one.
lldb::ModuleSP module_sp = GetTarget().GetSharedModule(module_spec, &error);
- if (!module_sp) {
- // Try and find a module without specifying the UUID and only looking for
- // the file given a basename. We then will look for a partial UUID match
- // if we find any matches. This function will add the module to the
- // target if it finds one, so we need to remove the module from the target
- // if the UUID doesn't match during our manual UUID verification. This
- // allows the "target.exec-search-paths" setting to specify one or more
- // directories that contain executables that can be searched for matches.
- ModuleSpec basename_module_spec(module_spec);
- basename_module_spec.GetUUID().Clear();
- basename_module_spec.GetFileSpec().GetDirectory().Clear();
- module_sp = GetTarget().GetSharedModule(basename_module_spec, &error);
- if (module_sp) {
- // We consider the module to be a match if the minidump UUID is a
- // prefix of the actual UUID, or if either of the UUIDs are empty.
- const auto dmp_bytes = uuid.GetBytes();
- const auto mod_bytes = module_sp->GetUUID().GetBytes();
- const bool match = dmp_bytes.empty() || mod_bytes.empty() ||
- mod_bytes.take_front(dmp_bytes.size()) == dmp_bytes;
- if (!match) {
- GetTarget().GetImages().Remove(module_sp);
- module_sp.reset();
- }
- }
- }
- if (!module_sp) {
+ if (!module_sp || error.Fail()) {
// We failed to locate a matching local object file. Fortunately, the
// minidump format encodes enough information about each module's memory
// range to allow us to create placeholder modules.
@@ -433,6 +400,11 @@ void ProcessMinidump::ReadModuleList() {
GetTarget().GetImages().Append(module_sp);
}
+ if (log) {
+ log->Printf("ProcessMinidump::%s load module: name: %s", __FUNCTION__,
+ name.getValue().c_str());
+ }
+
bool load_addr_changed = false;
module_sp->SetLoadAddress(GetTarget(), module->base_of_image, false,
load_addr_changed);
OpenPOWER on IntegriCloud