Index: src/client/linux/minidump_writer/minidump_writer.h |
=================================================================== |
--- a/src/client/linux/minidump_writer/minidump_writer.h |
+++ b/src/client/linux/minidump_writer/minidump_writer.h |
@@ -28,26 +28,40 @@ |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
#ifndef CLIENT_LINUX_MINIDUMP_WRITER_MINIDUMP_WRITER_H_ |
#define CLIENT_LINUX_MINIDUMP_WRITER_MINIDUMP_WRITER_H_ |
#include <stdint.h> |
#include <unistd.h> |
+#include <list> |
+#include <utility> |
+ |
+#include "google_breakpad/common/minidump_format.h" |
+ |
namespace google_breakpad { |
+// A list of <MappingInfo, GUID> |
+typedef std::pair<struct MappingInfo, u_int8_t[sizeof(MDGUID)]> MappingEntry; |
+typedef std::list<MappingEntry> MappingList; |
+ |
// Write a minidump to the filesystem. This function does 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. |
// 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, |
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, |
+ const void* blob, size_t blob_size, |
+ const MappingList& mappings); |
+ |
} // namespace google_breakpad |
#endif // CLIENT_LINUX_MINIDUMP_WRITER_MINIDUMP_WRITER_H_ |