diff options
Diffstat (limited to 'o3d/breakpad')
-rw-r--r-- | o3d/breakpad/linux/breakpad.cc | 51 | ||||
-rw-r--r-- | o3d/breakpad/linux/breakpad.h | 3 |
2 files changed, 0 insertions, 54 deletions
diff --git a/o3d/breakpad/linux/breakpad.cc b/o3d/breakpad/linux/breakpad.cc index fc285a9..4ef9bc3 100644 --- a/o3d/breakpad/linux/breakpad.cc +++ b/o3d/breakpad/linux/breakpad.cc @@ -55,8 +55,6 @@ static const std::string kBreakpadServer = static const std::string kBreakpadServer = "http://clients2.google.com/cr/report"; #endif -static const std::string kBreakpadDumpFilenameTemplate = - "/tmp/google-o3d-plugin-minidump-XXXXXX"; //TODO(zhurunz): Add/use decent path utility functions. @@ -130,55 +128,6 @@ bool Breakpad::SendDumpFile(const char* filename) { return uploader.Upload(); } -bool Breakpad::GenerateAndSendDumpFile( - const std::map<std::string, std::string>* extra_params) { - - // Create pipe. - int fds[2]; - if (0 != pipe(fds)) - return false; - - std::string filename = kBreakpadDumpFilenameTemplate; - if (NULL == mktemp(const_cast<char*>(filename.c_str()))) { - close(fds[0]); - close(fds[1]); - return false; - } - - // We must breakpad minidump the child process. - // Minidump ourself would crash in breakpad. - const pid_t child = fork(); - if (0 == child) { - close(fds[1]); - char b; - HANDLE_EINTR(read(fds[0], &b, sizeof(b))); - close(fds[0]); - syscall(__NR_exit); - } - if (-1 == child) { - close(fds[0]); - close(fds[1]); - return false; - } - - close(fds[0]); - - // Create minidump. - google_breakpad::ExceptionHandler::CrashContext context; - memset(&context, 0, sizeof(context)); - if (!WriteMinidump(filename.c_str(), child, - &context, sizeof(context))) { - close(fds[1]); - return false; - } - - // Upload minidump. - bool ret = SendDumpFile(filename.c_str()); - unlink(filename.c_str()); - close(fds[1]); - return ret; -} - bool Breakpad::OnBreakpadCallback(const char* dump_path, const char* minidump_id, bool succeeded) { diff --git a/o3d/breakpad/linux/breakpad.h b/o3d/breakpad/linux/breakpad.h index cbba468..ff133a2 100644 --- a/o3d/breakpad/linux/breakpad.h +++ b/o3d/breakpad/linux/breakpad.h @@ -65,9 +65,6 @@ class Breakpad { bool Initialize(); bool Shutdown(); - // Any data in extra_params is currently discarded. - bool GenerateAndSendDumpFile( - const std::map<std::string, std::string>* extra_params); private: static bool BuildDumpFilename(char* filename, |