1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-30 09:10:53 +02:00

* Updated breakpad to latest version.

This commit is contained in:
Christian Muehlhaeuser
2012-06-24 18:25:34 +02:00
parent 0a3a9a7e97
commit d3eb5c3f88
186 changed files with 9184 additions and 5835 deletions

View File

@@ -37,15 +37,15 @@
#include <limits.h>
#include <mach-o/loader.h>
#include "common/mac/macho_walker.h"
#include "common/md5.h"
namespace MacFileUtilities {
class MachoWalker;
class MachoID {
public:
MachoID(const char *path);
MachoID(const char *path, void *memory, size_t size);
~MachoID();
// For the given |cpu_type|, return a UUID from the LC_UUID command.
@@ -80,6 +80,10 @@ class MachoID {
// Bottleneck for update routines
void Update(MachoWalker *walker, off_t offset, size_t size);
// Factory for the MachoWalker
bool WalkHeader(int cpu_type, 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,
bool swap, void *context);
@@ -95,14 +99,17 @@ class MachoID {
// File path
char path_[PATH_MAX];
// File descriptor
int file_;
// Memory region to read from
void *memory_;
// Size of the memory region
size_t memory_size_;
// The current crc value
uint32_t crc_;
// The MD5 context
MD5Context md5_context_;
google_breakpad::MD5Context md5_context_;
// The current update to call from the Update callback
UpdateFunction update_function_;