diff options
Diffstat (limited to 'src/processor/stackwalker_x86.cc')
-rw-r--r-- | src/processor/stackwalker_x86.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/processor/stackwalker_x86.cc b/src/processor/stackwalker_x86.cc index 59662cdf..e39df17f 100644 --- a/src/processor/stackwalker_x86.cc +++ b/src/processor/stackwalker_x86.cc @@ -42,6 +42,7 @@ #include "google_breakpad/processor/memory_region.h" #include "google_breakpad/processor/stack_frame_cpu.h" #include "processor/linked_ptr.h" +#include "processor/logging.h" #include "processor/stack_frame_info.h" namespace google_breakpad { @@ -58,14 +59,19 @@ StackwalkerX86::StackwalkerX86(const SystemInfo *system_info, if (memory_->GetBase() + memory_->GetSize() - 1 > 0xffffffff) { // The x86 is a 32-bit CPU, the limits of the supplied stack are invalid. // Mark memory_ = NULL, which will cause stackwalking to fail. + BPLOG(ERROR) << "Memory out of range for stackwalking: " << + HexString(memory_->GetBase()) << "+" << + HexString(memory_->GetSize()); memory_ = NULL; } } StackFrame* StackwalkerX86::GetContextFrame() { - if (!context_ || !memory_) + if (!context_ || !memory_) { + BPLOG(ERROR) << "Can't get context frame without context or memory"; return NULL; + } StackFrameX86 *frame = new StackFrameX86(); @@ -82,8 +88,10 @@ StackFrame* StackwalkerX86::GetContextFrame() { StackFrame* StackwalkerX86::GetCallerFrame( const CallStack *stack, const vector< linked_ptr<StackFrameInfo> > &stack_frame_info) { - if (!memory_ || !stack) + if (!memory_ || !stack) { + BPLOG(ERROR) << "Can't get caller frame without memory or stack"; return NULL; + } StackFrameX86 *last_frame = static_cast<StackFrameX86*>( stack->frames()->back()); |