aboutsummaryrefslogtreecommitdiff
path: root/src/tools/mac/crash_report/on_demand_symbol_supplier.mm
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2011-07-27 14:30:58 +0000
committermark@chromium.org <mark@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2011-07-27 14:30:58 +0000
commite919fdd63b4550a3261422ffde3c8d631007f75b (patch)
treeadb0d1b3b2db96e01a9dbecd5e0f0e9cd015b275 /src/tools/mac/crash_report/on_demand_symbol_supplier.mm
parentSwitch mac DumpSymbols::WriteSymbolFile to take an ostream instead of a FILE*... (diff)
downloadbreakpad-e919fdd63b4550a3261422ffde3c8d631007f75b.tar.xz
Wean Mac Breakpad off of its OpenSSL libcrypto dependency.
This libcrypto dependency sucks. Linking against OpenSSL is sort of broken in certain Mac OS X SDKs. libcrypto was only being used to provide an MD5 implementation. Breakpad already has its own MD5 implementation, so just use that instead. To be perfectly honest, on modern systems, nothing should be making MD5 hashes of modules anyway, because everything has an embedded LC_UUID. The project file changes just remove libcrypto and add md5.c as needed. A bonus (and untested) fix for on_demand_symbol_supplier.mm is included to account for changes in r794. Review URL: http://breakpad.appspot.com/296001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@819 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.mm11
1 files changed, 3 insertions, 8 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 00360f67..99d54faf 100644
--- a/src/tools/mac/crash_report/on_demand_symbol_supplier.mm
+++ b/src/tools/mac/crash_report/on_demand_symbol_supplier.mm
@@ -291,14 +291,9 @@ bool OnDemandSymbolSupplier::GenerateSymbolFile(const CodeModule *module,
}
if (dump.SetArchitecture(architecture)) {
- FILE *file = fopen([symbol_path fileSystemRepresentation],"w");
- if (file) {
- dump.WriteSymbolFile(file);
- fclose(file);
- } else {
- printf("Unable to open %s (%d)\n", name.c_str(), errno);
- result = false;
- }
+ std::fstream file([symbol_path fileSystemRepresentation],
+ std::ios_base::out | std::ios_base::trunc);
+ dump.WriteSymbolFile(file);
} else {
printf("Architecture %s not available for %s\n",
system_info->cpu.c_str(), name.c_str());