aboutsummaryrefslogtreecommitdiff
path: root/src/google_breakpad/processor
diff options
context:
space:
mode:
authorivanpe@chromium.org <ivanpe@chromium.org>2014-11-25 22:45:23 +0000
committerivanpe@chromium.org <ivanpe@chromium.org>2014-11-25 22:45:23 +0000
commit63919583ba0d302a2ceb437ecf41a7975f44f54b (patch)
tree41638178cfd8ae2637f3ebb4de31c5f49658029c /src/google_breakpad/processor
parentIntroduce microdump_stackwalk comand line executable (diff)
downloadbreakpad-63919583ba0d302a2ceb437ecf41a7975f44f54b.tar.xz
Surfacing the process create time in google_breakpad::ProcessState
and updating minidump_stackwalk to show process uptime. I tested this with a minidump from Chrome and I got a result that is inline with what the Windows debugger is showing for that dump: minidump_stackwalk output: -------------------------- Process uptime: 601 seconds WinDBG output: -------------- Process Uptime: 0 days 0:10:01.000 I didn't update the machine readable output of minidump_stackwalk on purpose in order to avoid breaking someone that uses it. It can be added later to the machine output if needed. R=mark@chromium.org Review URL: https://breakpad.appspot.com/7754002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1406 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/google_breakpad/processor')
-rw-r--r--src/google_breakpad/processor/minidump.h13
-rw-r--r--src/google_breakpad/processor/minidump_processor.h6
-rw-r--r--src/google_breakpad/processor/process_state.h4
3 files changed, 17 insertions, 6 deletions
diff --git a/src/google_breakpad/processor/minidump.h b/src/google_breakpad/processor/minidump.h
index 34e28312..51f15025 100644
--- a/src/google_breakpad/processor/minidump.h
+++ b/src/google_breakpad/processor/minidump.h
@@ -732,6 +732,7 @@ class MinidumpMiscInfo : public MinidumpStream {
private:
friend class Minidump;
+ friend class TestMinidumpMiscInfo;
static const uint32_t kStreamType = MD_MISC_INFO_STREAM;
@@ -902,14 +903,14 @@ class Minidump {
// to avoid exposing an ugly API (GetStream needs to accept a garbage
// parameter).
virtual MinidumpThreadList* GetThreadList();
- MinidumpModuleList* GetModuleList();
+ virtual MinidumpModuleList* GetModuleList();
virtual MinidumpMemoryList* GetMemoryList();
- MinidumpException* GetException();
- MinidumpAssertion* GetAssertion();
+ virtual MinidumpException* GetException();
+ virtual MinidumpAssertion* GetAssertion();
virtual MinidumpSystemInfo* GetSystemInfo();
- MinidumpMiscInfo* GetMiscInfo();
- MinidumpBreakpadInfo* GetBreakpadInfo();
- MinidumpMemoryInfoList* GetMemoryInfoList();
+ virtual MinidumpMiscInfo* GetMiscInfo();
+ virtual MinidumpBreakpadInfo* GetBreakpadInfo();
+ virtual MinidumpMemoryInfoList* GetMemoryInfoList();
// The next set of methods are provided for users who wish to access
// data in minidump files directly, while leveraging the rest of
diff --git a/src/google_breakpad/processor/minidump_processor.h b/src/google_breakpad/processor/minidump_processor.h
index 20277f9a..d2c94e2b 100644
--- a/src/google_breakpad/processor/minidump_processor.h
+++ b/src/google_breakpad/processor/minidump_processor.h
@@ -89,6 +89,12 @@ class MinidumpProcessor {
// the minidump.
static bool GetOSInfo(Minidump* dump, SystemInfo* info);
+ // Populates the |process_create_time| parameter with the create time of the
+ // crashed process. Returns false if this information is not available in
+ // the minidump |dump|.
+ static bool GetProcessCreateTime(Minidump* dump,
+ uint32_t* process_create_time);
+
// Returns a textual representation of the reason that a crash occurred,
// if the minidump in dump was produced as a result of a crash. Returns
// an empty string if this information cannot be determined. If address
diff --git a/src/google_breakpad/processor/process_state.h b/src/google_breakpad/processor/process_state.h
index a33b2123..ac3b6039 100644
--- a/src/google_breakpad/processor/process_state.h
+++ b/src/google_breakpad/processor/process_state.h
@@ -97,6 +97,7 @@ class ProcessState {
// Accessors. See the data declarations below.
uint32_t time_date_stamp() const { return time_date_stamp_; }
+ uint32_t process_create_time() const { return process_create_time_; }
bool crashed() const { return crashed_; }
string crash_reason() const { return crash_reason_; }
uint64_t crash_address() const { return crash_address_; }
@@ -125,6 +126,9 @@ class ProcessState {
// The time-date stamp of the minidump (time_t format)
uint32_t time_date_stamp_;
+ // The time-date stamp when the process was created (time_t format)
+ uint32_t process_create_time_;
+
// True if the process crashed, false if the dump was produced outside
// of an exception handler.
bool crashed_;