summaryrefslogtreecommitdiff
path: root/scripts/cros_generate_breakpad_symbols.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/cros_generate_breakpad_symbols.py')
-rw-r--r--scripts/cros_generate_breakpad_symbols.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/scripts/cros_generate_breakpad_symbols.py b/scripts/cros_generate_breakpad_symbols.py
index 2c7606b30..92a242e14 100644
--- a/scripts/cros_generate_breakpad_symbols.py
+++ b/scripts/cros_generate_breakpad_symbols.py
@@ -63,26 +63,26 @@ def ReadSymsHeader(sym_file):
def GenerateBreakpadSymbol(elf_file, debug_file=None, breakpad_dir=None,
- board=None, strip_cfi=False, num_errors=None):
+ strip_cfi=False, num_errors=None,
+ dump_syms_cmd='dump_syms'):
"""Generate the symbols for |elf_file| using |debug_file|
Args:
elf_file: The file to dump symbols for
debug_file: Split debug file to use for symbol information
breakpad_dir: The dir to store the output symbol file in
- board: If |breakpad_dir| is not specified, use |board| to find it
strip_cfi: Do not generate CFI data
num_errors: An object to update with the error count (needs a .value member)
+ dump_syms_cmd: Command to use for dumping symbols.
Returns:
- The number of errors that were encountered.
+ The name of symbol file written out.
"""
- if breakpad_dir is None:
- breakpad_dir = FindBreakpadDir(board)
+ assert breakpad_dir
if num_errors is None:
num_errors = ctypes.c_int()
- cmd_base = ['dump_syms']
+ cmd_base = [dump_syms_cmd]
if strip_cfi:
cmd_base += ['-c']
# Some files will not be readable by non-root (e.g. set*id /bin/su).
@@ -151,7 +151,7 @@ def GenerateBreakpadSymbol(elf_file, debug_file=None, breakpad_dir=None,
os.chmod(sym_file, 0o644)
temp.delete = False
- return num_errors.value
+ return sym_file
def GenerateBreakpadSymbols(board, breakpad_dir=None, strip_cfi=False,
@@ -264,7 +264,7 @@ def GenerateBreakpadSymbols(board, breakpad_dir=None, strip_cfi=False,
# Now start generating symbols for the discovered elfs.
with parallel.BackgroundTaskRunner(GenerateBreakpadSymbol,
- breakpad_dir=breakpad_dir, board=board,
+ breakpad_dir=breakpad_dir,
strip_cfi=strip_cfi,
num_errors=bg_errors,
processes=num_processes) as queue: