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:
ivan.penkov@gmail.com
2012-06-28 22:46:01 +00:00
parent 93cebf538e
commit 6de969a304
103 changed files with 521 additions and 385 deletions

View File

@@ -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);

View File

@@ -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