| Index: third_party/android_platform/development/scripts/stack_core.py
|
| diff --git a/tools/android_stack_parser/stack_core.py b/third_party/android_platform/development/scripts/stack_core.py
|
| similarity index 92%
|
| copy from tools/android_stack_parser/stack_core.py
|
| copy to third_party/android_platform/development/scripts/stack_core.py
|
| index 96333ed701609a0a634cc30f1a82b1a6d387e047..a11fbb4cf97f4a96693d4ff678689e7a14214fb0 100755
|
| --- a/tools/android_stack_parser/stack_core.py
|
| +++ b/third_party/android_platform/development/scripts/stack_core.py
|
| @@ -64,15 +64,8 @@ def PrintDivider():
|
| print
|
| print "-----------------------------------------------------\n"
|
|
|
| -def ConvertTrace(lines, more_info, symbol_file_mappings):
|
| - """Convert strings containing native crash to a stack.
|
| -
|
| - Args:
|
| - symbol_file_mappings: maps from library pathname to base name of file
|
| - containing symbols. If |symbol_file_mappings| doesn't contain a path than
|
| - the library pathname is used. See TranslatePathFromDeviceToLocal() for
|
| - more information.
|
| - """
|
| +def ConvertTrace(lines, more_info):
|
| + """Convert strings containing native crash to a stack."""
|
| process_info_line = re.compile("(pid: [0-9]+, tid: [0-9]+.*)")
|
| signal_line = re.compile("(signal [0-9]+ \(.*\).*)")
|
| register_line = re.compile("(([ ]*[0-9a-z]{2} [0-9a-f]{8}){4})")
|
| @@ -81,7 +74,7 @@ def ConvertTrace(lines, more_info, symbol_file_mappings):
|
| dalvik_native_thread_line = re.compile("(\".*\" sysTid=[0-9]+ nice=[0-9]+.*)")
|
|
|
| width = "{8}"
|
| - if symbol.ARCH == "arm64" or symbol.ARCH == "x86_64" or symbol.ARCH == "x64":
|
| + if symbol.ARCH == "arm64" or symbol.ARCH == "x86_64":
|
| width = "{16}"
|
|
|
| # Matches LOG(FATAL) lines, like the following example:
|
| @@ -157,9 +150,7 @@ def ConvertTrace(lines, more_info, symbol_file_mappings):
|
|
|
| for lib in code_addresses:
|
| symbol.SymbolInformationForSet(
|
| - symbol.TranslatePathFromDeviceToLocal(
|
| - symbol_file_mappings.get(lib, lib)),
|
| - code_addresses[lib], more_info)
|
| + symbol.TranslateLibPath(lib), code_addresses[lib], more_info)
|
|
|
| for ln in lines:
|
| # AndroidFeedback adds zero width spaces into its crash reports. These
|
| @@ -214,8 +205,7 @@ def ConvertTrace(lines, more_info, symbol_file_mappings):
|
| else:
|
| # If a calls b which further calls c and c is inlined to b, we want to
|
| # display "a -> b -> c" in the stack trace instead of just "a -> c"
|
| - info = symbol.SymbolInformation(symbol_file_mappings.get(area, area),
|
| - code_addr, more_info)
|
| + info = symbol.SymbolInformation(area, code_addr, more_info)
|
| nest_count = len(info) - 1
|
| for (source_symbol, source_location, object_symbol_with_offset) in info:
|
| if not source_symbol:
|
| @@ -244,8 +234,7 @@ def ConvertTrace(lines, more_info, symbol_file_mappings):
|
| if area == UNKNOWN or area == HEAP or area == STACK or not area:
|
| value_lines.append((addr, value, "", area))
|
| else:
|
| - info = symbol.SymbolInformation(symbol_file_mappings.get(area, area),
|
| - value, more_info)
|
| + info = symbol.SymbolInformation(area, value, more_info)
|
| (source_symbol, source_location, object_symbol_with_offset) = info.pop()
|
| if not source_symbol:
|
| if symbol_present:
|
|
|