end_to_end_test: accept mangled anonymous namespaces from cdb

When crashy_test_program's SomeCrashyFunction is inlined into
CrashyMain, cdb doesn't demangle the decorated form of an anonymous
namespace (?A0x12345678) into the expected `anonymous namespace' string.

I experienced this in Release_x64 and Release modes using MSVS 2015
update 3 (14.0.25420.1, cl 19.00.24213.1) and cdb versions 10.0.10240.9
and 10.0.14321.1024.

BUG=crashpad:129

Change-Id: I0a665b88891c271253adccd9b2b414fcaac26c8f
Reviewed-on: https://chromium-review.googlesource.com/368730
Reviewed-by: Scott Graham <scottmg@chromium.org>
This commit is contained in:
Mark Mentovai 2016-08-12 13:24:01 -04:00
parent c822792095
commit 9807cba2f4

View File

@ -199,16 +199,19 @@ def RunTests(cdb_path,
out = CdbRun(cdb_path, dump_path, '.ecxr') out = CdbRun(cdb_path, dump_path, '.ecxr')
out.Check('This dump file has an exception of interest stored in it', out.Check('This dump file has an exception of interest stored in it',
'captured exception') 'captured exception')
out.Check(
'crashy_program!crashpad::`anonymous namespace\'::SomeCrashyFunction', # When SomeCrashyFunction is inlined, cdb doesn't demangle its namespace as
'exception at correct location') # "`anonymous namespace'" and instead gives the decorated form.
out.Check('crashy_program!crashpad::(`anonymous namespace\'|\?A0x[0-9a-f]+)::'
'SomeCrashyFunction',
'exception at correct location')
out = CdbRun(cdb_path, start_handler_dump_path, '.ecxr') out = CdbRun(cdb_path, start_handler_dump_path, '.ecxr')
out.Check('This dump file has an exception of interest stored in it', out.Check('This dump file has an exception of interest stored in it',
'captured exception (using StartHandler())') 'captured exception (using StartHandler())')
out.Check( out.Check('crashy_program!crashpad::(`anonymous namespace\'|\?A0x[0-9a-f]+)::'
'crashy_program!crashpad::`anonymous namespace\'::SomeCrashyFunction', 'SomeCrashyFunction',
'exception at correct location (using StartHandler())') 'exception at correct location (using StartHandler())')
out = CdbRun(cdb_path, dump_path, '!peb') out = CdbRun(cdb_path, dump_path, '!peb')
out.Check(r'PEB at', 'found the PEB') out.Check(r'PEB at', 'found the PEB')