[lldb-dev] Load fat executable when uncertain about the target process' architecture
Carlo Kok
ck at remobjects.com
Thu Oct 10 09:40:48 PDT 2013
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
More information about the lldb-dev
mailing list