aboutsummaryrefslogtreecommitdiff
path: root/src/client/linux/minidump_writer/minidump_writer.h
diff options
context:
space:
mode:
authorjcivelli@chromium.org <jcivelli@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-08-09 22:59:58 +0000
committerjcivelli@chromium.org <jcivelli@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-08-09 22:59:58 +0000
commit43c933d7f8e490d9dbf3f939f3b2f095a170dc84 (patch)
tree153b8e0393f5e9f9f7edcf7f1d905cfd58571bad /src/client/linux/minidump_writer/minidump_writer.h
parentClean up warnings about narrowing conversion (diff)
downloadbreakpad-43c933d7f8e490d9dbf3f939f3b2f095a170dc84.tar.xz
Adding a way to create an ExceptionHandler that takes in a file descriptor
where the minidump should be created, without the need of opening any other file. BUG=None TEST=Run unit-tests. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1007 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/linux/minidump_writer/minidump_writer.h')
-rw-r--r--src/client/linux/minidump_writer/minidump_writer.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/client/linux/minidump_writer/minidump_writer.h b/src/client/linux/minidump_writer/minidump_writer.h
index e79eb79b..14da94b6 100644
--- a/src/client/linux/minidump_writer/minidump_writer.h
+++ b/src/client/linux/minidump_writer/minidump_writer.h
@@ -51,21 +51,27 @@ struct MappingEntry {
// A list of <MappingInfo, GUID>
typedef std::list<MappingEntry> MappingList;
-// Write a minidump to the filesystem. This function does not malloc nor use
+// Writes a minidump to the filesystem. These functions do not malloc nor use
// libc functions which may. Thus, it can be used in contexts where the state
// of the heap may be corrupt.
-// filename: the filename to write to. This is opened O_EXCL and fails if
-// open fails.
+// minidump_path: the path to the file to write to. This is opened O_EXCL and
+// fails open fails.
// crashing_process: the pid of the crashing process. This must be trusted.
// blob: a blob of data from the crashing process. See exception_handler.h
// blob_size: the length of |blob|, in bytes
//
// Returns true iff successful.
-bool WriteMinidump(const char* filename, pid_t crashing_process,
+bool WriteMinidump(const char* minidump_path, pid_t crashing_process,
+ const void* blob, size_t blob_size);
+// Same as above but takes an open file descriptor instead of a path.
+bool WriteMinidump(int minidump_fd, pid_t crashing_process,
const void* blob, size_t blob_size);
-// This overload also allows passing a list of known mappings.
-bool WriteMinidump(const char* filename, pid_t crashing_process,
+// These overloads also allow passing a list of known mappings.
+bool WriteMinidump(const char* minidump_path, pid_t crashing_process,
+ const void* blob, size_t blob_size,
+ const MappingList& mappings);
+bool WriteMinidump(int minidump_fd, pid_t crashing_process,
const void* blob, size_t blob_size,
const MappingList& mappings);