Actually this was pretty easy to do, so here is a patch with the new public API 
I propose:

Attachment: GetAvailableArchsFromFile.diff
Description: Binary data


I have tested it on my machine (MacOSX 10.8) with a couple of bundles and it 
works fine. Let me know what you think.

Cheers,

S.


On Jun 29, 2013, at 16:00 , Sebastien Metrot <[email protected]> wrote:

> Hello,
> 
> As I haven't found a way to scan available architectures from executables I'd 
> like to add that to the API. For now the only way to do somehow do that is to 
> loop over all known archs and try to create the SBTarget. Depending on its 
> success I mark the arch as valid or not. As you can guess this is very slow 
> and stupid as lldb already has all the code needed to get this information 
> without loading the full target. 
> 
> The public API for this could be added to SBDebugger:
> static lldb::SBStringList lldb::SBDebugger::GetAvailableArchsFromFile(const 
> char* filename);
> 
> I'm currently scouting the code to find the right elements in order to 
> propose an implementation, any pointers and help is welcome.
> 
> Cheers,
> 
> S.
> 
> 
> 
> _______________________________________________
> lldb-dev mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

_______________________________________________
lldb-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

Reply via email to