addressing follow-up review comments from mark (#17)

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@19 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
bryner 2006-09-08 04:05:46 +00:00
parent d5e66382d1
commit 512511a895
2 changed files with 4 additions and 5 deletions

View File

@ -44,7 +44,6 @@ Stackwalker::Stackwalker(MemoryRegion* memory, MinidumpModuleList* modules,
void Stackwalker::Walk(StackFrames *frames) { void Stackwalker::Walk(StackFrames *frames) {
frames->clear(); frames->clear();
bool resolve_symbols = (modules_ && supplier_);
SourceLineResolver resolver; SourceLineResolver resolver;
// Begin with the context frame, and keep getting callers until there are // Begin with the context frame, and keep getting callers until there are
@ -64,12 +63,12 @@ void Stackwalker::Walk(StackFrames *frames) {
if (module) { if (module) {
frame->module_name = *(module->GetName()); frame->module_name = *(module->GetName());
frame->module_base = module->base_address(); frame->module_base = module->base_address();
if (resolve_symbols) { if (modules_ && supplier_) {
string symbol_file = supplier_->GetSymbolFile(module, report_); string symbol_file = supplier_->GetSymbolFile(module, report_);
if (!symbol_file.empty()) { if (!symbol_file.empty()) {
resolver.LoadModule(*(module->GetName()), symbol_file); resolver.LoadModule(*(module->GetName()), symbol_file);
resolver.FillSourceLineInfo(frame.get());
} }
resolver.FillSourceLineInfo(frame.get());
} }
} }
} }

View File

@ -45,8 +45,8 @@ class Stackwalker {
virtual ~Stackwalker() {} virtual ~Stackwalker() {}
// Fills the given vector of StackFrames by calling GetContextFrame and // Fills the given vector of StackFrames by calling GetContextFrame and
// GetCallerFrame, and populating the returned frames with module // GetCallerFrame, and populating the returned frames with all available
// offset and name information if possible. // data.
void Walk(StackFrames *frames); void Walk(StackFrames *frames);
protected: protected: