def parse_system_map(data, module):
 sys_map = {}
 sys_map[module] = {}
 mem_model = None
 arch = 'x86'
 for line in data.splitlines():
  (str_addr, symbol_type, symbol) = line.strip().split()
  try:
   sym_addr = long(str_addr, 16)
  except ValueError:
   continue
  if (symbol == 'arm_syscall'):
   arch = 'ARM'
  if (not (symbol in sys_map[module])):
   sys_map[module][symbol] = []
  sys_map[module][symbol].append([sym_addr, symbol_type])
 mem_model = (str((len(str_addr) * 4)) + 'bit')
 if ((mem_model == '64bit') and (arch == 'x86')):
  arch = 'x64'
 return (arch, mem_model, sys_map)

def parse_system_map ( data , module ) : sys_map = { } sys_map [ module ] = { } mem_model = None arch = 'x86' for line in data . splitlines ( ) : ( str_addr , symbol_type , symbol ) = line . strip ( ) . split ( ) try : sym_addr = long ( str_addr , 16 ) except ValueError : continue if ( symbol == 'arm_syscall' ) : arch = 'ARM' if ( not ( symbol in sys_map [ module ] ) ) : sys_map [ module ] [ symbol ] = [ ] sys_map [ module ] [ symbol ] . append ( [ sym_addr , symbol_type ] ) mem_model = ( str ( ( len ( str_addr ) * 4 ) ) + 'bit' ) if ( ( mem_model == '64bit' ) and ( arch == 'x86' ) ) : arch = 'x64' return ( arch , mem_model , sys_map )
parse the symbol file .