aboutsummaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authormmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-10-20 21:57:35 +0000
committermmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-10-20 21:57:35 +0000
commitac05fa05b5d654c7e47d63c83d9ec801b9392b84 (patch)
tree9aed838f0282f5e85c5558134c2dbf76bb94962d /src/tools
parentAdd support for building the Linux client code using the Android NDK (diff)
downloadbreakpad-ac05fa05b5d654c7e47d63c83d9ec801b9392b84.tar.xz
Fix crash_report tool.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@717 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/mac/crash_report/crash_report.xcodeproj/project.pbxproj76
-rw-r--r--src/tools/mac/crash_report/on_demand_symbol_supplier.h4
-rw-r--r--src/tools/mac/crash_report/on_demand_symbol_supplier.mm14
3 files changed, 94 insertions, 0 deletions
diff --git a/src/tools/mac/crash_report/crash_report.xcodeproj/project.pbxproj b/src/tools/mac/crash_report/crash_report.xcodeproj/project.pbxproj
index abf9565a..902df75f 100644
--- a/src/tools/mac/crash_report/crash_report.xcodeproj/project.pbxproj
+++ b/src/tools/mac/crash_report/crash_report.xcodeproj/project.pbxproj
@@ -7,6 +7,23 @@
objects = {
/* Begin PBXBuildFile section */
+ 4D2C721B126F9ACC00B43EAF /* source_line_resolver_base.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D2C721A126F9ACC00B43EAF /* source_line_resolver_base.cc */; };
+ 4D2C721F126F9ADE00B43EAF /* exploitability.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D2C721E126F9ADE00B43EAF /* exploitability.cc */; };
+ 4D2C7223126F9AF900B43EAF /* exploitability_win.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D2C7222126F9AF900B43EAF /* exploitability_win.cc */; };
+ 4D2C7227126F9B0F00B43EAF /* disassembler_x86.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D2C7226126F9B0F00B43EAF /* disassembler_x86.cc */; };
+ 4D2C722B126F9B5A00B43EAF /* x86_disasm.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D2C722A126F9B5A00B43EAF /* x86_disasm.c */; };
+ 4D2C722D126F9B6E00B43EAF /* x86_misc.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D2C722C126F9B6E00B43EAF /* x86_misc.c */; };
+ 4D2C722F126F9B8300B43EAF /* x86_operand_list.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D2C722E126F9B8300B43EAF /* x86_operand_list.c */; };
+ 4D2C7233126F9BB000B43EAF /* ia32_invariant.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D2C7232126F9BB000B43EAF /* ia32_invariant.c */; settings = {COMPILER_FLAGS = "-Wno-error"; }; };
+ 4D2C7235126F9BC200B43EAF /* ia32_settings.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D2C7234126F9BC200B43EAF /* ia32_settings.c */; };
+ 4D2C7246126F9C0B00B43EAF /* ia32_insn.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D2C7245126F9C0B00B43EAF /* ia32_insn.c */; };
+ 4D2C724A126F9C2300B43EAF /* ia32_opcode_tables.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D2C7249126F9C2300B43EAF /* ia32_opcode_tables.c */; settings = {COMPILER_FLAGS = "-Wno-error"; }; };
+ 4D2C724C126F9C3800B43EAF /* ia32_implicit.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D2C724B126F9C3800B43EAF /* ia32_implicit.c */; settings = {COMPILER_FLAGS = "-Wno-error"; }; };
+ 4D2C724E126F9C4D00B43EAF /* ia32_reg.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D2C724D126F9C4D00B43EAF /* ia32_reg.c */; settings = {COMPILER_FLAGS = "-Wno-error"; }; };
+ 4D2C725B126F9C8000B43EAF /* ia32_operand.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D2C725A126F9C8000B43EAF /* ia32_operand.c */; };
+ 4D2C725D126F9C9200B43EAF /* x86_insn.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D2C725C126F9C9200B43EAF /* x86_insn.c */; };
+ 4D2C7264126F9CBB00B43EAF /* ia32_modrm.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D2C7261126F9CBB00B43EAF /* ia32_modrm.c */; };
+ 4D2C726D126F9CDC00B43EAF /* x86_imm.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D2C7263126F9CBB00B43EAF /* x86_imm.c */; };
557800400BE1F28500EC23E0 /* macho_utilities.cc in Sources */ = {isa = PBXBuildFile; fileRef = 5578003E0BE1F28500EC23E0 /* macho_utilities.cc */; };
8B31FF2A11F0C62700FCF3E4 /* dwarf_cfi_to_module.cc in Sources */ = {isa = PBXBuildFile; fileRef = 8B31FF2411F0C62700FCF3E4 /* dwarf_cfi_to_module.cc */; };
8B31FF2B11F0C62700FCF3E4 /* dwarf_cu_to_module.cc in Sources */ = {isa = PBXBuildFile; fileRef = 8B31FF2611F0C62700FCF3E4 /* dwarf_cu_to_module.cc */; };
@@ -49,6 +66,23 @@
/* Begin PBXFileReference section */
08FB7796FE84155DC02AAC07 /* crash_report.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = crash_report.mm; sourceTree = "<group>"; };
08FB779EFE84155DC02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ 4D2C721A126F9ACC00B43EAF /* source_line_resolver_base.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = source_line_resolver_base.cc; path = ../../../processor/source_line_resolver_base.cc; sourceTree = SOURCE_ROOT; };
+ 4D2C721E126F9ADE00B43EAF /* exploitability.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = exploitability.cc; path = ../../../processor/exploitability.cc; sourceTree = SOURCE_ROOT; };
+ 4D2C7222126F9AF900B43EAF /* exploitability_win.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = exploitability_win.cc; path = ../../../processor/exploitability_win.cc; sourceTree = SOURCE_ROOT; };
+ 4D2C7226126F9B0F00B43EAF /* disassembler_x86.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = disassembler_x86.cc; path = ../../../processor/disassembler_x86.cc; sourceTree = SOURCE_ROOT; };
+ 4D2C722A126F9B5A00B43EAF /* x86_disasm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = x86_disasm.c; path = ../../../third_party/libdisasm/x86_disasm.c; sourceTree = SOURCE_ROOT; };
+ 4D2C722C126F9B6E00B43EAF /* x86_misc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = x86_misc.c; path = ../../../third_party/libdisasm/x86_misc.c; sourceTree = SOURCE_ROOT; };
+ 4D2C722E126F9B8300B43EAF /* x86_operand_list.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = x86_operand_list.c; path = ../../../third_party/libdisasm/x86_operand_list.c; sourceTree = SOURCE_ROOT; };
+ 4D2C7232126F9BB000B43EAF /* ia32_invariant.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ia32_invariant.c; path = ../../../third_party/libdisasm/ia32_invariant.c; sourceTree = SOURCE_ROOT; };
+ 4D2C7234126F9BC200B43EAF /* ia32_settings.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ia32_settings.c; path = ../../../third_party/libdisasm/ia32_settings.c; sourceTree = SOURCE_ROOT; };
+ 4D2C7245126F9C0B00B43EAF /* ia32_insn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ia32_insn.c; path = ../../../third_party/libdisasm/ia32_insn.c; sourceTree = SOURCE_ROOT; };
+ 4D2C7249126F9C2300B43EAF /* ia32_opcode_tables.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ia32_opcode_tables.c; path = ../../../third_party/libdisasm/ia32_opcode_tables.c; sourceTree = SOURCE_ROOT; };
+ 4D2C724B126F9C3800B43EAF /* ia32_implicit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ia32_implicit.c; path = ../../../third_party/libdisasm/ia32_implicit.c; sourceTree = SOURCE_ROOT; };
+ 4D2C724D126F9C4D00B43EAF /* ia32_reg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ia32_reg.c; path = ../../../third_party/libdisasm/ia32_reg.c; sourceTree = SOURCE_ROOT; };
+ 4D2C725A126F9C8000B43EAF /* ia32_operand.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ia32_operand.c; path = ../../../third_party/libdisasm/ia32_operand.c; sourceTree = SOURCE_ROOT; };
+ 4D2C725C126F9C9200B43EAF /* x86_insn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = x86_insn.c; path = ../../../third_party/libdisasm/x86_insn.c; sourceTree = SOURCE_ROOT; };
+ 4D2C7261126F9CBB00B43EAF /* ia32_modrm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ia32_modrm.c; path = ../../../third_party/libdisasm/ia32_modrm.c; sourceTree = SOURCE_ROOT; };
+ 4D2C7263126F9CBB00B43EAF /* x86_imm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = x86_imm.c; path = ../../../third_party/libdisasm/x86_imm.c; sourceTree = SOURCE_ROOT; };
5578003E0BE1F28500EC23E0 /* macho_utilities.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = macho_utilities.cc; path = ../../../common/mac/macho_utilities.cc; sourceTree = SOURCE_ROOT; };
5578003F0BE1F28500EC23E0 /* macho_utilities.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = macho_utilities.h; path = ../../../common/mac/macho_utilities.h; sourceTree = SOURCE_ROOT; };
8B31025311F0D2D400FCF3E4 /* Breakpad.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Breakpad.xcconfig; path = ../../../common/mac/Breakpad.xcconfig; sourceTree = SOURCE_ROOT; };
@@ -174,6 +208,7 @@
8B31FF8611F0C6FB00FCF3E4 /* module.cc */,
8B31FF8711F0C6FB00FCF3E4 /* module.h */,
08FB7795FE84155DC02AAC07 /* breakpad */,
+ 4D2C726E126F9CE200B43EAF /* libdisasm */,
08FB779DFE84155DC02AAC07 /* External Frameworks and Libraries */,
1AB674ADFE9D54B511CA2CBB /* Products */,
);
@@ -207,6 +242,27 @@
name = Products;
sourceTree = "<group>";
};
+ 4D2C726E126F9CE200B43EAF /* libdisasm */ = {
+ isa = PBXGroup;
+ children = (
+ 4D2C7226126F9B0F00B43EAF /* disassembler_x86.cc */,
+ 4D2C724B126F9C3800B43EAF /* ia32_implicit.c */,
+ 4D2C7245126F9C0B00B43EAF /* ia32_insn.c */,
+ 4D2C7232126F9BB000B43EAF /* ia32_invariant.c */,
+ 4D2C7261126F9CBB00B43EAF /* ia32_modrm.c */,
+ 4D2C7249126F9C2300B43EAF /* ia32_opcode_tables.c */,
+ 4D2C725A126F9C8000B43EAF /* ia32_operand.c */,
+ 4D2C724D126F9C4D00B43EAF /* ia32_reg.c */,
+ 4D2C7234126F9BC200B43EAF /* ia32_settings.c */,
+ 4D2C722A126F9B5A00B43EAF /* x86_disasm.c */,
+ 4D2C7263126F9CBB00B43EAF /* x86_imm.c */,
+ 4D2C725C126F9C9200B43EAF /* x86_insn.c */,
+ 4D2C722C126F9B6E00B43EAF /* x86_misc.c */,
+ 4D2C722E126F9B8300B43EAF /* x86_operand_list.c */,
+ );
+ name = libdisasm;
+ sourceTree = "<group>";
+ };
9BDF16F70B1B8ACD00F8391B /* google_breakpad */ = {
isa = PBXGroup;
children = (
@@ -250,6 +306,9 @@
9BDF17280B1B8B0200F8391B /* processor */ = {
isa = PBXGroup;
children = (
+ 4D2C7222126F9AF900B43EAF /* exploitability_win.cc */,
+ 4D2C721E126F9ADE00B43EAF /* exploitability.cc */,
+ 4D2C721A126F9ACC00B43EAF /* source_line_resolver_base.cc */,
D2A5DD621188658B00081F03 /* tokenize.cc */,
D2A5DD4C1188651100081F03 /* cfi_frame_info.cc */,
F9F0706510FBC02D0037B88B /* stackwalker_arm.cc */,
@@ -381,6 +440,23 @@
8B31FF8811F0C6FB00FCF3E4 /* language.cc in Sources */,
8B31FF8911F0C6FB00FCF3E4 /* module.cc in Sources */,
8B31FFC511F0C8AB00FCF3E4 /* dwarf2diehandler.cc in Sources */,
+ 4D2C721B126F9ACC00B43EAF /* source_line_resolver_base.cc in Sources */,
+ 4D2C721F126F9ADE00B43EAF /* exploitability.cc in Sources */,
+ 4D2C7223126F9AF900B43EAF /* exploitability_win.cc in Sources */,
+ 4D2C7227126F9B0F00B43EAF /* disassembler_x86.cc in Sources */,
+ 4D2C722B126F9B5A00B43EAF /* x86_disasm.c in Sources */,
+ 4D2C722D126F9B6E00B43EAF /* x86_misc.c in Sources */,
+ 4D2C722F126F9B8300B43EAF /* x86_operand_list.c in Sources */,
+ 4D2C7233126F9BB000B43EAF /* ia32_invariant.c in Sources */,
+ 4D2C7235126F9BC200B43EAF /* ia32_settings.c in Sources */,
+ 4D2C7246126F9C0B00B43EAF /* ia32_insn.c in Sources */,
+ 4D2C724A126F9C2300B43EAF /* ia32_opcode_tables.c in Sources */,
+ 4D2C724C126F9C3800B43EAF /* ia32_implicit.c in Sources */,
+ 4D2C724E126F9C4D00B43EAF /* ia32_reg.c in Sources */,
+ 4D2C725B126F9C8000B43EAF /* ia32_operand.c in Sources */,
+ 4D2C725D126F9C9200B43EAF /* x86_insn.c in Sources */,
+ 4D2C7264126F9CBB00B43EAF /* ia32_modrm.c in Sources */,
+ 4D2C726D126F9CDC00B43EAF /* x86_imm.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/src/tools/mac/crash_report/on_demand_symbol_supplier.h b/src/tools/mac/crash_report/on_demand_symbol_supplier.h
index 9c0e8b78..2bad776d 100644
--- a/src/tools/mac/crash_report/on_demand_symbol_supplier.h
+++ b/src/tools/mac/crash_report/on_demand_symbol_supplier.h
@@ -61,6 +61,10 @@ class OnDemandSymbolSupplier : public SymbolSupplier {
const SystemInfo *system_info,
string *symbol_file,
string *symbol_data);
+ virtual SymbolResult GetCStringSymbolData(const CodeModule *module,
+ const SystemInfo *system_info,
+ string *symbol_file,
+ char **symbol_data);
protected:
// Search directory
string search_dir_;
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 ad55412f..e1db9203 100644
--- a/src/tools/mac/crash_report/on_demand_symbol_supplier.mm
+++ b/src/tools/mac/crash_report/on_demand_symbol_supplier.mm
@@ -159,6 +159,20 @@ OnDemandSymbolSupplier::GetSymbolFile(const CodeModule *module,
return s;
}
+SymbolSupplier::SymbolResult
+OnDemandSymbolSupplier::GetCStringSymbolData(const CodeModule *module,
+ const SystemInfo *system_info,
+ string *symbol_file,
+ char **symbol_data) {
+ std::string symbol_data_string;
+ SymbolSupplier::SymbolResult result = GetSymbolFile(module,
+ system_info,
+ symbol_file,
+ &symbol_data_string);
+ strcpy(*symbol_data, symbol_data_string.c_str());
+ return result;
+}
+
string OnDemandSymbolSupplier::GetLocalModulePath(const CodeModule *module) {
NSFileManager *mgr = [NSFileManager defaultManager];
const char *moduleStr = module->code_file().c_str();