From 48550041f9663bd13cb805cf770b7d1ddcb1514a Mon Sep 17 00:00:00 2001 From: "ted.mielczarek" Date: Tue, 26 Jul 2011 14:03:09 +0000 Subject: [PATCH] Switch mac DumpSymbols::WriteSymbolFile to take an ostream instead of a FILE* to match the changes to Module::Write R=mark at http://breakpad.appspot.com/294001/show git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@818 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/common/mac/dump_syms.h | 3 ++- src/common/mac/dump_syms.mm | 3 ++- src/tools/mac/dump_syms/dump_syms_tool.mm | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/common/mac/dump_syms.h b/src/common/mac/dump_syms.h index fbf11c78..f197ca28 100644 --- a/src/common/mac/dump_syms.h +++ b/src/common/mac/dump_syms.h @@ -40,6 +40,7 @@ #include #include +#include #include #include @@ -111,7 +112,7 @@ class DumpSymbols { // Read the selected object file's debugging information, and write it // out to |stream|. Return true on success; if an error occurs, report it // and return false. - bool WriteSymbolFile(FILE *stream); + bool WriteSymbolFile(std::ostream &stream); private: // Used internally. diff --git a/src/common/mac/dump_syms.mm b/src/common/mac/dump_syms.mm index cc2efe17..5fd614f2 100644 --- a/src/common/mac/dump_syms.mm +++ b/src/common/mac/dump_syms.mm @@ -40,6 +40,7 @@ #include #include +#include #include #include @@ -420,7 +421,7 @@ bool DumpSymbols::LoadCommandDumper::SymtabCommand(const ByteBuffer &entries, return true; } -bool DumpSymbols::WriteSymbolFile(FILE *stream) { +bool DumpSymbols::WriteSymbolFile(std::ostream &stream) { // Select an object file, if SetArchitecture hasn't been called to set one // explicitly. if (!selected_object_file_) { diff --git a/src/tools/mac/dump_syms/dump_syms_tool.mm b/src/tools/mac/dump_syms/dump_syms_tool.mm index 0b8c11b9..3f1f03b6 100644 --- a/src/tools/mac/dump_syms/dump_syms_tool.mm +++ b/src/tools/mac/dump_syms/dump_syms_tool.mm @@ -35,6 +35,7 @@ #include #include +#include #include #include "common/mac/dump_syms.h" @@ -82,7 +83,7 @@ static bool Start(const Options &options) { } } - return dump_symbols.WriteSymbolFile(stdout); + return dump_symbols.WriteSymbolFile(std::cout); } //=============================================================================