diff options
author | waylonis <waylonis@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2006-11-16 22:43:57 +0000 |
---|---|---|
committer | waylonis <waylonis@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2006-11-16 22:43:57 +0000 |
commit | 9e586c173e758b0273b1c239290b2388a4339900 (patch) | |
tree | e54d42261a64c50d7f1d234963a4809f944ac34a /src/client/minidump_file_writer.cc | |
parent | Add minidump file writer. Tested on Mac, but should compile on POSIX systems. (diff) | |
download | breakpad-9e586c173e758b0273b1c239290b2388a4339900.tar.xz |
Move some inlined functions to .cc file. Add some assertions.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@66 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/minidump_file_writer.cc')
-rw-r--r-- | src/client/minidump_file_writer.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/client/minidump_file_writer.cc b/src/client/minidump_file_writer.cc index d5e381b9..852bc297 100644 --- a/src/client/minidump_file_writer.cc +++ b/src/client/minidump_file_writer.cc @@ -216,6 +216,8 @@ MDRVA MinidumpFileWriter::Allocate(size_t size) { } bool MinidumpFileWriter::Copy(MDRVA position, const void* src, ssize_t size) { + assert(src); + assert(size); assert(file_ != -1); // Ensure that the data will fit in the allocated space @@ -230,4 +232,18 @@ bool MinidumpFileWriter::Copy(MDRVA position, const void* src, ssize_t size) { return false; } +bool UntypedMDRVA::Allocate(size_t size) { + assert(size_ == 0); + size_ = size; + position_ = writer_->Allocate(size_); + return position_ != MinidumpFileWriter::kInvalidMDRVA; +} + +bool UntypedMDRVA::Copy(MDRVA position, const void *src, size_t size) { + assert(src); + assert(size); + assert(position + size <= position_ + size_); + return writer_->Copy(position, src, size); +} + } // namespace google_airbag |