mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2025-03-01 18:58:03 +00:00
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
This commit is contained in:
parent
7304a2c187
commit
09f8989389
|
@ -42,6 +42,8 @@
|
||||||
#include "common/scoped_ptr.h"
|
#include "common/scoped_ptr.h"
|
||||||
#include "common/using_std_string.h"
|
#include "common/using_std_string.h"
|
||||||
|
|
||||||
|
using google_breakpad::scoped_ptr;
|
||||||
|
|
||||||
namespace dwarf2reader {
|
namespace dwarf2reader {
|
||||||
|
|
||||||
CULineInfoHandler::CULineInfoHandler(std::vector<SourceFileInfo>* files,
|
CULineInfoHandler::CULineInfoHandler(std::vector<SourceFileInfo>* files,
|
||||||
|
|
2
src/third_party/libdisasm/x86_disasm.c
vendored
2
src/third_party/libdisasm/x86_disasm.c
vendored
|
@ -165,7 +165,7 @@ unsigned int x86_disasm_forward( unsigned char *buf, unsigned int buf_len,
|
||||||
if (next_addr != -1 ) {
|
if (next_addr != -1 ) {
|
||||||
next_offset = next_addr - buf_rva;
|
next_offset = next_addr - buf_rva;
|
||||||
/* if offset is in this buffer... */
|
/* if offset is in this buffer... */
|
||||||
if ( next_addr >= buf_rva &&
|
if ( (uint32_t)next_addr >= buf_rva &&
|
||||||
next_offset < buf_len ) {
|
next_offset < buf_len ) {
|
||||||
/* go ahead and disassemble */
|
/* go ahead and disassemble */
|
||||||
count += x86_disasm_forward( buf,
|
count += x86_disasm_forward( buf,
|
||||||
|
|
|
@ -164,7 +164,7 @@ static void PrintRegisters(const CallStack *stack, const string &cpu) {
|
||||||
const StackFramePPC *frame_ppc =
|
const StackFramePPC *frame_ppc =
|
||||||
reinterpret_cast<const StackFramePPC*>(frame);
|
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) {
|
StackFramePPC::CONTEXT_VALID_ALL) {
|
||||||
sequence = PrintRegister("srr0", frame_ppc->context.srr0, sequence);
|
sequence = PrintRegister("srr0", frame_ppc->context.srr0, sequence);
|
||||||
sequence = PrintRegister("srr1", frame_ppc->context.srr1, sequence);
|
sequence = PrintRegister("srr1", frame_ppc->context.srr1, sequence);
|
||||||
|
|
|
@ -80,7 +80,7 @@ OnDemandSymbolSupplier::OnDemandSymbolSupplier(const string &search_dir,
|
||||||
[dirEnum skipDescendents];
|
[dirEnum skipDescendents];
|
||||||
} else {
|
} else {
|
||||||
NSString *filePath = [symbolSearchPath stringByAppendingPathComponent:fileName];
|
NSString *filePath = [symbolSearchPath stringByAppendingPathComponent:fileName];
|
||||||
NSString *dataStr = [[[NSString alloc] initWithContentsOfFile:filePath] autorelease];
|
NSString *dataStr = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:NULL];
|
||||||
if (dataStr) {
|
if (dataStr) {
|
||||||
// Check file to see if it is of appropriate type, and grab module
|
// Check file to see if it is of appropriate type, and grab module
|
||||||
// name.
|
// name.
|
||||||
|
@ -280,7 +280,7 @@ bool OnDemandSymbolSupplier::GenerateSymbolFile(const CodeModule *module,
|
||||||
NSString *module_str = [[NSFileManager defaultManager]
|
NSString *module_str = [[NSFileManager defaultManager]
|
||||||
stringWithFileSystemRepresentation:module_path.c_str()
|
stringWithFileSystemRepresentation:module_path.c_str()
|
||||||
length:module_path.length()];
|
length:module_path.length()];
|
||||||
DumpSymbols dump;
|
DumpSymbols dump(ALL_SYMBOL_DATA, false);
|
||||||
if (dump.Read(module_str)) {
|
if (dump.Read(module_str)) {
|
||||||
// What Breakpad calls "x86" should be given to the system as "i386".
|
// What Breakpad calls "x86" should be given to the system as "i386".
|
||||||
std::string architecture;
|
std::string architecture;
|
||||||
|
@ -293,7 +293,7 @@ bool OnDemandSymbolSupplier::GenerateSymbolFile(const CodeModule *module,
|
||||||
if (dump.SetArchitecture(architecture)) {
|
if (dump.SetArchitecture(architecture)) {
|
||||||
std::fstream file([symbol_path fileSystemRepresentation],
|
std::fstream file([symbol_path fileSystemRepresentation],
|
||||||
std::ios_base::out | std::ios_base::trunc);
|
std::ios_base::out | std::ios_base::trunc);
|
||||||
dump.WriteSymbolFile(file, true);
|
dump.WriteSymbolFile(file);
|
||||||
} else {
|
} else {
|
||||||
printf("Architecture %s not available for %s\n",
|
printf("Architecture %s not available for %s\n",
|
||||||
system_info->cpu.c_str(), name.c_str());
|
system_info->cpu.c_str(), name.c_str());
|
||||||
|
|
Loading…
Reference in a new issue