From b56cfa067add059d0894433393e798fe0604970e Mon Sep 17 00:00:00 2001 From: nealsid Date: Fri, 29 May 2009 00:53:02 +0000 Subject: 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 --- src/google_breakpad/processor/minidump.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/google_breakpad/processor/minidump.h') diff --git a/src/google_breakpad/processor/minidump.h b/src/google_breakpad/processor/minidump.h index 5c5dccc9..f08a1c18 100644 --- a/src/google_breakpad/processor/minidump.h +++ b/src/google_breakpad/processor/minidump.h @@ -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(); -- cgit v1.2.1