[lldb-dev] Get address for PIE-like "process"

Greg Clayton via lldb-dev lldb-dev at lists.llvm.org
Tue Apr 5 13:33:51 PDT 2016

> On Apr 5, 2016, at 10:46 AM, Ted Woodward via lldb-dev <lldb-dev at lists.llvm.org> wrote:
> We’ve got an OS that implements something they call a “user PD”, which is a lot like a PIE process. To debug it, we need to get the address of the image and then slide the target’s symbols. What’s the best way to get the address from the remote stub? Linux lldb reads an AuxVector from lldb-server, but all we need is an address.

This is the best way.

> I was thinking of using qShlibInfoAddr, but that’s used to get the address of the link map.

"qShlibInfoAddr" is for saying "what is the address that can point my DynamicLoader plugin to a place where it will be able to find all of the addresses of things that are loaded". This isn't a call that tells you anything about a single shared library.

> Is it ok to use that in the Hexagon DYLD plugin, or is there a better way to get the data from the stub?

If your remote GDB server can just give your DynamicLoaderHexagon one address and the DynamicLoaderHexagon plug-in can then derive all addresses for all loaded shared libraries, then you can use qShlibInfoAddr.

Else, I would suggest you implement the aux vector packets if possible.

> --
> Qualcomm Innovation Center, Inc.
> The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

More information about the lldb-dev mailing list