Define and use a a new MDRawContextARM64

This struct matches the layout defined by Microsoft and replaces
Breakpad's MDRawContextARM64_Old. This CL updates the processor to
understand either the old or new structs, but clients continue to write
the old structs.

Change-Id: I8dedd9ddb2ec083b802723b9ac87beb18d98edbd
Reviewed-on: https://chromium-review.googlesource.com/1155938
Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
Joshua Peraza 2018-08-01 10:48:27 -07:00
parent 627ef0cb9c
commit 88d8114fda
22 changed files with 411 additions and 83 deletions

View file

@ -122,14 +122,14 @@ class StackwalkerARM64Fixture {
}
// Fill RAW_CONTEXT with pseudo-random data, for round-trip checking.
void BrandContext(MDRawContextARM64_Old *raw_context) {
void BrandContext(MDRawContextARM64 *raw_context) {
uint8_t x = 173;
for (size_t i = 0; i < sizeof(*raw_context); i++)
reinterpret_cast<uint8_t *>(raw_context)[i] = (x += 17);
}
SystemInfo system_info;
MDRawContextARM64_Old raw_context;
MDRawContextARM64 raw_context;
Section stack_section;
MockMemoryRegion stack_region;
MockCodeModule module1;
@ -688,7 +688,7 @@ struct CFIFixture: public StackwalkerARM64Fixture {
}
// The values we expect to find for the caller's registers.
MDRawContextARM64_Old expected;
MDRawContextARM64 expected;
// The validity mask for expected.
uint64_t expected_validity;