[lldb-dev] [Bug 16526] New: New API to scan executable for architectures before creating a target

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jul 2 10:47:57 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=16526

            Bug ID: 16526
           Summary: New API to scan executable for architectures before
                    creating a target
           Product: lldb
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at cs.uiuc.edu
          Reporter: meeloo at meeloo.net
    Classification: Unclassified

Created attachment 10807
  --> http://llvm.org/bugs/attachment.cgi?id=10807&action=edit
Diff to add lldb::SBDebugger::GetAvailableArchsFromFile

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 we mark the arch as valid or not. As you can guess this is very slow
and can be made mauch better 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 have attached a patch implementing this feature.

Cheers,

S.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20130702/5afb38d2/attachment.html>


More information about the lldb-dev mailing list