mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2026-03-05 20:16:32 +00:00
Changes to get the breakpad client compiling and running on Android using
ndk-7b. Patch by Carlos Valdivia <carlosvaldivia@google.com> Review URL: https://breakpad.appspot.com/363001/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@945 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
@@ -32,12 +32,24 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "client/linux/minidump_writer/minidump_writer.h"
|
||||
#include "client/linux/minidump_writer/linux_core_dumper.h"
|
||||
|
||||
using google_breakpad::MappingList;
|
||||
using google_breakpad::LinuxCoreDumper;
|
||||
|
||||
static int ShowUsage(const char* argv0) {
|
||||
fprintf(stderr, "Usage: %s <core file> <procfs dir> <output>\n", argv0);
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool WriteMinidumpFromCore(const char* filename,
|
||||
const char* core_path,
|
||||
const char* procfs_override) {
|
||||
MappingList mappings;
|
||||
LinuxCoreDumper dumper(0, core_path, procfs_override);
|
||||
return google_breakpad::WriteMinidump(filename, mappings, &dumper);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
if (argc != 4) {
|
||||
return ShowUsage(argv[0]);
|
||||
@@ -46,9 +58,9 @@ int main(int argc, char *argv[]) {
|
||||
const char* core_file = argv[1];
|
||||
const char* procfs_dir = argv[2];
|
||||
const char* minidump_file = argv[3];
|
||||
if (!google_breakpad::WriteMinidumpFromCore(minidump_file,
|
||||
core_file,
|
||||
procfs_dir)) {
|
||||
if (!WriteMinidumpFromCore(minidump_file,
|
||||
core_file,
|
||||
procfs_dir)) {
|
||||
fprintf(stderr, "Unable to generate minidump.\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user