34 #ifndef CLIENT_MINIDUMP_FILE_WRITER_H__ 35 #define CLIENT_MINIDUMP_FILE_WRITER_H__ 80 bool Open(
const char *path);
101 bool WriteString(
const wchar_t *str,
unsigned int length,
105 bool WriteString(
const char *str,
unsigned int length,
125 MDRVA Allocate(
size_t size);
131 bool close_file_when_destroyed_;
144 bool CopyStringToMDString(
const wchar_t *str,
unsigned int length,
146 bool CopyStringToMDString(
const char *str,
unsigned int length,
150 template <
typename CharType>
151 bool WriteStringCore(
const CharType *str,
unsigned int length,
165 bool Allocate(
size_t size);
171 inline size_t size()
const {
return size_; }
185 inline bool Copy(
const void *src,
size_t size) {
186 return Copy(position_, src, size);
205 template<
typename MDType>
212 allocation_state_(UNALLOCATED) {}
216 if (allocation_state_ != ARRAY)
233 bool Allocate(
size_t additional);
238 bool AllocateArray(
size_t count);
243 bool AllocateObjectAndArray(
size_t count,
size_t size);
248 bool CopyIndex(
unsigned int index,
MDType *item);
253 bool CopyIndexAfterObject(
unsigned int index,
const void *src,
size_t size);
259 enum AllocationState {
263 SINGLE_OBJECT_WITH_ARRAY
267 AllocationState allocation_state_;
272 #endif // CLIENT_MINIDUMP_FILE_WRITER_H__
UntypedMDRVA(MinidumpFileWriter *writer)
void SetFile(const int file)
MinidumpFileWriter * writer_
bool Open(const char *path)
static const MDRVA kInvalidMDRVA
bool Copy(const void *src, size_t size)
bool Copy(MDRVA position, const void *src, ssize_t size)
bool WriteMemory(const void *src, size_t size, MDMemoryDescriptor *output)
TypedMDRVA(MinidumpFileWriter *writer)
MDLocationDescriptor location() const
bool WriteString(const wchar_t *str, unsigned int length, MDLocationDescriptor *location)