aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e>2007-05-03 20:12:41 +0000
committerted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e>2007-05-03 20:12:41 +0000
commit255bbe93ed7aef5418000339b6cdb5677bf9e4d6 (patch)
tree86c899bc72e39e4eac5ad3c892ce04a7240bbe2e /src
parentIssue 159: reviewer Waylonis (diff)
downloadbreakpad-255bbe93ed7aef5418000339b6cdb5677bf9e4d6.tar.xz
Issue 152 - Patch by Dave Camp, Reviewer Chris Rogers
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@152 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src')
-rw-r--r--src/client/mac/handler/exception_handler.cc3
-rw-r--r--src/client/mac/handler/minidump_generator.cc17
-rw-r--r--src/client/mac/handler/minidump_generator.h7
-rw-r--r--src/common/mac/dump_syms.mm2
-rw-r--r--src/common/mac/macho_id.cc15
-rw-r--r--src/common/mac/macho_utilities.cc89
-rw-r--r--src/common/mac/macho_utilities.h85
-rw-r--r--src/common/mac/macho_walker.cc3
-rw-r--r--src/tools/mac/crash_report/crash_report.xcodeproj/project.pbxproj8
-rw-r--r--src/tools/mac/dump_syms/dump_syms.xcodeproj/project.pbxproj8
-rw-r--r--src/tools/mac/dump_syms/dump_syms_tool.m1
-rw-r--r--src/tools/mac/symupload/symupload.xcodeproj/project.pbxproj2
12 files changed, 220 insertions, 20 deletions
diff --git a/src/client/mac/handler/exception_handler.cc b/src/client/mac/handler/exception_handler.cc
index 8f87dd83..b61fda89 100644
--- a/src/client/mac/handler/exception_handler.cc
+++ b/src/client/mac/handler/exception_handler.cc
@@ -32,6 +32,7 @@
#include "client/mac/handler/exception_handler.h"
#include "client/mac/handler/minidump_generator.h"
+#include "common/mac/mac_compat.h"
namespace google_breakpad {
@@ -290,7 +291,7 @@ kern_return_t ForwardException(mach_port_t task, mach_port_t failed_thread,
thread_state_flavor_t target_flavor = current.flavors[found];
mach_msg_type_number_t thread_state_count = THREAD_STATE_MAX;
- thread_state_data_t thread_state;
+ breakpad_thread_state_data_t thread_state;
switch (target_behavior) {
case EXCEPTION_DEFAULT:
result = exception_raise(target_port, failed_thread, task, exception,
diff --git a/src/client/mac/handler/minidump_generator.cc b/src/client/mac/handler/minidump_generator.cc
index bdabc1f4..afdce0e5 100644
--- a/src/client/mac/handler/minidump_generator.cc
+++ b/src/client/mac/handler/minidump_generator.cc
@@ -34,6 +34,7 @@
#include <mach-o/dyld.h>
#include <mach-o/loader.h>
#include <sys/sysctl.h>
+#include <sys/resource.h>
#include <CoreFoundation/CoreFoundation.h>
@@ -253,7 +254,7 @@ bool MinidumpGenerator::WriteStackFromStartAddress(
}
#if TARGET_CPU_PPC
-bool MinidumpGenerator::WriteStack(thread_state_data_t state,
+bool MinidumpGenerator::WriteStack(breakpad_thread_state_data_t state,
MDMemoryDescriptor *stack_location) {
ppc_thread_state_t *machine_state =
reinterpret_cast<ppc_thread_state_t *>(state);
@@ -261,14 +262,14 @@ bool MinidumpGenerator::WriteStack(thread_state_data_t state,
return WriteStackFromStartAddress(start_addr, stack_location);
}
-u_int64_t MinidumpGenerator::CurrentPCForStack(thread_state_data_t state) {
+u_int64_t MinidumpGenerator::CurrentPCForStack(breakpad_thread_state_data_t state) {
ppc_thread_state_t *machine_state =
reinterpret_cast<ppc_thread_state_t *>(state);
return machine_state->srr0;
}
-bool MinidumpGenerator::WriteContext(thread_state_data_t state,
+bool MinidumpGenerator::WriteContext(breakpad_thread_state_data_t state,
MDLocationDescriptor *register_location) {
TypedMDRVA<MDRawContextPPC> context(&writer_);
ppc_thread_state_t *machine_state =
@@ -327,7 +328,7 @@ bool MinidumpGenerator::WriteContext(thread_state_data_t state,
}
#elif TARGET_CPU_X86
-bool MinidumpGenerator::WriteStack(thread_state_data_t state,
+bool MinidumpGenerator::WriteStack(breakpad_thread_state_data_t state,
MDMemoryDescriptor *stack_location) {
x86_thread_state_t *machine_state =
reinterpret_cast<x86_thread_state_t *>(state);
@@ -335,14 +336,14 @@ bool MinidumpGenerator::WriteStack(thread_state_data_t state,
return WriteStackFromStartAddress(start_addr, stack_location);
}
-u_int64_t MinidumpGenerator::CurrentPCForStack(thread_state_data_t state) {
+u_int64_t MinidumpGenerator::CurrentPCForStack(breakpad_thread_state_data_t state) {
x86_thread_state_t *machine_state =
reinterpret_cast<x86_thread_state_t *>(state);
return machine_state->uts.ts32.eip;
}
-bool MinidumpGenerator::WriteContext(thread_state_data_t state,
+bool MinidumpGenerator::WriteContext(breakpad_thread_state_data_t state,
MDLocationDescriptor *register_location) {
TypedMDRVA<MDRawContextX86> context(&writer_);
x86_thread_state_t *machine_state =
@@ -378,7 +379,7 @@ bool MinidumpGenerator::WriteContext(thread_state_data_t state,
bool MinidumpGenerator::WriteThreadStream(mach_port_t thread_id,
MDRawThread *thread) {
- thread_state_data_t state;
+ breakpad_thread_state_data_t state;
mach_msg_type_number_t state_count = sizeof(state);
if (thread_get_state(thread_id, MACHINE_THREAD_STATE, state, &state_count) ==
@@ -451,7 +452,7 @@ bool MinidumpGenerator::WriteExceptionStream(MDRawDirectory *exception_stream) {
exception_ptr->exception_record.exception_code = exception_type_;
exception_ptr->exception_record.exception_flags = exception_code_;
- thread_state_data_t state;
+ breakpad_thread_state_data_t state;
mach_msg_type_number_t stateCount = sizeof(state);
if (thread_get_state(exception_thread_, MACHINE_THREAD_STATE, state,
diff --git a/src/client/mac/handler/minidump_generator.h b/src/client/mac/handler/minidump_generator.h
index 9fee9e5a..2251897d 100644
--- a/src/client/mac/handler/minidump_generator.h
+++ b/src/client/mac/handler/minidump_generator.h
@@ -38,6 +38,7 @@
#include "client/minidump_file_writer.h"
#include "google_breakpad/common/minidump_format.h"
+#include "common/mac/mac_compat.h"
#include "dynamic_images.h"
@@ -91,12 +92,12 @@ class MinidumpGenerator {
bool WriteBreakpadInfoStream(MDRawDirectory *breakpad_info_stream);
// Helpers
- u_int64_t CurrentPCForStack(thread_state_data_t state);
+ u_int64_t CurrentPCForStack(breakpad_thread_state_data_t state);
bool WriteStackFromStartAddress(vm_address_t start_addr,
MDMemoryDescriptor *stack_location);
- bool WriteStack(thread_state_data_t state,
+ bool WriteStack(breakpad_thread_state_data_t state,
MDMemoryDescriptor *stack_location);
- bool WriteContext(thread_state_data_t state,
+ bool WriteContext(breakpad_thread_state_data_t state,
MDLocationDescriptor *register_location);
bool WriteThreadStream(mach_port_t thread_id, MDRawThread *thread);
bool WriteCVRecord(MDRawModule *module, int cpu_type,
diff --git a/src/common/mac/dump_syms.mm b/src/common/mac/dump_syms.mm
index b122b54b..427e15b3 100644
--- a/src/common/mac/dump_syms.mm
+++ b/src/common/mac/dump_syms.mm
@@ -38,11 +38,13 @@
#include <mach-o/loader.h>
#include <mach-o/nlist.h>
#include <mach-o/stab.h>
+#include <fcntl.h>
#import <Foundation/Foundation.h>
#import "dump_syms.h"
#import "common/mac/file_id.h"
+#import "common/mac/macho_utilities.h"
using google_breakpad::FileID;
diff --git a/src/common/mac/macho_id.cc b/src/common/mac/macho_id.cc
index e3f90e0c..c45329ed 100644
--- a/src/common/mac/macho_id.cc
+++ b/src/common/mac/macho_id.cc
@@ -47,6 +47,7 @@
#include "common/mac/macho_id.h"
#include "common/mac/macho_walker.h"
+#include "common/mac/macho_utilities.h"
namespace MacFileUtilities {
@@ -142,7 +143,7 @@ void MachoID::Update(MachoWalker *walker, unsigned long offset, size_t size) {
}
bool MachoID::UUIDCommand(int cpu_type, unsigned char bytes[16]) {
- struct uuid_command uuid_cmd;
+ struct breakpad_uuid_command uuid_cmd;
MachoWalker walker(path_, UUIDWalkerCB, &uuid_cmd);
uuid_cmd.cmd = 0;
@@ -284,7 +285,7 @@ bool MachoID::WalkerCB(MachoWalker *walker, load_command *cmd, off_t offset,
return false;
if (swap)
- swap_segment_command_64(&seg64, NXHostByteOrder());
+ breakpad_swap_segment_command_64(&seg64, NXHostByteOrder());
struct mach_header_64 header;
off_t header_offset;
@@ -301,7 +302,7 @@ bool MachoID::WalkerCB(MachoWalker *walker, load_command *cmd, off_t offset,
return false;
if (swap)
- swap_section_64(&sec64, 1, NXHostByteOrder());
+ breakpad_swap_section_64(&sec64, 1, NXHostByteOrder());
macho_id->Update(walker, header_offset + sec64.offset, sec64.size);
offset += sizeof(struct section_64);
@@ -316,13 +317,15 @@ bool MachoID::WalkerCB(MachoWalker *walker, load_command *cmd, off_t offset,
bool MachoID::UUIDWalkerCB(MachoWalker *walker, load_command *cmd, off_t offset,
bool swap, void *context) {
if (cmd->cmd == LC_UUID) {
- struct uuid_command *uuid_cmd = (struct uuid_command *)context;
+ struct breakpad_uuid_command *uuid_cmd =
+ (struct breakpad_uuid_command *)context;
- if (!walker->ReadBytes(uuid_cmd, sizeof(struct uuid_command), offset))
+ if (!walker->ReadBytes(uuid_cmd, sizeof(struct breakpad_uuid_command),
+ offset))
return false;
if (swap)
- swap_uuid_command(uuid_cmd, NXHostByteOrder());
+ breakpad_swap_uuid_command(uuid_cmd, NXHostByteOrder());
return false;
}
diff --git a/src/common/mac/macho_utilities.cc b/src/common/mac/macho_utilities.cc
new file mode 100644
index 00000000..d25de5c8
--- /dev/null
+++ b/src/common/mac/macho_utilities.cc
@@ -0,0 +1,89 @@
+// Copyright (c) 2006, Google Inc.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// macho_utilties.cc: Utilities for dealing with mach-o files
+//
+// Author: Dave Camp
+
+#include "common/mac/macho_utilities.h"
+
+void breakpad_swap_uuid_command(struct breakpad_uuid_command *uc,
+ enum NXByteOrder target_byte_order)
+{
+ uc->cmd = NXSwapLong(uc->cmd);
+ uc->cmdsize = NXSwapLong(uc->cmdsize);
+}
+
+void breakpad_swap_segment_command_64(struct segment_command_64 *sg,
+ enum NXByteOrder target_byte_order)
+{
+ sg->cmd = NXSwapLong(sg->cmd);
+ sg->cmdsize = NXSwapLong(sg->cmdsize);
+
+ sg->vmaddr = NXSwapLongLong(sg->vmaddr);
+ sg->vmsize = NXSwapLongLong(sg->vmsize);
+ sg->fileoff = NXSwapLongLong(sg->fileoff);
+ sg->filesize = NXSwapLongLong(sg->filesize);
+
+ sg->maxprot = NXSwapLong(sg->maxprot);
+ sg->initprot = NXSwapLong(sg->initprot);
+ sg->nsects = NXSwapLong(sg->nsects);
+ sg->flags = NXSwapLong(sg->flags);
+}
+
+void breakpad_swap_mach_header_64(struct mach_header_64 *mh,
+ enum NXByteOrder target_byte_order)
+{
+ mh->magic = NXSwapLong(mh->magic);
+ mh->cputype = NXSwapLong(mh->cputype);
+ mh->cpusubtype = NXSwapLong(mh->cpusubtype);
+ mh->filetype = NXSwapLong(mh->filetype);
+ mh->ncmds = NXSwapLong(mh->ncmds);
+ mh->sizeofcmds = NXSwapLong(mh->sizeofcmds);
+ mh->flags = NXSwapLong(mh->flags);
+ mh->reserved = NXSwapLong(mh->reserved);
+}
+
+void breakpad_swap_section_64(struct section_64 *s,
+ uint32_t nsects,
+ enum NXByteOrder target_byte_order)
+{
+ for (uint32_t i = 0; i < nsects; i++) {
+ s[i].addr = NXSwapLongLong(s[i].addr);
+ s[i].size = NXSwapLongLong(s[i].size);
+
+ s[i].offset = NXSwapLong(s[i].offset);
+ s[i].align = NXSwapLong(s[i].align);
+ s[i].reloff = NXSwapLong(s[i].reloff);
+ s[i].nreloc = NXSwapLong(s[i].nreloc);
+ s[i].flags = NXSwapLong(s[i].flags);
+ s[i].reserved1 = NXSwapLong(s[i].reserved1);
+ s[i].reserved2 = NXSwapLong(s[i].reserved2);
+ }
+}
diff --git a/src/common/mac/macho_utilities.h b/src/common/mac/macho_utilities.h
new file mode 100644
index 00000000..aa7d2fb6
--- /dev/null
+++ b/src/common/mac/macho_utilities.h
@@ -0,0 +1,85 @@
+// Copyright (c) 2006, Google Inc.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// macho_utilities.h: Utilities for dealing with mach-o files
+//
+// Author: Dave Camp
+
+#ifndef COMMON_MAC_MACHO_UTILITIES_H__
+#define COMMON_MAC_MACHO_UTILITIES_H__
+
+#include <mach-o/loader.h>
+#include <mach/thread_status.h>
+
+/* Some #defines and structs that aren't defined in older SDKs */
+#ifndef CPU_ARCH_ABI64
+# define CPU_ARCH_ABI64 0x01000000
+#endif
+
+#ifndef CPU_TYPE_X86
+# define CPU_TYPE_X86 CPU_TYPE_I386
+#endif
+
+#ifndef CPU_TYPE_POWERPC64
+# define CPU_TYPE_POWERPC64 (CPU_TYPE_POWERPC | CPU_ARCH_ABI64)
+#endif
+
+#ifndef LC_UUID
+# define LC_UUID 0x1b /* the uuid */
+#endif
+
+
+// The uuid_command struct/swap routines were added during the 10.4 series.
+// Their presence isn't guaranteed.
+struct breakpad_uuid_command {
+ uint32_t cmd; /* LC_UUID */
+ uint32_t cmdsize; /* sizeof(struct uuid_command) */
+ uint8_t uuid[16]; /* the 128-bit uuid */
+};
+
+void breakpad_swap_uuid_command(struct breakpad_uuid_command *uc,
+ enum NXByteOrder target_byte_order);
+
+// Older SDKs defines thread_state_data_t as an int[] instead
+// of the natural_t[] it should be.
+typedef natural_t breakpad_thread_state_data_t[THREAD_STATE_MAX];
+
+// The 64-bit swap routines were added during the 10.4 series, their
+// presence isn't guaranteed.
+void breakpad_swap_segment_command_64(struct segment_command_64 *sg,
+ enum NXByteOrder target_byte_order);
+
+void breakpad_swap_mach_header_64(struct mach_header_64 *mh,
+ enum NXByteOrder target_byte_order);
+
+void breakpad_swap_section_64(struct section_64 *s,
+ uint32_t nsects,
+ enum NXByteOrder target_byte_order);
+
+#endif \ No newline at end of file
diff --git a/src/common/mac/macho_walker.cc b/src/common/mac/macho_walker.cc
index cd66529d..9f56701b 100644
--- a/src/common/mac/macho_walker.cc
+++ b/src/common/mac/macho_walker.cc
@@ -42,6 +42,7 @@
#include <unistd.h>
#include "common/mac/macho_walker.h"
+#include "common/mac/macho_utilities.h"
namespace MacFileUtilities {
@@ -204,7 +205,7 @@ bool MachoWalker::WalkHeader64AtOffset(off_t offset) {
bool swap = (header.magic == MH_CIGAM_64);
if (swap)
- swap_mach_header_64(&header, NXHostByteOrder());
+ breakpad_swap_mach_header_64(&header, NXHostByteOrder());
current_header_ = &header;
current_header_size_ = sizeof(header);
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 569073bb..0445d16e 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,8 @@
objects = {
/* Begin PBXBuildFile section */
+ 557800400BE1F28500EC23E0 /* macho_utilities.cc in Sources */ = {isa = PBXBuildFile; fileRef = 5578003E0BE1F28500EC23E0 /* macho_utilities.cc */; };
+ 557800410BE1F28500EC23E0 /* macho_utilities.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5578003F0BE1F28500EC23E0 /* macho_utilities.h */; };
8DD76F9A0486AA7600D96B5E /* crash_report.mm in Sources */ = {isa = PBXBuildFile; fileRef = 08FB7796FE84155DC02AAC07 /* crash_report.mm */; settings = {ATTRIBUTES = (); }; };
8DD76F9C0486AA7600D96B5E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08FB779EFE84155DC02AAC07 /* Foundation.framework */; };
9B35FEE40B2675F9008DE8C7 /* code_module.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9B35FEE20B2675F9008DE8C7 /* code_module.h */; };
@@ -65,6 +67,7 @@
9BE650B50B52FE3000611104 /* macho_id.h in CopyFiles */,
9BE650B70B52FE3000611104 /* macho_walker.h in CopyFiles */,
9B44619E0B66C66B00BBB817 /* system_info.h in CopyFiles */,
+ 557800410BE1F28500EC23E0 /* macho_utilities.h in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 1;
};
@@ -73,6 +76,8 @@
/* 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 = "<absolute>"; };
+ 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; };
8DD76FA10486AA7600D96B5E /* crash_report */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = crash_report; sourceTree = BUILT_PRODUCTS_DIR; };
9B35FEE20B2675F9008DE8C7 /* code_module.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = code_module.h; path = ../../../google_breakpad/processor/code_module.h; sourceTree = SOURCE_ROOT; };
9B35FEE30B2675F9008DE8C7 /* code_modules.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = code_modules.h; path = ../../../google_breakpad/processor/code_modules.h; sourceTree = SOURCE_ROOT; };
@@ -133,6 +138,8 @@
08FB7794FE84155DC02AAC07 /* crash_report */ = {
isa = PBXGroup;
children = (
+ 5578003E0BE1F28500EC23E0 /* macho_utilities.cc */,
+ 5578003F0BE1F28500EC23E0 /* macho_utilities.h */,
9BDF192D0B1BC15D00F8391B /* dump_syms.h */,
9BDF192E0B1BC15D00F8391B /* dump_syms.mm */,
08FB7796FE84155DC02AAC07 /* crash_report.mm */,
@@ -304,6 +311,7 @@
9BE650B20B52FE3000611104 /* file_id.cc in Sources */,
9BE650B40B52FE3000611104 /* macho_id.cc in Sources */,
9BE650B60B52FE3000611104 /* macho_walker.cc in Sources */,
+ 557800400BE1F28500EC23E0 /* macho_utilities.cc in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/src/tools/mac/dump_syms/dump_syms.xcodeproj/project.pbxproj b/src/tools/mac/dump_syms/dump_syms.xcodeproj/project.pbxproj
index 80f94097..3a19cb96 100644
--- a/src/tools/mac/dump_syms/dump_syms.xcodeproj/project.pbxproj
+++ b/src/tools/mac/dump_syms/dump_syms.xcodeproj/project.pbxproj
@@ -7,6 +7,8 @@
objects = {
/* Begin PBXBuildFile section */
+ 5578008B0BE1F3AB00EC23E0 /* macho_utilities.cc in Sources */ = {isa = PBXBuildFile; fileRef = 557800890BE1F3AB00EC23E0 /* macho_utilities.cc */; };
+ 5578008C0BE1F3AB00EC23E0 /* macho_utilities.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5578008A0BE1F3AB00EC23E0 /* macho_utilities.h */; };
8DD76F9A0486AA7600D96B5E /* dump_syms.mm in Sources */ = {isa = PBXBuildFile; fileRef = 08FB7796FE84155DC02AAC07 /* dump_syms.mm */; settings = {ATTRIBUTES = (); }; };
8DD76F9C0486AA7600D96B5E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08FB779EFE84155DC02AAC07 /* Foundation.framework */; };
9BDF186F0B1BB43700F8391B /* dump_syms.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9BDF186D0B1BB43700F8391B /* dump_syms.h */; };
@@ -30,6 +32,7 @@
9BE650480B52F6D800611104 /* file_id.h in CopyFiles */,
9BE6504A0B52F6D800611104 /* macho_id.h in CopyFiles */,
9BE6504C0B52F6D800611104 /* macho_walker.h in CopyFiles */,
+ 5578008C0BE1F3AB00EC23E0 /* macho_utilities.h in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 1;
};
@@ -38,6 +41,8 @@
/* Begin PBXFileReference section */
08FB7796FE84155DC02AAC07 /* dump_syms.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = dump_syms.mm; path = ../../../common/mac/dump_syms.mm; sourceTree = "<group>"; };
08FB779EFE84155DC02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
+ 557800890BE1F3AB00EC23E0 /* macho_utilities.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = macho_utilities.cc; path = ../../../common/mac/macho_utilities.cc; sourceTree = SOURCE_ROOT; };
+ 5578008A0BE1F3AB00EC23E0 /* macho_utilities.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = macho_utilities.h; path = ../../../common/mac/macho_utilities.h; sourceTree = SOURCE_ROOT; };
8DD76FA10486AA7600D96B5E /* dump_syms */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = dump_syms; sourceTree = BUILT_PRODUCTS_DIR; };
9BDF186D0B1BB43700F8391B /* dump_syms.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = dump_syms.h; path = ../../../common/mac/dump_syms.h; sourceTree = "<group>"; };
9BDF186E0B1BB43700F8391B /* dump_syms_tool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = dump_syms_tool.m; sourceTree = "<group>"; };
@@ -64,6 +69,8 @@
08FB7794FE84155DC02AAC07 /* dump_syms */ = {
isa = PBXGroup;
children = (
+ 557800890BE1F3AB00EC23E0 /* macho_utilities.cc */,
+ 5578008A0BE1F3AB00EC23E0 /* macho_utilities.h */,
9BE650410B52F6D800611104 /* file_id.cc */,
9BE650420B52F6D800611104 /* file_id.h */,
9BE650430B52F6D800611104 /* macho_id.cc */,
@@ -141,6 +148,7 @@
9BE650470B52F6D800611104 /* file_id.cc in Sources */,
9BE650490B52F6D800611104 /* macho_id.cc in Sources */,
9BE6504B0B52F6D800611104 /* macho_walker.cc in Sources */,
+ 5578008B0BE1F3AB00EC23E0 /* macho_utilities.cc in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/src/tools/mac/dump_syms/dump_syms_tool.m b/src/tools/mac/dump_syms/dump_syms_tool.m
index df455d05..3729a8d5 100644
--- a/src/tools/mac/dump_syms/dump_syms_tool.m
+++ b/src/tools/mac/dump_syms/dump_syms_tool.m
@@ -34,6 +34,7 @@
#include <mach-o/arch.h>
#include "dump_syms.h"
+#include "common/mac/macho_utilities.h"
typedef struct {
NSString *srcPath;
diff --git a/src/tools/mac/symupload/symupload.xcodeproj/project.pbxproj b/src/tools/mac/symupload/symupload.xcodeproj/project.pbxproj
index f9550364..d2f4a1ca 100644
--- a/src/tools/mac/symupload/symupload.xcodeproj/project.pbxproj
+++ b/src/tools/mac/symupload/symupload.xcodeproj/project.pbxproj
@@ -31,7 +31,7 @@
/* Begin PBXFileReference section */
08FB7796FE84155DC02AAC07 /* symupload.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = symupload.m; sourceTree = "<group>"; };
08FB779EFE84155DC02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
- 8DD76FA10486AA7600D96B5E /* symupload */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "compiled.mach-o.executable"; path = symupload; sourceTree = BUILT_PRODUCTS_DIR; };
+ 8DD76FA10486AA7600D96B5E /* symupload */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = symupload; sourceTree = BUILT_PRODUCTS_DIR; };
9BD833680B03E4080055103E /* HTTPMultipartUpload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPMultipartUpload.h; path = ../../../common/mac/HTTPMultipartUpload.h; sourceTree = "<group>"; };
9BD833690B03E4080055103E /* HTTPMultipartUpload.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTTPMultipartUpload.m; path = ../../../common/mac/HTTPMultipartUpload.m; sourceTree = "<group>"; };
9BD835FB0B0544950055103E /* minidump_upload */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = minidump_upload; sourceTree = BUILT_PRODUCTS_DIR; };