[lldb-dev] Load fat executable when uncertain about the target process' architecture

Sebastien Metrot meeloo at gmail.com
Thu Oct 10 09:55:16 PDT 2013


Ah yes, sorry I missed that part. It's true that discovery and introspection is not always an easy task with the current API, particularly when working with remotes.

S.


On 10 Oct 2013, at 18:40 , Carlo Kok <ck at remobjects.com> wrote:

> Sebastien Metrot schreef op 10/10/2013 6:22 PM:
>> Hi Carlo,
>> 
>> Here is how I enumerate the available archs in my code:
>> 
>>  SBModuleSpecList specs = SBModuleSpecList::GetModuleSpecifications(Path);
>>  const size_t count = specs.GetSize();
>>  for (size_t i = 0; i < count; ++i)
>>  {
>>    SBModuleSpec module_spec = specs.GetSpecAtIndex(i);
>>    const char *triple = module_spec.GetTriple();
>>    std::vector<nglString> tokens;
>>    nglString triplestr = triple;
>>    triplestr.Tokenize(tokens, '-');
>>    NGL_OUT("%s -> '%s' '%s' '%s'\n", triple, tokens[0].GetChars(), tokens[1].GetChars(), tokens[2].GetChars());
>>    mArchitectures.push_back(tokens[0]);
>>    mVendors.push_back(tokens[1]);
>>    mTargetOSes.push_back(tokens[2]);
>>  }
>> 
>> nglString is a custom string type that I use but I'll get the idea of how it works I guess.
>> 
> 
> Hi Sebastien,
> 
> I do know what's in the file (I compile it myself), I don't know whats on the other side where I connect to.
> 
> -- 
> Carlo Kok
> RemObjects Software
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev





More information about the lldb-dev mailing list