summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-06-21 12:49:44 (GMT)
committerKevin Smith <kevin.smith@isode.com>2016-06-23 13:27:39 (GMT)
commit7f0fe603be200c09c74cf9cc295a972f3c3dbdfd (patch)
tree6541fe19808b03a6f0d719e2a25cbf1cc1fa6a11 /SwifTools
parentfbc02ab3b96fb46231458d2e283cfdd191185fb5 (diff)
downloadswift-7f0fe603be200c09c74cf9cc295a972f3c3dbdfd.zip
swift-7f0fe603be200c09c74cf9cc295a972f3c3dbdfd.tar.bz2
Change minidump filename format to include version and date
The new format is VERSION_DATE_UUID.dmp. Included the diff for the Breakpad modification. Test-Information: Tested by adding crashing code and verified the filename of the created minidump file on Windows 8 with VS 2013. Change-Id: I963e7913fadf4787742439da590e12e121ef3435
Diffstat (limited to 'SwifTools')
-rw-r--r--SwifTools/CrashReporter.cpp8
-rw-r--r--SwifTools/CrashReporter.h2
2 files changed, 6 insertions, 4 deletions
diff --git a/SwifTools/CrashReporter.cpp b/SwifTools/CrashReporter.cpp
index 15b5cd0..bf637c8 100644
--- a/SwifTools/CrashReporter.cpp
+++ b/SwifTools/CrashReporter.cpp
@@ -5,10 +5,11 @@
*/
#include <Swiften/Base/Log.h>
-#include <SwifTools/CrashReporter.h>
#include <Swiften/Base/Platform.h>
#include <Swiften/Base/Path.h>
+#include <SwifTools/CrashReporter.h>
+
#if defined(HAVE_BREAKPAD)
#pragma GCC diagnostic ignored "-Wold-style-cast"
@@ -38,7 +39,7 @@ struct CrashReporter::Private {
std::shared_ptr<google_breakpad::ExceptionHandler> handler;
};
-CrashReporter::CrashReporter(const boost::filesystem::path& path) {
+CrashReporter::CrashReporter(const boost::filesystem::path& path, const std::string& dumpPrefix) {
// Create the path that will contain the crash dumps
if (!boost::filesystem::exists(path)) {
try {
@@ -61,6 +62,7 @@ CrashReporter::CrashReporter(const boost::filesystem::path& path) {
handleDump,
(void*) 0,
google_breakpad::ExceptionHandler::HANDLER_ALL));
+ p->handler->set_dump_filename_prefix(std::wstring(dumpPrefix.begin(), dumpPrefix.end()));
// Turning it off for Mac, because it doesn't really help us
//#elif defined(SWIFTEN_PLATFORM_MACOSX)
// p->handler = std::make_shared<google_breakpad::ExceptionHandler>(pathToString(path), (google_breakpad::ExceptionHandler::FilterCallback) 0, handleDump, (void*) 0, true, (const char*) 0);
@@ -73,7 +75,7 @@ CrashReporter::CrashReporter(const boost::filesystem::path& path) {
// Dummy implementation
namespace Swift {
- CrashReporter::CrashReporter(const boost::filesystem::path&) {}
+ CrashReporter::CrashReporter(const boost::filesystem::path&, const std::string&) {}
}
#endif
diff --git a/SwifTools/CrashReporter.h b/SwifTools/CrashReporter.h
index c80b1a2..1efa801 100644
--- a/SwifTools/CrashReporter.h
+++ b/SwifTools/CrashReporter.h
@@ -14,7 +14,7 @@
namespace Swift {
class CrashReporter {
public:
- CrashReporter(const boost::filesystem::path& path);
+ CrashReporter(const boost::filesystem::path& path, const std::string& dumpPrefix);
private:
struct Private;