diff options
author | ivan.penkov@gmail.com <ivan.penkov@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-06-12 21:18:45 +0000 |
---|---|---|
committer | ivan.penkov@gmail.com <ivan.penkov@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-06-12 21:18:45 +0000 |
commit | 1208a8e369e459ec42b94ec1760eb7c80839864a (patch) | |
tree | 817e0e14d99c047e489842c76a62a14644c4b239 /src/processor/fast_source_line_resolver.cc | |
parent | CrashGenerationServer's state machine can be invoked from both the application (diff) | |
download | breakpad-1208a8e369e459ec42b94ec1760eb7c80839864a.tar.xz |
This is a fix for a stackwalker_x86 issue which has to
do with FPO (frame-pointer-omission) optimized context
frames where the context frame represents a Windows
System call stub.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@971 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/processor/fast_source_line_resolver.cc')
-rw-r--r-- | src/processor/fast_source_line_resolver.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/processor/fast_source_line_resolver.cc b/src/processor/fast_source_line_resolver.cc index 45c1f0f0..9224ffa2 100644 --- a/src/processor/fast_source_line_resolver.cc +++ b/src/processor/fast_source_line_resolver.cc @@ -107,10 +107,15 @@ void FastSourceLineResolver::Module::LookupAddress(StackFrame *frame) const { // WFI: WindowsFrameInfo. // Returns a WFI object reading from a raw memory chunk of data WindowsFrameInfo FastSourceLineResolver::CopyWFI(const char *raw) { - // The first 4Bytes of int data are unused. - // They corresponds to "int valid;" data member of WFI. + const WindowsFrameInfo::StackInfoTypes type = + static_cast<const WindowsFrameInfo::StackInfoTypes>( + *reinterpret_cast<const int32_t*>(raw)); + + // The first 8 bytes of int data are unused. + // They correspond to "StackInfoTypes type_;" and "int valid;" + // data member of WFI. const u_int32_t *para_uint32 = reinterpret_cast<const u_int32_t*>( - raw + sizeof(int32_t)); + raw + 2 * sizeof(int32_t)); u_int32_t prolog_size = para_uint32[0];; u_int32_t epilog_size = para_uint32[1]; @@ -122,7 +127,8 @@ WindowsFrameInfo FastSourceLineResolver::CopyWFI(const char *raw) { bool allocates_base_pointer = (*boolean != 0); std::string program_string = boolean + 1; - return WindowsFrameInfo(prolog_size, + return WindowsFrameInfo(type, + prolog_size, epilog_size, parameter_size, saved_register_size, |