12log = subprocess.check_output([
13 adb,
'logcat',
'-d']).
decode(
'utf-8', errors=
'ignore')
14for line
in log.split(
'\\n'):
16 if len(tokens) == 11
and tokens[-7] ==
'F' and tokens[-3] ==
'pc':
17 addr, path = tokens[-2:]
18 local = os.path.join(out, os.path.basename(path))
19 if os.path.exists(local):
21 sym = subprocess.check_output([
22 'addr2line',
'-Cfpe', local, addr]).
decode(
'utf-8')
23 line = line.replace(addr, addr +
' ' + sym.strip())
24 except subprocess.CalledProcessError:
def print(*args, **kwargs)
static DecodeResult decode(std::string path)