summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/Breakpad')
-rw-r--r--3rdParty/Breakpad/01_breakpad_filename_prefix.diff66
-rw-r--r--3rdParty/Breakpad/SConscript148
-rw-r--r--3rdParty/Breakpad/src/client/windows/handler/exception_handler.cc6
-rw-r--r--3rdParty/Breakpad/src/client/windows/handler/exception_handler.h10
4 files changed, 154 insertions, 76 deletions
diff --git a/3rdParty/Breakpad/01_breakpad_filename_prefix.diff b/3rdParty/Breakpad/01_breakpad_filename_prefix.diff
new file mode 100644
index 0000000..b63180d
--- /dev/null
+++ b/3rdParty/Breakpad/01_breakpad_filename_prefix.diff
@@ -0,0 +1,66 @@
+diff --git a/3rdParty/Breakpad/src/client/windows/handler/exception_handler.cc b/3rdParty/Breakpad/src/client/windows/handler/exception_handler.cc
+index 6e5b724..272ca5f 100644
+--- a/3rdParty/Breakpad/src/client/windows/handler/exception_handler.cc
++++ b/3rdParty/Breakpad/src/client/windows/handler/exception_handler.cc
+@@ -124,6 +124,7 @@ void ExceptionHandler::Initialize(const wstring& dump_path,
+ callback_ = callback;
+ callback_context_ = callback_context;
+ dump_path_c_ = NULL;
++ dump_filename_prefix_c_ = NULL;
+ next_minidump_id_c_ = NULL;
+ next_minidump_path_c_ = NULL;
+ dbghelp_module_ = NULL;
+@@ -217,6 +218,7 @@ void ExceptionHandler::Initialize(const wstring& dump_path,
+
+ // set_dump_path calls UpdateNextID. This sets up all of the path and id
+ // strings, and their equivalent c_str pointers.
++ set_dump_filename_prefix(wstring());
+ set_dump_path(dump_path);
+ }
+
+@@ -914,8 +916,8 @@ void ExceptionHandler::UpdateNextID() {
+ next_minidump_id_c_ = next_minidump_id_.c_str();
+
+ wchar_t minidump_path[MAX_PATH];
+- swprintf(minidump_path, MAX_PATH, L"%s\\%s.dmp",
+- dump_path_c_, next_minidump_id_c_);
++ swprintf(minidump_path, MAX_PATH, L"%s\\%s%s.dmp",
++ dump_path_c_, dump_filename_prefix_c_, next_minidump_id_c_);
+
+ // remove when VC++7.1 is no longer supported
+ minidump_path[MAX_PATH - 1] = L'\0';
+diff --git a/3rdParty/Breakpad/src/client/windows/handler/exception_handler.h b/3rdParty/Breakpad/src/client/windows/handler/exception_handler.h
+index 09f5177..6f59348 100644
+--- a/3rdParty/Breakpad/src/client/windows/handler/exception_handler.h
++++ b/3rdParty/Breakpad/src/client/windows/handler/exception_handler.h
+@@ -188,6 +188,12 @@ class ExceptionHandler {
+ UpdateNextID(); // Necessary to put dump_path_ in next_minidump_path_.
+ }
+
++ void set_dump_filename_prefix(const wstring& dump_prefix) {
++ dump_filename_prefix_ = dump_prefix;
++ dump_filename_prefix_c_ = dump_filename_prefix_.c_str();
++ UpdateNextID();
++ }
++
+ // Requests that a previously reported crash be uploaded.
+ bool RequestUpload(DWORD crash_id);
+
+@@ -313,6 +319,9 @@ class ExceptionHandler {
+ // argument to the constructor, or set_dump_path.
+ wstring dump_path_;
+
++ // The filename prefix used for the minidump files.
++ wstring dump_filename_prefix_;
++
+ // The basename of the next minidump to be written, without the extension.
+ wstring next_minidump_id_;
+
+@@ -327,6 +336,7 @@ class ExceptionHandler {
+ // should be equivalent to the lifetimes of the associated wstring, provided
+ // that the wstrings are not altered.
+ const wchar_t* dump_path_c_;
++ const wchar_t* dump_filename_prefix_c_;
+ const wchar_t* next_minidump_id_c_;
+ const wchar_t* next_minidump_path_c_;
+
diff --git a/3rdParty/Breakpad/SConscript b/3rdParty/Breakpad/SConscript
index 142634b..3b9447d 100644
--- a/3rdParty/Breakpad/SConscript
+++ b/3rdParty/Breakpad/SConscript
@@ -7,91 +7,91 @@ if env["PLATFORM"] == "win32" :
# Module flags
################################################################################
- if env["SCONS_STAGE"] == "flags" :
- env["HAVE_BREAKPAD"] = True
- env["BREAKPAD_FLAGS"] = {
- "CPPPATH": [env.Dir("src")],
- "CPPFLAGS": [],
- "LIBPATH": [env.Dir(".")],
- "LIBS": ["Swift_BreakPad"]
- }
+ if env["SCONS_STAGE"] == "flags" :
+ env["HAVE_BREAKPAD"] = True
+ env["BREAKPAD_FLAGS"] = {
+ "CPPPATH": [env.Dir("src")],
+ "CPPFLAGS": [],
+ "LIBPATH": [env.Dir(".")],
+ "LIBS": ["Swift_BreakPad"]
+ }
################################################################################
# Build
################################################################################
- if env["SCONS_STAGE"] == "build" :
- myenv = env.Clone()
- myenv.Replace(CXXFLAGS = [flag for flag in env["CXXFLAGS"] if not flag.startswith("-W")])
- myenv.Append(CPPPATH = ["src"])
+ if env["SCONS_STAGE"] == "build" :
+ myenv = env.Clone()
+ myenv.Replace(CXXFLAGS = [flag for flag in env["CXXFLAGS"] if not flag.startswith("-W")])
+ myenv.Append(CPPPATH = ["src"])
- lib_sources = []
- dumpsyms_sources = []
- common_sources = []
- if myenv["PLATFORM"] == "win32" :
- myenv.Append(CPPDEFINES = ["UNICODE"])
- lib_sources += [
- "src/client/windows/handler/exception_handler.cc",
- "src/client/windows/crash_generation/crash_generation_client.cc",
- "src/common/windows/guid_string.cc",
- ]
+ lib_sources = []
+ dumpsyms_sources = []
+ common_sources = []
+ if myenv["PLATFORM"] == "win32" :
+ myenv.Append(CPPDEFINES = ["UNICODE"])
+ lib_sources += [
+ "src/client/windows/handler/exception_handler.cc",
+ "src/client/windows/crash_generation/crash_generation_client.cc",
+ "src/common/windows/guid_string.cc",
+ ]
- if myenv["PLATFORM"] == "darwin" or myenv["PLATFORM"] == "linux" :
- lib_sources += [
- ]
- common_sources += [
- "src/common/md5.cc",
- ]
-
- if myenv["PLATFORM"] == "darwin" :
- myenv.Append(CPPDEFINES = ["HAVE_MACH_O_NLIST_H"])
- lib_sources += [
- "src/client/mac/handler/exception_handler.cc",
- "src/client/mac/handler/minidump_generator.cc",
- "src/client/mac/handler/dynamic_images.cc",
- "src/client/mac/handler/breakpad_nlist_64.cc",
- "src/client/mac/crash_generation/crash_generation_client.cc",
- "src/common/mac/MachIPC.mm",
- "src/common/mac/string_utilities.cc",
- "src/common/mac/bootstrap_compat.cc",
- "src/client/minidump_file_writer.cc",
- "src/common/string_conversion.cc",
- "src/common/convert_UTF.c",
- ]
- common_sources += [
- "src/common/mac/macho_id.cc",
- "src/common/mac/macho_walker.cc",
- "src/common/mac/file_id.cc",
- "src/common/mac/macho_utilities.cc",
- ]
- dumpsyms_sources += [
- "src/tools/mac/dump_syms/dump_syms_tool.mm",
- "src/common/mac/dump_syms.mm",
- "src/common/mac/macho_reader.cc",
- "src/common/dwarf/bytereader.cc",
- "src/common/dwarf/dwarf2reader.cc",
- "src/common/dwarf/dwarf2diehandler.cc",
- "src/common/dwarf_line_to_module.cc",
- "src/common/dwarf_cfi_to_module.cc",
- "src/common/dwarf_cu_to_module.cc",
- "src/common/stabs_to_module.cc",
- "src/common/stabs_reader.cc",
- "src/common/module.cc",
- "src/common/language.cc",
- ]
+ if myenv["PLATFORM"] == "darwin" or myenv["PLATFORM"] == "linux" :
+ lib_sources += [
+ ]
+ common_sources += [
+ "src/common/md5.cc",
+ ]
+
+ if myenv["PLATFORM"] == "darwin" :
+ myenv.Append(CPPDEFINES = ["HAVE_MACH_O_NLIST_H"])
+ lib_sources += [
+ "src/client/mac/handler/exception_handler.cc",
+ "src/client/mac/handler/minidump_generator.cc",
+ "src/client/mac/handler/dynamic_images.cc",
+ "src/client/mac/handler/breakpad_nlist_64.cc",
+ "src/client/mac/crash_generation/crash_generation_client.cc",
+ "src/common/mac/MachIPC.mm",
+ "src/common/mac/string_utilities.cc",
+ "src/common/mac/bootstrap_compat.cc",
+ "src/client/minidump_file_writer.cc",
+ "src/common/string_conversion.cc",
+ "src/common/convert_UTF.c",
+ ]
+ common_sources += [
+ "src/common/mac/macho_id.cc",
+ "src/common/mac/macho_walker.cc",
+ "src/common/mac/file_id.cc",
+ "src/common/mac/macho_utilities.cc",
+ ]
+ dumpsyms_sources += [
+ "src/tools/mac/dump_syms/dump_syms_tool.mm",
+ "src/common/mac/dump_syms.mm",
+ "src/common/mac/macho_reader.cc",
+ "src/common/dwarf/bytereader.cc",
+ "src/common/dwarf/dwarf2reader.cc",
+ "src/common/dwarf/dwarf2diehandler.cc",
+ "src/common/dwarf_line_to_module.cc",
+ "src/common/dwarf_cfi_to_module.cc",
+ "src/common/dwarf_cu_to_module.cc",
+ "src/common/stabs_to_module.cc",
+ "src/common/stabs_reader.cc",
+ "src/common/module.cc",
+ "src/common/language.cc",
+ ]
- if myenv["PLATFORM"] == "linux" :
- dumpsyms_sources += ["src/tools/linux/dump_syms/dump_syms.cc"]
+ if myenv["PLATFORM"] == "linux" :
+ dumpsyms_sources += ["src/tools/linux/dump_syms/dump_syms.cc"]
- common_objects = myenv.StaticObject(common_sources)
+ common_objects = myenv.StaticObject(common_sources)
- myenv.StaticLibrary("Swift_BreakPad", lib_sources + common_objects)
+ myenv.StaticLibrary("Swift_BreakPad", lib_sources + common_objects)
- #if myenv["PLATFORM"] == "darwin" or myenv["PLATFORM"] == "linux" :
- # myenv.Program("dump_syms", dumpsyms_sources + common_objects)
+ #if myenv["PLATFORM"] == "darwin" or myenv["PLATFORM"] == "linux" :
+ # myenv.Program("dump_syms", dumpsyms_sources + common_objects)
else :
- if env["SCONS_STAGE"] == "flags" :
- env["HAVE_BREAKPAD"] = False
- env["BREAKPAD_FLAGS"] = {}
+ if env["SCONS_STAGE"] == "flags" :
+ env["HAVE_BREAKPAD"] = False
+ env["BREAKPAD_FLAGS"] = {}
diff --git a/3rdParty/Breakpad/src/client/windows/handler/exception_handler.cc b/3rdParty/Breakpad/src/client/windows/handler/exception_handler.cc
index 6e5b724..272ca5f 100644
--- a/3rdParty/Breakpad/src/client/windows/handler/exception_handler.cc
+++ b/3rdParty/Breakpad/src/client/windows/handler/exception_handler.cc
@@ -124,6 +124,7 @@ void ExceptionHandler::Initialize(const wstring& dump_path,
callback_ = callback;
callback_context_ = callback_context;
dump_path_c_ = NULL;
+ dump_filename_prefix_c_ = NULL;
next_minidump_id_c_ = NULL;
next_minidump_path_c_ = NULL;
dbghelp_module_ = NULL;
@@ -217,6 +218,7 @@ void ExceptionHandler::Initialize(const wstring& dump_path,
// set_dump_path calls UpdateNextID. This sets up all of the path and id
// strings, and their equivalent c_str pointers.
+ set_dump_filename_prefix(wstring());
set_dump_path(dump_path);
}
@@ -914,8 +916,8 @@ void ExceptionHandler::UpdateNextID() {
next_minidump_id_c_ = next_minidump_id_.c_str();
wchar_t minidump_path[MAX_PATH];
- swprintf(minidump_path, MAX_PATH, L"%s\\%s.dmp",
- dump_path_c_, next_minidump_id_c_);
+ swprintf(minidump_path, MAX_PATH, L"%s\\%s%s.dmp",
+ dump_path_c_, dump_filename_prefix_c_, next_minidump_id_c_);
// remove when VC++7.1 is no longer supported
minidump_path[MAX_PATH - 1] = L'\0';
diff --git a/3rdParty/Breakpad/src/client/windows/handler/exception_handler.h b/3rdParty/Breakpad/src/client/windows/handler/exception_handler.h
index 09f5177..6f59348 100644
--- a/3rdParty/Breakpad/src/client/windows/handler/exception_handler.h
+++ b/3rdParty/Breakpad/src/client/windows/handler/exception_handler.h
@@ -188,6 +188,12 @@ class ExceptionHandler {
UpdateNextID(); // Necessary to put dump_path_ in next_minidump_path_.
}
+ void set_dump_filename_prefix(const wstring& dump_prefix) {
+ dump_filename_prefix_ = dump_prefix;
+ dump_filename_prefix_c_ = dump_filename_prefix_.c_str();
+ UpdateNextID();
+ }
+
// Requests that a previously reported crash be uploaded.
bool RequestUpload(DWORD crash_id);
@@ -313,6 +319,9 @@ class ExceptionHandler {
// argument to the constructor, or set_dump_path.
wstring dump_path_;
+ // The filename prefix used for the minidump files.
+ wstring dump_filename_prefix_;
+
// The basename of the next minidump to be written, without the extension.
wstring next_minidump_id_;
@@ -327,6 +336,7 @@ class ExceptionHandler {
// should be equivalent to the lifetimes of the associated wstring, provided
// that the wstrings are not altered.
const wchar_t* dump_path_c_;
+ const wchar_t* dump_filename_prefix_c_;
const wchar_t* next_minidump_id_c_;
const wchar_t* next_minidump_path_c_;