[Lldb-commits] [PATCH] D20368: Remove Platform usages from NativeProcessLinux

Nitesh Jain via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 13 02:15:10 PDT 2016


nitesh.jain added inline comments.

================
Comment at: source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp:438
@@ +437,3 @@
+    // The auxiliary vector consists of a sequence of key-value pairs, where key and value are of
+    // the pointer size for the architecture that the process is running on. We can use this to
+    // detect the process architecture. We will try reading the vector as if it were a 64-bit
----------------
labath wrote:
> nitesh.jain wrote:
> > There are three flavours of ABI,
> > 
> > |  ABI | pointer-size  | Arch | Processs Type 
> > |     O32 |    4             |   Mips32  |       32 bit 
> > | N32        |4               | Mips64   |      32 bit 
> > | N64        |8               | Mips64   |     64 bit 
> > 
> > So not sure whether it will work for "N32", I will check and let you know asap.
> Uh-oh. :)
> 
> So, I don't think the ABI should matter much to the native register context. What matters here is the registers and their sizes. I'm guessing the N32 thing is something like the x32 intel abi, wher all registers are 64-bit, but sizeof(void*) is 32-bit. In that case this function will not work correctly, as it will detect it as 32-bit (but the NT_PRSTATUS-based one would, I guess).
> 
> Does N32 work on pre-3.13 kernels? (Grepping the source seems to find mentions of it, but i don't know how well it actually worked).
> 
> I guess is back to drawing board with this one again. Could you please send me the contents of the N32 auxiliary vector (LD_SHOW_AUXV as well as the actual binary contents). I presume the one you sent me earlier was O32.
> 
> cheers,
> pl
In N32 ABI, all GPR register are 64 bit and sizeof(void *) is 32 bit. 

Yes, N32 ABI works on pre-3.13 kernels. I have send earlier aux for O32 ABI .

Thanks,
Nj


http://reviews.llvm.org/D20368





More information about the lldb-commits mailing list