#NEWLINE# def _target( self , target_id = 0 ) : #NEWLINE# #INDENT# '\n            Return information about the specified target.\n\n            Returns data in the following structure:\n            {\n                "id":       0,         # ID that can be used in other funcs\n                "file":     "/bin/ls", # target\'s binary file\n                "arch":     "x86_64",  # target\'s architecture\n                "state:     "stopped"  # state\n            }\n            ' #NEWLINE# t = self . host . GetTargetAtIndex ( target_id ) #NEWLINE# d = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# d [ 'id' ] = target_id #NEWLINE# d [ 'state' ] = self . host . StateAsCString ( t . process . GetState ( ) ) #NEWLINE# d [ 'file' ] = t . GetExecutable ( ) . fullpath #NEWLINE# try : #NEWLINE# #INDENT# ( d [ 'arch' ] , _ , _ ) = self . normalize_triple ( t . triple ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# d [ 'arch' ] = None #NEWLINE# #UNINDENT# if ( d [ 'arch' ] == 'i386' ) : #NEWLINE# #INDENT# d [ 'arch' ] = 'x86' #NEWLINE# #UNINDENT# d [ 'byte_order' ] = ( 'little' if ( t . byte_order == lldb . eByteOrderLittle ) else 'big' ) #NEWLINE# d [ 'addr_size' ] = t . addr_size #NEWLINE# return d