summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2018-03-20 13:12:10 (GMT)
committerTobias Markmann <tm@ayena.de>2018-03-20 14:48:04 (GMT)
commitf2c2c7d035029fb9615b42c18ccea83e8e705b10 (patch)
tree2f56fb77de0f366528395f21732d418f016f63b5 /3rdParty/Breakpad/src/common/mac/macho_id.h
parent44581c5285d13c0ec715b35ddc79177e5ebeef39 (diff)
parent5ba3f18ad8efa040d49f36d83ec2e7891a9add9f (diff)
downloadswift-f2c2c7d035029fb9615b42c18ccea83e8e705b10.zip
swift-f2c2c7d035029fb9615b42c18ccea83e8e705b10.tar.bz2
Merge branch 'swift-4.x'swift-5.0alpha2
* swift-4.x: (44 commits) Test-Information: Builds on macOS 10.13.3 with clang trunk. Change-Id: If50381f103b0ad18d038b920d3d43537642141cb
Diffstat (limited to '3rdParty/Breakpad/src/common/mac/macho_id.h')
-rw-r--r--3rdParty/Breakpad/src/common/mac/macho_id.h33
1 files changed, 22 insertions, 11 deletions
diff --git a/3rdParty/Breakpad/src/common/mac/macho_id.h b/3rdParty/Breakpad/src/common/mac/macho_id.h
index ccb126d..1037549 100644
--- a/3rdParty/Breakpad/src/common/mac/macho_id.h
+++ b/3rdParty/Breakpad/src/common/mac/macho_id.h
@@ -35,6 +35,7 @@
#define COMMON_MAC_MACHO_ID_H__
#include <limits.h>
+#include <mach/machine.h>
#include <mach-o/loader.h>
#include "common/mac/macho_walker.h"
@@ -48,22 +49,32 @@ class MachoID {
MachoID(const char *path, void *memory, size_t size);
~MachoID();
- // For the given |cpu_type|, return a UUID from the LC_UUID command.
+ // For the given |cpu_type| and |cpu_subtype|, return a UUID from the LC_UUID
+ // command.
// Return false if there isn't a LC_UUID command.
- bool UUIDCommand(int cpu_type, unsigned char identifier[16]);
+ bool UUIDCommand(cpu_type_t cpu_type,
+ cpu_subtype_t cpu_subtype,
+ unsigned char identifier[16]);
- // For the given |cpu_type|, return a UUID from the LC_ID_DYLIB command.
+ // For the given |cpu_type| and |cpu_subtype|, return a UUID from the
+ // LC_ID_DYLIB command.
// Return false if there isn't a LC_ID_DYLIB command.
- bool IDCommand(int cpu_type, unsigned char identifier[16]);
+ bool IDCommand(cpu_type_t cpu_type,
+ cpu_subtype_t cpu_subtype,
+ unsigned char identifier[16]);
- // For the given |cpu_type|, return the Adler32 CRC for the mach-o data
- // segment(s).
+ // For the given |cpu_type| and |cpu_subtype|, return the Adler32 CRC for the
+ // mach-o data segment(s).
// Return 0 on error (e.g., if the file is not a mach-o file)
- uint32_t Adler32(int cpu_type);
+ uint32_t Adler32(cpu_type_t cpu_type,
+ cpu_subtype_t cpu_subtype);
- // For the given |cpu_type|, return the MD5 for the mach-o data segment(s).
+ // For the given |cpu_type|, and |cpu_subtype| return the MD5 for the mach-o
+ // data segment(s).
// Return true on success, false otherwise
- bool MD5(int cpu_type, unsigned char identifier[16]);
+ bool MD5(cpu_type_t cpu_type,
+ cpu_subtype_t cpu_subtype,
+ unsigned char identifier[16]);
private:
// Signature of class member function to be called with data read from file
@@ -81,8 +92,8 @@ class MachoID {
void Update(MachoWalker *walker, off_t offset, size_t size);
// Factory for the MachoWalker
- bool WalkHeader(int cpu_type, MachoWalker::LoadCommandCallback callback,
- void *context);
+ bool WalkHeader(cpu_type_t cpu_type, cpu_subtype_t cpu_subtype,
+ MachoWalker::LoadCommandCallback callback, void *context);
// The callback from the MachoWalker for CRC and MD5
static bool WalkerCB(MachoWalker *walker, load_command *cmd, off_t offset,