aboutsummaryrefslogtreecommitdiff
path: root/src/google_airbag/processor/minidump.h
diff options
context:
space:
mode:
authormmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e>2007-01-17 00:16:37 +0000
committermmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e>2007-01-17 00:16:37 +0000
commit48dab62c2df1621db0e5b57f400e1fc38c1b37ee (patch)
treec76065eff9ba0a438922b5ff1e764e2032bc7ddf /src/google_airbag/processor/minidump.h
parentPass the exception record (EXCEPTION_POINTERS*) to callback functions from (diff)
downloadbreakpad-48dab62c2df1621db0e5b57f400e1fc38c1b37ee.tar.xz
Be lenient when reading CodeView records of unknown types (#110). r=bryner
- Read (but don't use) CodeView records with unknown signature values instead of failing. This allows the module list to be read in, and will result in better stack traces in affected dumps. http://groups.google.com/group/airbag-dev/browse_thread/thread/2c7d3e3b1fd6ea96 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@104 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/google_airbag/processor/minidump.h')
-rw-r--r--src/google_airbag/processor/minidump.h30
1 files changed, 21 insertions, 9 deletions
diff --git a/src/google_airbag/processor/minidump.h b/src/google_airbag/processor/minidump.h
index f2700119..6aa87c21 100644
--- a/src/google_airbag/processor/minidump.h
+++ b/src/google_airbag/processor/minidump.h
@@ -369,15 +369,22 @@ class MinidumpModule : public MinidumpObject,
// The CodeView record, which contains information to locate the module's
// debugging information (pdb). This is returned as u_int8_t* because
- // the data can be one of two types: MDCVInfoPDB20* or MDCVInfoPDB70*.
- // Check the record's signature in the first four bytes to differentiate.
- // Current toolchains generate modules which carry MDCVInfoPDB70.
- const u_int8_t* GetCVRecord();
+ // the data can be of types MDCVInfoPDB20* or MDCVInfoPDB70*, or it may be
+ // of a type unknown to Airbag, in which case the raw data will still be
+ // returned but no byte-swapping will have been performed. Check the
+ // record's signature in the first four bytes to differentiate between
+ // the various types. Current toolchains generate modules which carry
+ // MDCVInfoPDB70 by default. Returns a pointer to the CodeView record on
+ // success, and NULL on failure. On success, the optional |size| argument
+ // is set to the size of the CodeView record.
+ const u_int8_t* GetCVRecord(u_int32_t* size);
// The miscellaneous debug record, which is obsolete. Current toolchains
// do not generate this type of debugging information (dbg), and this
- // field is not expected to be present.
- const MDImageDebugMisc* GetMiscRecord();
+ // field is not expected to be present. Returns a pointer to the debugging
+ // record on success, and NULL on failure. On success, the optional |size|
+ // argument is set to the size of the debugging record.
+ const MDImageDebugMisc* GetMiscRecord(u_int32_t* size);
// Print a human-readable representation of the object to stdout.
void Print();
@@ -414,11 +421,16 @@ class MinidumpModule : public MinidumpObject,
const string* name_;
// Cached CodeView record - this is MDCVInfoPDB20 or (likely)
- // MDCVInfoPDB70. Stored as a u_int8_t because the structure contains
- // a variable-sized string and its exact size cannot be known until it
- // is processed.
+ // MDCVInfoPDB70, or possibly something else entirely. Stored as a u_int8_t
+ // because the structure contains a variable-sized string and its exact
+ // size cannot be known until it is processed.
vector<u_int8_t>* cv_record_;
+ // If cv_record_ is present, cv_record_signature_ contains a copy of the
+ // CodeView record's first four bytes, for ease of determinining the
+ // type of structure that cv_record_ contains.
+ u_int32_t cv_record_signature_;
+
// Cached MDImageDebugMisc (usually not present), stored as u_int8_t
// because the structure contains a variable-sized string and its exact
// size cannot be known until it is processed.