mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2026-02-19 08:42:59 +00:00
Allow breakpad to read extended amd64 contexts
Minidumps can contain extended, and compacted extended, contexts to include xstate data such as the state of the cet registers cetumsr and cetussp. Previously breakpad would reject dumps with contexts larger than expected. With this chage, breakpad now accepts and reads these minidumps. This change does not yet add processing for this extra data, but will allow any minidumps to be passed on to other processing tools, or be available for manual inspection. See chromium-review.googlesource.com/c/crashpad/crashpad/+/2575920 for motivation. Bug: 1250098 Change-Id: Id67649738ef1c7fb6308e05e6cd8fde790771cb2 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3256483 Reviewed-by: Robert Sesek <rsesek@chromium.org>
This commit is contained in:
@@ -761,6 +761,29 @@ TEST_F(MinidumpProcessorTest, Test32BitCrashingAddress) {
|
||||
ASSERT_EQ(state.crash_address(), 0x45U);
|
||||
}
|
||||
|
||||
TEST_F(MinidumpProcessorTest, TestXStateAmd64ContextMinidump) {
|
||||
// This tests if we can passively process a minidump with cet registers in its
|
||||
// context. Dump is captured from a toy executable and is readable by windbg.
|
||||
MinidumpProcessor processor(nullptr, nullptr /*&supplier, &resolver*/);
|
||||
|
||||
string minidump_file = GetTestDataPath()
|
||||
+ "tiny-exe-with-cet-xsave.dmp";
|
||||
|
||||
ProcessState state;
|
||||
ASSERT_EQ(processor.Process(minidump_file, &state),
|
||||
google_breakpad::PROCESS_OK);
|
||||
ASSERT_EQ(state.system_info()->os, "Windows NT");
|
||||
ASSERT_EQ(state.system_info()->os_version, "10.0.22000 282");
|
||||
ASSERT_EQ(state.system_info()->cpu, "amd64");
|
||||
ASSERT_EQ(state.system_info()->cpu_info,
|
||||
"family 6 model 140 stepping 1");
|
||||
ASSERT_FALSE(state.crashed());
|
||||
ASSERT_EQ(state.threads()->size(), size_t(1));
|
||||
|
||||
// TODO: verify cetumsr and cetussp once these are supported by
|
||||
// breakpad.
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
|
||||
Reference in New Issue
Block a user