[Lldb-commits] [PATCH] D31280: [LLDB][MIPS] Fix Core file Architecture and OS information

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 23 08:58:17 PDT 2017


labath added a comment.

Thank you for that.

I just have one more concern. I see two places where you are copying the archspec from core file to the target and then back again. I must be missing something, because that looks completely unnecessary at first sight. What is the reason behind that? Why can't we leave `ProcessElfCore::GetArchitecture` as is ?



================
Comment at: source/Plugins/Process/elf-core/ProcessElfCore.cpp:220
+  // information. Hence we need to relied on target architecture for that.
+  if (arch.IsValid() && !arch.IsMIPS())
+    GetTarget().SetArchitecture(arch);
----------------
Here you copy the architecture from core to target.


================
Comment at: source/Plugins/Process/elf-core/ProcessElfCore.cpp:668
+
+  ArchSpec target_arch = GetTarget().GetArchitecture();
+  
----------------
And here you fetch the target instead of the core architecture.


https://reviews.llvm.org/D31280





More information about the lldb-commits mailing list