[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:06:16 PDT 2017

tberghammer added a comment.

Hi Greg, can you take a look sometime? Thanks, Tamas

Comment at: source/Plugins/Process/elf-core/ProcessElfCore.cpp:733-735
+  if (target_arch.IsMIPS()) {
     return target_arch;
+  }
nitesh.jain wrote:
> 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.
Thank you for the explanation. I added a comment to the code to explain it better there.


More information about the lldb-commits mailing list