Modify symbol supplier interface to support an overload that takes a symbol data buffer, to get around an extraneous read/write of symbol data

R=doshimun



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@311 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
nealsid
2009-02-19 21:26:20 +00:00
parent a285652cba
commit 0fd2f1ae21
7 changed files with 166 additions and 40 deletions

View File

@@ -101,13 +101,15 @@ bool Stackwalker::Walk(CallStack *stack) {
if (resolver_ &&
!resolver_->HasModule(frame->module->code_file()) &&
supplier_) {
string symbol_file;
string symbol_data, symbol_file;
SymbolSupplier::SymbolResult symbol_result =
supplier_->GetSymbolFile(module, system_info_, &symbol_file);
supplier_->GetSymbolFile(module, system_info_,
&symbol_file, &symbol_data);
switch (symbol_result) {
case SymbolSupplier::FOUND:
resolver_->LoadModule(frame->module->code_file(), symbol_file);
resolver_->LoadModuleUsingMapBuffer(frame->module->code_file(),
symbol_data);
break;
case SymbolSupplier::NOT_FOUND:
break; // nothing to do