Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Unified Diff: tools/cygprofile/symbol_extractor.py

Issue 902633002: Fix a bunch of issues blocking 64-bit orderfile generation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove global _OBJDUMP_BINARY Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/cygprofile/patch_orderfile.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/cygprofile/symbol_extractor.py
diff --git a/tools/cygprofile/symbol_extractor.py b/tools/cygprofile/symbol_extractor.py
index 5fd67a1d65bd25aae696fb6674e717f5e096e4d3..81c6e66d8fbca2805ba8b7c673d12eb18a3d8d14 100755
--- a/tools/cygprofile/symbol_extractor.py
+++ b/tools/cygprofile/symbol_extractor.py
@@ -18,14 +18,13 @@ sys.path.insert(
import symbol
-# TODO(lizeb): Change symbol.ARCH to the proper value when "arm" is no longer
-# the only possible value.
-_OBJDUMP_BINARY = symbol.ToolPath('objdump')
-
-
SymbolInfo = collections.namedtuple('SymbolInfo', ('name', 'offset', 'size',
'section'))
+def SetArchitecture(arch):
+ """Set the architecture for binaries to be symbolized."""
+ symbol.ARCH = arch
+
def _FromObjdumpLine(line):
"""Create a SymbolInfo by parsing a properly formatted objdump output line.
@@ -81,7 +80,7 @@ def SymbolInfosFromBinary(binary_filename):
Returns:
A list of SymbolInfo from the binary.
"""
- command = (_OBJDUMP_BINARY, '-t', '-w', binary_filename)
+ command = (symbol.ToolPath('objdump'), '-t', '-w', binary_filename)
p = subprocess.Popen(command, shell=False, stdout=subprocess.PIPE)
try:
result = _SymbolInfosFromStream(p.stdout)
« no previous file with comments | « tools/cygprofile/patch_orderfile.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698