aboutsummaryrefslogtreecommitdiff
path: root/src/client/linux/handler/exception_handler.h
diff options
context:
space:
mode:
authorted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e>2008-10-14 11:21:34 +0000
committerted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e>2008-10-14 11:21:34 +0000
commitc5f46b2f4b43e331650b32cb9d286246cd4fdac1 (patch)
tree780337e0df2479e2dace76b7fa7be29b96523f09 /src/client/linux/handler/exception_handler.h
parentFix for DWARF processing when inline functions were encountered. Inline func... (diff)
downloadbreakpad-c5f46b2f4b43e331650b32cb9d286246cd4fdac1.tar.xz
Issue 276 - generate GUIDs ahead of time in Linux handler. r=Liu Li
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@290 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/linux/handler/exception_handler.h')
-rw-r--r--src/client/linux/handler/exception_handler.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/client/linux/handler/exception_handler.h b/src/client/linux/handler/exception_handler.h
index 2a212315..6e6156c5 100644
--- a/src/client/linux/handler/exception_handler.h
+++ b/src/client/linux/handler/exception_handler.h
@@ -126,6 +126,7 @@ class ExceptionHandler {
void set_dump_path(const string &dump_path) {
dump_path_ = dump_path;
dump_path_c_ = dump_path_.c_str();
+ UpdateNextID();
}
// Writes a minidump immediately. This can be used to capture the
@@ -160,6 +161,10 @@ class ExceptionHandler {
bool InternalWriteMinidump(int signo, uintptr_t sighandler_ebp,
struct sigcontext **sig_ctx);
+ // Generates a new ID and stores it in next_minidump_id, and stores the
+ // path of the next minidump to be written in next_minidump_path_.
+ void UpdateNextID();
+
private:
FilterCallback filter_;
MinidumpCallback callback_;
@@ -168,9 +173,20 @@ class ExceptionHandler {
// The directory in which a minidump will be written, set by the dump_path
// argument to the constructor, or set_dump_path.
string dump_path_;
- // C style dump path. Keep this when setting dump path, since calling
- // c_str() of std::string when crashing may not be safe.
+
+ // The basename of the next minidump to be written, without the extension
+ string next_minidump_id_;
+
+ // The full pathname of the next minidump to be written, including the file
+ // extension
+ string next_minidump_path_;
+
+ // Pointers to C-string representations of the above. These are set
+ // when the above are set so we can avoid calling c_str during
+ // an exception.
const char *dump_path_c_;
+ const char *next_minidump_id_c_;
+ const char *next_minidump_path_c_;
// True if the ExceptionHandler installed an unhandled exception filter
// when created (with an install_handler parameter set to true).