[lldb-dev] Loading universal mach-o executables

Carlo Kok ck at remobjects.com
Wed Nov 7 06:17:32 PST 2012


Op 6-11-2012 18:53, Greg Clayton schreef:
>
> On Nov 6, 2012, at 5:27 AM, Carlo Kok <ck at remobjects.com> wrote:
>
>> When using a universal mach-o executable it fails in lld on loading the ObjectFile (and resets the module to null, thus failing to load with a nice memory access error). I did see that there's an ObjectContainer for universal mach-o executables but that's not triggered during ModuleList.GetSharedModule (Which is used by ResolveExecutable). What can I do to get this working? I load the file first then connect to a remote server for debugging purposes.
>

> It does work on the Mac. Make sure your platform is set and also do
> specify an architecture so the ObjectContainer can extract the right
> arch. Make sure the universal object container is loaded and in the
> plug-in list. To verify, step through the code in
> ObjectFile::FindPlugin().
>

Problem is that at the time I load it, I don't know the architecture 
yet. The remote server knows, but I need an SBTarget to connect to the 
remote server, and creating a target (SBDebugger::CreateTarget) requires 
the filename and architecture (at which point it fails to load).



More information about the lldb-dev mailing list