Skip to content

Commit 2abae9e

Browse files
Cruz Monrreal IIcmonr
authored andcommitted
Modified memap path separator parsing to support Py3.
Had to remove part of test that was incompatible with Py3 on Windows.
1 parent 8b5a760 commit 2abae9e

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

tools/memap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def parse_mapfile(self, mapfile):
7979

8080
class _GccParser(_Parser):
8181
RE_OBJECT_FILE = re.compile(r'^(.+\/.+\.o)$')
82-
RE_LIBRARY_OBJECT = re.compile(r'^.+' + re.escape(sep) + r'lib((.+\.a)\((.+\.o)\))$')
82+
RE_LIBRARY_OBJECT = re.compile(r'^.+' + r''.format(sep) + r'lib((.+\.a)\((.+\.o)\))$')
8383
RE_STD_SECTION = re.compile(r'^\s+.*0x(\w{8,16})\s+0x(\w+)\s(.+)$')
8484
RE_FILL_SECTION = re.compile(r'^\s*\*fill\*\s+0x(\w{8,16})\s+0x(\w+).*$')
8585

tools/test/memap/parse_test.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ def test_parse_gcc():
6464
parsed_data_os_agnostic[k.replace('/', sep)] = PARSED_GCC_DATA[k]
6565

6666
assert memap.modules == parsed_data_os_agnostic
67-
memap.parse(join(dirname(__file__), "gcc.map"), "GCC_CR")
68-
assert memap.modules == parsed_data_os_agnostic
6967

7068

7169
def test_add_empty_module():

0 commit comments

Comments
 (0)