| Index: build/android/tombstones.py
|
| diff --git a/build/android/tombstones.py b/build/android/tombstones.py
|
| index dbc6281c2f541af6cde7978be0c12115210379f7..51dd9df0f5686aad5dd07748b4e8045eef47b4b5 100755
|
| --- a/build/android/tombstones.py
|
| +++ b/build/android/tombstones.py
|
| @@ -106,7 +106,7 @@ def _DeviceAbiToArch(device_abi):
|
| raise RuntimeError('Unknown device ABI: %s' % device_abi)
|
|
|
|
|
| -def _ResolveSymbols(tombstone_data, include_stack, device_abi):
|
| +def _ResolveSymbols(tombstone_data, include_stack, device_abi, packed_libs):
|
| """Run the stack tool for given tombstone input.
|
|
|
| Args:
|
| @@ -132,6 +132,9 @@ def _ResolveSymbols(tombstone_data, include_stack, device_abi):
|
| 'scripts', 'stack')
|
| cmd = [stack_tool, '--arch', arch, '--output-directory',
|
| constants.GetOutDirectory()]
|
| + if packed_libs:
|
| + for packed_lib in packed_libs:
|
| + cmd.extend(['--packed-lib', packed_lib])
|
| proc = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
|
| output = proc.communicate(input='\n'.join(tombstone_data))[0]
|
| for line in output.split('\n'):
|
| @@ -140,7 +143,9 @@ def _ResolveSymbols(tombstone_data, include_stack, device_abi):
|
| yield line
|
|
|
|
|
| -def _ResolveTombstone(tombstone):
|
| +def _ResolveTombstone(args):
|
| + tombstone = args[0]
|
| + packed_libs = args[1]
|
| lines = []
|
| lines += [tombstone['file'] + ' created on ' + str(tombstone['time']) +
|
| ', about this long ago: ' +
|
| @@ -149,11 +154,12 @@ def _ResolveTombstone(tombstone):
|
| logging.info('\n'.join(lines))
|
| logging.info('Resolving...')
|
| lines += _ResolveSymbols(tombstone['data'], tombstone['stack'],
|
| - tombstone['device_abi'])
|
| + tombstone['device_abi'],
|
| + packed_libs)
|
| return lines
|
|
|
|
|
| -def _ResolveTombstones(jobs, tombstones):
|
| +def _ResolveTombstones(jobs, tombstones, packed_libs):
|
| """Resolve a list of tombstones.
|
|
|
| Args:
|
| @@ -164,10 +170,11 @@ def _ResolveTombstones(jobs, tombstones):
|
| logging.warning('No tombstones to resolve.')
|
| return []
|
| if len(tombstones) == 1:
|
| - data = [_ResolveTombstone(tombstones[0])]
|
| + data = [_ResolveTombstone([tombstones[0], packed_libs])]
|
| else:
|
| pool = multiprocessing.Pool(processes=jobs)
|
| - data = pool.map(_ResolveTombstone, tombstones)
|
| + data = pool.map(_ResolveTombstone,
|
| + [[tombstone, packed_libs] for tombstone in tombstones])
|
| resolved_tombstones = []
|
| for tombstone in data:
|
| resolved_tombstones.extend(tombstone)
|
| @@ -236,7 +243,7 @@ def ClearAllTombstones(device):
|
|
|
|
|
| def ResolveTombstones(device, resolve_all_tombstones, include_stack_symbols,
|
| - wipe_tombstones, jobs=4):
|
| + wipe_tombstones, jobs=4, packed_libs=None):
|
| """Resolve tombstones in the device.
|
|
|
| Args:
|
| @@ -253,7 +260,8 @@ def ResolveTombstones(device, resolve_all_tombstones, include_stack_symbols,
|
| _GetTombstonesForDevice(device,
|
| resolve_all_tombstones,
|
| include_stack_symbols,
|
| - wipe_tombstones))
|
| + wipe_tombstones),
|
| + packed_libs)
|
|
|
|
|
| def main():
|
|
|