mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2025-07-09 13:00:33 +00:00
Modification to crash_report to process a directory of .DMP files
http://breakpad.appspot.com/31001 R=nealsid A=krisr git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@405 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
b73230385c
commit
c84c9e7bb3
|
@ -222,10 +222,8 @@ static void PrintModules(const CodeModules *modules) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
static void ProcessSingleReport(Options *options, NSString *file_path) {
|
||||||
static void Start(Options *options) {
|
string minidump_file([file_path fileSystemRepresentation]);
|
||||||
string minidump_file([options->minidumpPath fileSystemRepresentation]);
|
|
||||||
|
|
||||||
BasicSourceLineResolver resolver;
|
BasicSourceLineResolver resolver;
|
||||||
string search_dir = options->searchDir ?
|
string search_dir = options->searchDir ?
|
||||||
[options->searchDir fileSystemRepresentation] : "";
|
[options->searchDir fileSystemRepresentation] : "";
|
||||||
|
@ -309,6 +307,31 @@ static void Start(Options *options) {
|
||||||
PrintModules(process_state.modules());
|
PrintModules(process_state.modules());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
static void Start(Options *options) {
|
||||||
|
NSFileManager *manager = [NSFileManager defaultManager];
|
||||||
|
NSString *minidump_path = options->minidumpPath;
|
||||||
|
BOOL is_dir = NO;
|
||||||
|
BOOL file_exists = [manager fileExistsAtPath:minidump_path
|
||||||
|
isDirectory:&is_dir];
|
||||||
|
if (file_exists && is_dir) {
|
||||||
|
NSDirectoryEnumerator *enumerator =
|
||||||
|
[manager enumeratorAtPath:minidump_path];
|
||||||
|
NSString *current_file = nil;
|
||||||
|
while ((current_file = [enumerator nextObject])) {
|
||||||
|
if ([[current_file pathExtension] isEqualTo:@"dmp"]) {
|
||||||
|
printf("Attempting to process report: %s\n",
|
||||||
|
[current_file cStringUsingEncoding:NSASCIIStringEncoding]);
|
||||||
|
NSString *full_path =
|
||||||
|
[minidump_path stringByAppendingPathComponent:current_file];
|
||||||
|
ProcessSingleReport(options, full_path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (file_exists) {
|
||||||
|
ProcessSingleReport(options, minidump_path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
static void Usage(int argc, const char *argv[]) {
|
static void Usage(int argc, const char *argv[]) {
|
||||||
fprintf(stderr, "Convert a minidump to a crash report. Breakpad symbol "
|
fprintf(stderr, "Convert a minidump to a crash report. Breakpad symbol "
|
||||||
|
|
Loading…
Reference in a new issue