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

Unified Diff: tools/find_runtime_symbols/static_symbols.py

Issue 11299095: Add a first test for tools/find_runtime_symbols. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed Created 8 years, 1 month 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
Index: tools/find_runtime_symbols/static_symbols.py
diff --git a/tools/find_runtime_symbols/static_symbols.py b/tools/find_runtime_symbols/static_symbols.py
index eb943e18680afdec9c623fccb94065fe45545df3..e972ad755747e544f204660e2eed3fe7d3ec797d 100644
--- a/tools/find_runtime_symbols/static_symbols.py
+++ b/tools/find_runtime_symbols/static_symbols.py
@@ -3,9 +3,7 @@
# found in the LICENSE file.
import bisect
-import os
import re
-import sys
_ARGUMENT_TYPE_PATTERN = re.compile('\([^()]*\)(\s*const)?')
@@ -185,14 +183,16 @@ class StaticSymbolsInFile(object):
if line in ('Key to Flags:', 'Program Headers:'):
break
- def _parse_nm_bsd_line(self, line):
+ @staticmethod
+ def _parse_nm_bsd_line(line):
if line[8] == ' ':
return line[0:8], line[9], line[11:]
elif line[16] == ' ':
return line[0:16], line[17], line[19:]
raise ParsingException('Invalid nm output.')
- def _get_short_function_name(self, function):
+ @staticmethod
+ def _get_short_function_name(function):
while True:
function, number = _ARGUMENT_TYPE_PATTERN.subn('', function)
if not number:

Powered by Google App Engine
This is Rietveld 408576698