mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2026-01-06 14:38:19 +01:00
issue 170 - Report assertion type in minidump_stackwalk output. r=mark at http://breakpad.appspot.com/45001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@433 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
096992fac7
commit
0314e487e4
8 changed files with 248 additions and 1 deletions
|
|
@ -639,6 +639,46 @@ class MinidumpException : public MinidumpStream {
|
|||
MinidumpContext* context_;
|
||||
};
|
||||
|
||||
// MinidumpAssertion wraps MDRawAssertionInfo, which contains information
|
||||
// about an assertion that caused the minidump to be generated.
|
||||
class MinidumpAssertion : public MinidumpStream {
|
||||
public:
|
||||
virtual ~MinidumpAssertion();
|
||||
|
||||
const MDRawAssertionInfo* assertion() const {
|
||||
return valid_ ? &assertion_ : NULL;
|
||||
}
|
||||
|
||||
string expression() const {
|
||||
return valid_ ? expression_ : "";
|
||||
}
|
||||
|
||||
string function() const {
|
||||
return valid_ ? function_ : "";
|
||||
}
|
||||
|
||||
string file() const {
|
||||
return valid_ ? file_ : "";
|
||||
}
|
||||
|
||||
// Print a human-readable representation of the object to stdout.
|
||||
void Print();
|
||||
|
||||
private:
|
||||
friend class Minidump;
|
||||
|
||||
static const u_int32_t kStreamType = MD_ASSERTION_INFO_STREAM;
|
||||
|
||||
explicit MinidumpAssertion(Minidump* minidump);
|
||||
|
||||
bool Read(u_int32_t expected_size);
|
||||
|
||||
MDRawAssertionInfo assertion_;
|
||||
string expression_;
|
||||
string function_;
|
||||
string file_;
|
||||
};
|
||||
|
||||
|
||||
// MinidumpSystemInfo wraps MDRawSystemInfo and provides information about
|
||||
// the system on which the minidump was generated. See also MinidumpMiscInfo.
|
||||
|
|
@ -788,6 +828,7 @@ class Minidump {
|
|||
MinidumpModuleList* GetModuleList();
|
||||
MinidumpMemoryList* GetMemoryList();
|
||||
MinidumpException* GetException();
|
||||
MinidumpAssertion* GetAssertion();
|
||||
MinidumpSystemInfo* GetSystemInfo();
|
||||
MinidumpMiscInfo* GetMiscInfo();
|
||||
MinidumpBreakpadInfo* GetBreakpadInfo();
|
||||
|
|
|
|||
|
|
@ -141,6 +141,11 @@ class MinidumpProcessor {
|
|||
return (p != PROCESS_SYMBOL_SUPPLIER_INTERRUPTED);
|
||||
}
|
||||
|
||||
// Returns a textual representation of an assertion included
|
||||
// in the minidump. Returns an empty string if this information
|
||||
// does not exist or cannot be determined.
|
||||
static string GetAssertion(Minidump *dump);
|
||||
|
||||
private:
|
||||
SymbolSupplier *supplier_;
|
||||
SourceLineResolverInterface *resolver_;
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ class ProcessState {
|
|||
bool crashed() const { return crashed_; }
|
||||
string crash_reason() const { return crash_reason_; }
|
||||
u_int64_t crash_address() const { return crash_address_; }
|
||||
string assertion() const { return assertion_; }
|
||||
int requesting_thread() const { return requesting_thread_; }
|
||||
const vector<CallStack*>* threads() const { return &threads_; }
|
||||
const vector<MinidumpMemoryRegion*>* thread_memory_regions() const {
|
||||
|
|
@ -92,6 +93,11 @@ class ProcessState {
|
|||
// this will be the address of the instruction that caused the fault.
|
||||
u_int64_t crash_address_;
|
||||
|
||||
// If there was an assertion that was hit, a textual representation
|
||||
// of that assertion, possibly including the file and line at which
|
||||
// it occurred.
|
||||
string assertion_;
|
||||
|
||||
// The index of the thread that requested a dump be written in the
|
||||
// threads vector. If a dump was produced as a result of a crash, this
|
||||
// will point to the thread that crashed. If the dump was produced as
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue