[Lldb-commits] [PATCH] D36046: Improve the posix core file triple detection

Nitesh Jain via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 31 07:10:25 PDT 2017


nitesh.jain added inline comments.


================
Comment at: source/Plugins/Process/elf-core/ProcessElfCore.cpp:733-735
+  if (target_arch.IsMIPS()) {
     return target_arch;
+  }
----------------
tberghammer wrote:
> Hi Nitesh,
> 
> I tried to remove this MIPS specific code as it shouldn't be necessary if I add the above MergeFrom for all architecture but if I do it fails LinuxCore
> TestCase.test_mips_n32.
> 
> The issue is that in that case the tripe we get from the core file is "mipsel--" ("mipsel--linux" after the merge) and the one we get from the binary is "mips64el--linux". Is it normal to have a seemingly 32bit core file with a 64bit binary on mips? If not then can I ask you to help me figure out which one is incorrect?
> 
> If it is then I don't see any better short term solution then leaving this condition here but it feels like a quite big hack what might backfire when somebody tries to use a core file with a completely incompatible binary.
> 
> Thanks,
> Tamas
Hi Tamas,

In MIPS , the core file doesn't contain any Architecture information . It's just specify the generic MIPS architecture. Hence we need to relied on target_arch for correct architecture informations.

TestCase.test_mips_n32 is "32 bit binary" with triple "mips64el-linux". This binary can only run on 64 bit target as compared to O32 which can run on 32/64 bit target.


https://reviews.llvm.org/D36046





More information about the lldb-commits mailing list