[Lldb-commits] [PATCH] D36046: Improve the posix core file triple detection
Tamas Berghammer via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Aug 16 05:02:24 PDT 2017
tberghammer updated this revision to Diff 111326.
tberghammer added a comment.
Add comment about the MIPS special case.
https://reviews.llvm.org/D36046
Files:
source/Core/ArchSpec.cpp
source/Plugins/Process/elf-core/ProcessElfCore.cpp
Index: source/Plugins/Process/elf-core/ProcessElfCore.cpp
===================================================================
--- source/Plugins/Process/elf-core/ProcessElfCore.cpp
+++ source/Plugins/Process/elf-core/ProcessElfCore.cpp
@@ -724,15 +724,18 @@
}
ArchSpec ProcessElfCore::GetArchitecture() {
- ObjectFileELF *core_file =
- (ObjectFileELF *)(m_core_module_sp->GetObjectFile());
ArchSpec arch;
- core_file->GetArchitecture(arch);
+ m_core_module_sp->GetObjectFile()->GetArchitecture(arch);
ArchSpec target_arch = GetTarget().GetArchitecture();
-
- if (target_arch.IsMIPS())
+ arch.MergeFrom(target_arch);
+
+ // On MIPS there is no way to differentiate betwenn 32bit and 64bit core files
+ // and this information can't be merged in from the target arch so we fail
+ // back to unconditionally returning the target arch in this config.
+ if (target_arch.IsMIPS()) {
return target_arch;
+ }
return arch;
}
Index: source/Core/ArchSpec.cpp
===================================================================
--- source/Core/ArchSpec.cpp
+++ source/Core/ArchSpec.cpp
@@ -1002,6 +1002,9 @@
m_core = other.GetCore();
CoreUpdated(true);
}
+ if (GetFlags() == 0) {
+ SetFlags(other.GetFlags());
+ }
}
bool ArchSpec::SetArchitecture(ArchitectureType arch_type, uint32_t cpu,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36046.111326.patch
Type: text/x-patch
Size: 1339 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170816/a00eb55d/attachment-0001.bin>
More information about the lldb-commits
mailing list