[lldb-dev] Detect executable archs before CreateTarget
meeloo at gmail.com
Sat Jun 29 07:00:01 PDT 2013
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.
More information about the lldb-dev