Fix for issues 296, 297. Various symbol supplier classes need to be updated with new overload('make check' was failing, as well as crash_report), and remove logging that was flooding output
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@318 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
@@ -32,6 +32,8 @@
|
||||
|
||||
#include <cstdlib>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include "google_breakpad/processor/basic_source_line_resolver.h"
|
||||
#include "google_breakpad/processor/call_stack.h"
|
||||
#include "google_breakpad/processor/code_module.h"
|
||||
@@ -89,6 +91,11 @@ class TestSymbolSupplier : public SymbolSupplier {
|
||||
const SystemInfo *system_info,
|
||||
string *symbol_file);
|
||||
|
||||
virtual SymbolResult GetSymbolFile(const CodeModule *module,
|
||||
const SystemInfo *system_info,
|
||||
string *symbol_file,
|
||||
string *symbol_data);
|
||||
|
||||
// When set to true, causes the SymbolSupplier to return INTERRUPT
|
||||
void set_interrupt(bool interrupt) { interrupt_ = interrupt; }
|
||||
|
||||
@@ -123,6 +130,23 @@ SymbolSupplier::SymbolResult TestSymbolSupplier::GetSymbolFile(
|
||||
return NOT_FOUND;
|
||||
}
|
||||
|
||||
SymbolSupplier::SymbolResult TestSymbolSupplier::GetSymbolFile(
|
||||
const CodeModule *module,
|
||||
const SystemInfo *system_info,
|
||||
string *symbol_file,
|
||||
string *symbol_data) {
|
||||
SymbolSupplier::SymbolResult s = GetSymbolFile(module, system_info,
|
||||
symbol_file);
|
||||
if (s == FOUND) {
|
||||
std::ifstream in(symbol_file->c_str());
|
||||
std::getline(in, *symbol_data, std::string::traits_type::to_char_type(
|
||||
std::string::traits_type::eof()));
|
||||
in.close();
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
static bool RunTests() {
|
||||
TestSymbolSupplier supplier;
|
||||
BasicSourceLineResolver resolver;
|
||||
|
Reference in New Issue
Block a user