Skip to content
Commit 6fadea62 authored by Adrian McCarthy's avatar Adrian McCarthy
Browse files

Improve ReadRegister for RegisterContextWindowsx86

In some circumstances (notably, certain minidumps), the thread CONTEXT does not have values for the
control registers (EIP, ESP, EBP, EFLAGS).  There are flags in the CONTEXT which indicate which
portions are valid, but those flags weren't checked.  The old code would not detect this and give a
garbage value for the register.  The new code will log the problem and return an error.

I consolidated the error checking and logging into a helper function, which makes the big switch
statement easier to read and verify.

Ran tests to ensure this doesn't break anything.  Manually verified that a minidump without info on
the control registers now indicates the problem instead of giving bad information.

Differential Review: http://reviews.llvm.org/D17152

llvm-svn: 260559
parent 9855111b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment