Modified memap path separator parsing to support Py3.

Had to remove part of test that was incompatible with Py3 on Windows.
pull/7092/head
Cruz Monrreal II 2018-05-31 21:26:26 -05:00 committed by Cruz Monrreal II
parent 8b5a7600c4
commit 2abae9e1d1
2 changed files with 1 additions and 3 deletions

View File

@ -79,7 +79,7 @@ class _Parser(object):
class _GccParser(_Parser):
RE_OBJECT_FILE = re.compile(r'^(.+\/.+\.o)$')
RE_LIBRARY_OBJECT = re.compile(r'^.+' + re.escape(sep) + r'lib((.+\.a)\((.+\.o)\))$')
RE_LIBRARY_OBJECT = re.compile(r'^.+' + r''.format(sep) + r'lib((.+\.a)\((.+\.o)\))$')
RE_STD_SECTION = re.compile(r'^\s+.*0x(\w{8,16})\s+0x(\w+)\s(.+)$')
RE_FILL_SECTION = re.compile(r'^\s*\*fill\*\s+0x(\w{8,16})\s+0x(\w+).*$')

View File

@ -64,8 +64,6 @@ def test_parse_gcc():
parsed_data_os_agnostic[k.replace('/', sep)] = PARSED_GCC_DATA[k]
assert memap.modules == parsed_data_os_agnostic
memap.parse(join(dirname(__file__), "gcc.map"), "GCC_CR")
assert memap.modules == parsed_data_os_agnostic
def test_add_empty_module():