mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2026-03-25 17:52:58 +00:00
This change allows compiling the google-breakpad code using a global ::string class instead of std::string. For more details take a look at common/using_std_string.h
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@974 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
@@ -46,6 +46,7 @@
|
||||
#include "common/linux/eintr_wrapper.h"
|
||||
#include "common/tests/auto_tempdir.h"
|
||||
#include "common/tests/file_utils.h"
|
||||
#include "common/using_std_string.h"
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -97,11 +98,11 @@ bool CrashGenerator::HasDefaultCorePattern() const {
|
||||
buffer_size == 5 && memcmp(buffer, "core", 4) == 0;
|
||||
}
|
||||
|
||||
std::string CrashGenerator::GetCoreFilePath() const {
|
||||
string CrashGenerator::GetCoreFilePath() const {
|
||||
return temp_dir_.path() + "/core";
|
||||
}
|
||||
|
||||
std::string CrashGenerator::GetDirectoryOfProcFilesCopy() const {
|
||||
string CrashGenerator::GetDirectoryOfProcFilesCopy() const {
|
||||
return temp_dir_.path() + "/proc";
|
||||
}
|
||||
|
||||
@@ -170,7 +171,7 @@ bool CrashGenerator::CreateChildCrash(
|
||||
}
|
||||
if (SetCoreFileSizeLimit(kCoreSizeLimit)) {
|
||||
CreateThreadsInChildProcess(num_threads);
|
||||
std::string proc_dir = GetDirectoryOfProcFilesCopy();
|
||||
string proc_dir = GetDirectoryOfProcFilesCopy();
|
||||
if (mkdir(proc_dir.c_str(), 0755) == -1) {
|
||||
perror("CrashGenerator: Failed to create proc directory");
|
||||
exit(1);
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "common/tests/auto_tempdir.h"
|
||||
#include "common/using_std_string.h"
|
||||
|
||||
namespace google_breakpad {
|
||||
|
||||
@@ -59,10 +60,10 @@ class CrashGenerator {
|
||||
bool HasDefaultCorePattern() const;
|
||||
|
||||
// Returns the expected path of the core dump file.
|
||||
std::string GetCoreFilePath() const;
|
||||
string GetCoreFilePath() const;
|
||||
|
||||
// Returns the directory of a copy of proc files of the child process.
|
||||
std::string GetDirectoryOfProcFilesCopy() const;
|
||||
string GetDirectoryOfProcFilesCopy() const;
|
||||
|
||||
// Creates a crash (and a core dump file) by creating a child process with
|
||||
// |num_threads| threads, and the terminating the child process by sending
|
||||
|
||||
Reference in New Issue
Block a user