aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2013-05-08 20:24:03 +0000
committerthestig@chromium.org <thestig@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2013-05-08 20:24:03 +0000
commit09f89893894fea2ebc9bdf6ba6ab15b831ec6cc3 (patch)
tree46660618a42d3b805017ecbba307edf1b0b9e965
parentFix mac dump_syms after r1163. (diff)
downloadbreakpad-09f89893894fea2ebc9bdf6ba6ab15b831ec6cc3.tar.xz
Mac: Fix more errors from clang to get crash_report.xcodeproj close to compiling.
R=mark@chromium.org Review URL: https://breakpad.appspot.com/593002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1176 4c0a9323-5329-0410-9bdc-e9ce6186880e
-rw-r--r--src/common/dwarf/functioninfo.cc2
-rw-r--r--src/third_party/libdisasm/x86_disasm.c2
-rw-r--r--src/tools/mac/crash_report/crash_report.mm2
-rw-r--r--src/tools/mac/crash_report/on_demand_symbol_supplier.mm6
4 files changed, 7 insertions, 5 deletions
diff --git a/src/common/dwarf/functioninfo.cc b/src/common/dwarf/functioninfo.cc
index 8e4d041b..55a255ed 100644
--- a/src/common/dwarf/functioninfo.cc
+++ b/src/common/dwarf/functioninfo.cc
@@ -42,6 +42,8 @@
#include "common/scoped_ptr.h"
#include "common/using_std_string.h"
+using google_breakpad::scoped_ptr;
+
namespace dwarf2reader {
CULineInfoHandler::CULineInfoHandler(std::vector<SourceFileInfo>* files,
diff --git a/src/third_party/libdisasm/x86_disasm.c b/src/third_party/libdisasm/x86_disasm.c
index d6b7f810..51a213a4 100644
--- a/src/third_party/libdisasm/x86_disasm.c
+++ b/src/third_party/libdisasm/x86_disasm.c
@@ -165,7 +165,7 @@ unsigned int x86_disasm_forward( unsigned char *buf, unsigned int buf_len,
if (next_addr != -1 ) {
next_offset = next_addr - buf_rva;
/* if offset is in this buffer... */
- if ( next_addr >= buf_rva &&
+ if ( (uint32_t)next_addr >= buf_rva &&
next_offset < buf_len ) {
/* go ahead and disassemble */
count += x86_disasm_forward( buf,
diff --git a/src/tools/mac/crash_report/crash_report.mm b/src/tools/mac/crash_report/crash_report.mm
index b6e3f1cc..8b10b646 100644
--- a/src/tools/mac/crash_report/crash_report.mm
+++ b/src/tools/mac/crash_report/crash_report.mm
@@ -164,7 +164,7 @@ static void PrintRegisters(const CallStack *stack, const string &cpu) {
const StackFramePPC *frame_ppc =
reinterpret_cast<const StackFramePPC*>(frame);
- if (frame_ppc->context_validity & StackFramePPC::CONTEXT_VALID_ALL ==
+ if ((frame_ppc->context_validity & StackFramePPC::CONTEXT_VALID_ALL) ==
StackFramePPC::CONTEXT_VALID_ALL) {
sequence = PrintRegister("srr0", frame_ppc->context.srr0, sequence);
sequence = PrintRegister("srr1", frame_ppc->context.srr1, sequence);
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 edcc5ad7..1bd1f693 100644
--- a/src/tools/mac/crash_report/on_demand_symbol_supplier.mm
+++ b/src/tools/mac/crash_report/on_demand_symbol_supplier.mm
@@ -80,7 +80,7 @@ OnDemandSymbolSupplier::OnDemandSymbolSupplier(const string &search_dir,
[dirEnum skipDescendents];
} else {
NSString *filePath = [symbolSearchPath stringByAppendingPathComponent:fileName];
- NSString *dataStr = [[[NSString alloc] initWithContentsOfFile:filePath] autorelease];
+ NSString *dataStr = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:NULL];
if (dataStr) {
// Check file to see if it is of appropriate type, and grab module
// name.
@@ -280,7 +280,7 @@ bool OnDemandSymbolSupplier::GenerateSymbolFile(const CodeModule *module,
NSString *module_str = [[NSFileManager defaultManager]
stringWithFileSystemRepresentation:module_path.c_str()
length:module_path.length()];
- DumpSymbols dump;
+ DumpSymbols dump(ALL_SYMBOL_DATA, false);
if (dump.Read(module_str)) {
// What Breakpad calls "x86" should be given to the system as "i386".
std::string architecture;
@@ -293,7 +293,7 @@ bool OnDemandSymbolSupplier::GenerateSymbolFile(const CodeModule *module,
if (dump.SetArchitecture(architecture)) {
std::fstream file([symbol_path fileSystemRepresentation],
std::ios_base::out | std::ios_base::trunc);
- dump.WriteSymbolFile(file, true);
+ dump.WriteSymbolFile(file);
} else {
printf("Architecture %s not available for %s\n",
system_info->cpu.c_str(), name.c_str());