aboutsummaryrefslogtreecommitdiff
path: root/src/tools/mac/crash_report/on_demand_symbol_supplier.mm
diff options
context:
space:
mode:
authornealsid <nealsid@4c0a9323-5329-0410-9bdc-e9ce6186880e>2009-02-27 23:59:40 +0000
committernealsid <nealsid@4c0a9323-5329-0410-9bdc-e9ce6186880e>2009-02-27 23:59:40 +0000
commit2ad976ef0ba44f36842b9b7a11848f6b40fd25d5 (patch)
treef5c7d26102e035346f35db90e2128a183149779c /src/tools/mac/crash_report/on_demand_symbol_supplier.mm
parentFix for issue 242, plus a redo of how old exception handlers are tracked, and... (diff)
downloadbreakpad-2ad976ef0ba44f36842b9b7a11848f6b40fd25d5.tar.xz
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
Diffstat (limited to 'src/tools/mac/crash_report/on_demand_symbol_supplier.mm')
-rw-r--r--src/tools/mac/crash_report/on_demand_symbol_supplier.mm22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/tools/mac/crash_report/on_demand_symbol_supplier.mm b/src/tools/mac/crash_report/on_demand_symbol_supplier.mm
index b8501955..4123a27c 100644
--- a/src/tools/mac/crash_report/on_demand_symbol_supplier.mm
+++ b/src/tools/mac/crash_report/on_demand_symbol_supplier.mm
@@ -30,6 +30,8 @@
#include <sys/stat.h>
#include <map>
#include <string>
+#include <iostream>
+#include <fstream>
#include "google_breakpad/processor/basic_source_line_resolver.h"
#include "google_breakpad/processor/minidump.h"
@@ -136,6 +138,26 @@ OnDemandSymbolSupplier::GetSymbolFile(const CodeModule *module,
return FOUND;
}
+SymbolSupplier::SymbolResult
+OnDemandSymbolSupplier::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) {
+ ifstream in(symbol_file->c_str());
+ getline(in, *symbol_data, std::string::traits_type::to_char_type(
+ std::string::traits_type::eof()));
+ in.close();
+ }
+
+ return s;
+}
+
string OnDemandSymbolSupplier::GetLocalModulePath(const CodeModule *module) {
NSFileManager *mgr = [NSFileManager defaultManager];
const char *moduleStr = module->code_file().c_str();