Add more error information to minidump processing return code. Also added dependency on google test, and modified minidump processing unit tests to use google test

R=brdevmn
A=nealsid



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@343 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
nealsid
2009-05-29 00:53:02 +00:00
parent aaecb48b3b
commit b56cfa067a
9 changed files with 859 additions and 375 deletions

View File

@@ -336,7 +336,9 @@ class MinidumpThreadList : public MinidumpStream {
}
static u_int32_t max_threads() { return max_threads_; }
unsigned int thread_count() const { return valid_ ? thread_count_ : 0; }
unsigned int thread_count() const {
return valid_ ? thread_count_ : 0;
}
// Sequential access to threads.
MinidumpThread* GetThreadAtIndex(unsigned int index) const;
@@ -755,8 +757,11 @@ class Minidump {
// path is the pathname of a file containing the minidump.
explicit Minidump(const string& path);
~Minidump();
virtual ~Minidump();
virtual string path() const {
return path_;
}
static void set_max_streams(u_int32_t max_streams) {
max_streams_ = max_streams;
}
@@ -767,19 +772,19 @@ class Minidump {
}
static u_int32_t max_string_length() { return max_string_length_; }
const MDRawHeader* header() const { return valid_ ? &header_ : NULL; }
virtual const MDRawHeader* header() const { return valid_ ? &header_ : NULL; }
// Reads the minidump file's header and top-level stream directory.
// The minidump is expected to be positioned at the beginning of the
// header. Read() sets up the stream list and map, and validates the
// Minidump object.
bool Read();
virtual bool Read();
// The next set of methods are stubs that call GetStream. They exist to
// force code generation of the templatized API within the module, and
// to avoid exposing an ugly API (GetStream needs to accept a garbage
// parameter).
MinidumpThreadList* GetThreadList();
virtual MinidumpThreadList* GetThreadList();
MinidumpModuleList* GetModuleList();
MinidumpMemoryList* GetMemoryList();
MinidumpException* GetException();