diff options
Diffstat (limited to 'breakpad')
-rw-r--r-- | breakpad/breakpad.gyp | 7 | ||||
-rw-r--r-- | breakpad/linux/generate-test-dump.cc | 13 |
2 files changed, 12 insertions, 8 deletions
diff --git a/breakpad/breakpad.gyp b/breakpad/breakpad.gyp index 64dbb2d..cbed22c 100644 --- a/breakpad/breakpad.gyp +++ b/breakpad/breakpad.gyp @@ -440,6 +440,8 @@ 'src/common/linux/elfutils.h', 'src/common/linux/file_id.cc', 'src/common/linux/file_id.h', + 'src/common/linux/linux_libc_support.cc', + 'src/common/linux/linux_libc_support.h', 'src/common/linux/memory_mapped_file.cc', 'src/common/linux/memory_mapped_file.h', 'src/common/linux/guid_creator.h', @@ -476,6 +478,9 @@ 'src/client/linux/crash_generation/crash_generation_client.cc', 'src/client/linux/crash_generation/crash_generation_client.h', 'src/client/linux/handler/exception_handler.cc', + 'src/client/linux/handler/exception_handler.h', + 'src/client/linux/handler/minidump_descriptor.cc', + 'src/client/linux/handler/minidump_descriptor.h', 'src/client/linux/log/log.cc', 'src/client/linux/log/log.h', 'src/client/linux/minidump_writer/directory_reader.h', @@ -505,6 +510,7 @@ 'src/common/linux/guid_creator.h', 'src/common/linux/libcurl_wrapper.cc', 'src/common/linux/libcurl_wrapper.h', + 'src/common/linux/linux_libc_support.cc', 'src/common/linux/linux_libc_support.h', 'src/common/linux/memory_mapped_file.cc', 'src/common/linux/memory_mapped_file.h', @@ -586,7 +592,6 @@ 'src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc', 'src/client/linux/minidump_writer/minidump_writer_unittest.cc', 'src/client/linux/minidump_writer/minidump_writer_unittest_utils.cc', - 'src/client/linux/minidump_writer/minidump_writer_unittest_utils.h', 'src/common/linux/elf_core_dump_unittest.cc', 'src/common/linux/file_id_unittest.cc', 'src/common/linux/linux_libc_support_unittest.cc', diff --git a/breakpad/linux/generate-test-dump.cc b/breakpad/linux/generate-test-dump.cc index f933ab4..b0dca00 100644 --- a/breakpad/linux/generate-test-dump.cc +++ b/breakpad/linux/generate-test-dump.cc @@ -37,7 +37,7 @@ #include "breakpad/src/common/linux/linux_libc_support.h" #include "third_party/lss/linux_syscall_support.h" -static bool DumpCallback(const char* dump_path, const char* minidump_id, +static bool DumpCallback(const google_breakpad::MinidumpDescriptor& descriptor, void* context, bool success) { if (!success) { static const char msg[] = "Failed to write minidump\n"; @@ -47,10 +47,8 @@ static bool DumpCallback(const char* dump_path, const char* minidump_id, static const char msg[] = "Wrote minidump: "; sys_write(2, msg, sizeof(msg) - 1); - sys_write(2, dump_path, my_strlen(dump_path)); - sys_write(2, "/", 1); - sys_write(2, minidump_id, my_strlen(minidump_id)); - sys_write(2, ".dmp\n", 5); + sys_write(2, descriptor.path(), strlen(descriptor.path())); + sys_write(2, "\n", 1); return true; } @@ -61,8 +59,9 @@ static void DoSomethingWhichCrashes() { } int main() { - google_breakpad::ExceptionHandler breakpad(".", NULL, DumpCallback, NULL, - true); + google_breakpad::MinidumpDescriptor minidump("."); + google_breakpad::ExceptionHandler breakpad(minidump, NULL, DumpCallback, NULL, + true, -1); DoSomethingWhichCrashes(); return 0; } |