diff options
author | mmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2006-09-28 21:09:37 +0000 |
---|---|---|
committer | mmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2006-09-28 21:09:37 +0000 |
commit | fc1c78e60e9b305386f4c3fc811463f3b24cf6d4 (patch) | |
tree | 1e6eb65851d509851267d003f0bf5bd478ed9dbe /src/processor/stackwalker.cc | |
parent | Add static-CRT build configurations. Get rid of the largely redundant README, (diff) | |
download | breakpad-fc1c78e60e9b305386f4c3fc811463f3b24cf6d4.tar.xz |
Handle frame pointer omission (#21), part 3: SourceLineResolver and PDBSourceLineWriter changes. r=bryner.
- PDBSourceLineWriter (dump_syms) outputs stack frame debugging information
- SourceLineResolver reads the new information and puts it into a
new StackFrameInfo structure, which is stored in a ContainedRangeMap.
FillSourceLineInfo passes the StackFrameInfo back to the caller.
- The base Stackwalker makes StackFrameInfo data available to subclasses
during stackwalking, but does not use this information directly itself.
Stackwalkers may access stack_frame_info_ for enhanced stackwalking
(this will be part 4).
- New test data for the updated dumped-symbol format
http://groups.google.com/group/airbag-dev/browse_thread/thread/735f191c9a1a1de4
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@38 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/processor/stackwalker.cc')
-rw-r--r-- | src/processor/stackwalker.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/processor/stackwalker.cc b/src/processor/stackwalker.cc index 5dc7d545..2f74e924 100644 --- a/src/processor/stackwalker.cc +++ b/src/processor/stackwalker.cc @@ -50,18 +50,21 @@ using std::auto_ptr; Stackwalker::Stackwalker(MemoryRegion *memory, MinidumpModuleList *modules, SymbolSupplier *supplier) - : memory_(memory), modules_(modules), supplier_(supplier) { + : memory_(memory), stack_frame_info_(), modules_(modules), + supplier_(supplier) { } void Stackwalker::Walk(StackFrames *frames) { frames->clear(); + stack_frame_info_.clear(); SourceLineResolver resolver; // Begin with the context frame, and keep getting callers until there are // no more. auto_ptr<StackFrame> frame(new StackFrame()); + auto_ptr<StackFrameInfo> frame_info(new StackFrameInfo()); bool valid = GetContextFrame(frame.get()); while (valid) { // frame already contains a good frame with properly set instruction and @@ -80,7 +83,7 @@ void Stackwalker::Walk(StackFrames *frames) { supplier_->GetSymbolFile(module); if (!symbol_file.empty()) { resolver.LoadModule(*(module->GetName()), symbol_file); - resolver.FillSourceLineInfo(frame.get()); + resolver.FillSourceLineInfo(frame.get(), frame_info.get()); } } } @@ -88,11 +91,13 @@ void Stackwalker::Walk(StackFrames *frames) { // Copy the frame into the frames vector. frames->push_back(*frame); + stack_frame_info_.push_back(*frame_info); // Use a new object for the next frame, even though the old object was // copied. If StackFrame provided some sort of Clear() method, then // the same frame could be reused. frame.reset(new StackFrame()); + frame_info.reset(new StackFrameInfo()); // Get the next frame. valid = GetCallerFrame(frame.get(), frames); |