mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 14:06:33 +00:00
fuchsia: Implement SnapshotTime()
Bug: crashpad:196 Change-Id: I398a8e933c64fca33e2620543c4c9d52a07f7d8f Reviewed-on: https://chromium-review.googlesource.com/1005835 Reviewed-by: Joshua Peraza <jperaza@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org>
This commit is contained in:
parent
c7fe30dddb
commit
cf55a7ef55
@ -18,13 +18,18 @@
|
||||
|
||||
namespace crashpad {
|
||||
|
||||
ProcessSnapshotFuchsia::ProcessSnapshotFuchsia() {}
|
||||
ProcessSnapshotFuchsia::ProcessSnapshotFuchsia() = default;
|
||||
|
||||
ProcessSnapshotFuchsia::~ProcessSnapshotFuchsia() {}
|
||||
ProcessSnapshotFuchsia::~ProcessSnapshotFuchsia() = default;
|
||||
|
||||
bool ProcessSnapshotFuchsia::Initialize(zx_handle_t process) {
|
||||
INITIALIZATION_STATE_SET_INITIALIZING(initialized_);
|
||||
|
||||
if (gettimeofday(&snapshot_time_, nullptr) != 0) {
|
||||
PLOG(ERROR) << "gettimeofday";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!process_reader_.Initialize(process)) {
|
||||
return false;
|
||||
}
|
||||
@ -87,7 +92,7 @@ pid_t ProcessSnapshotFuchsia::ParentProcessID() const {
|
||||
|
||||
void ProcessSnapshotFuchsia::SnapshotTime(timeval* snapshot_time) const {
|
||||
INITIALIZATION_STATE_DCHECK_VALID(initialized_);
|
||||
NOTREACHED(); // TODO(scottmg): https://crashpad.chromium.org/bug/196
|
||||
*snapshot_time = snapshot_time_;
|
||||
}
|
||||
|
||||
void ProcessSnapshotFuchsia::ProcessStartTime(timeval* start_time) const {
|
||||
|
@ -15,6 +15,7 @@
|
||||
#ifndef CRASHPAD_SNAPSHOT_FUCHSIA_PROCESS_SNAPSHOT_FUCHSIA_H_
|
||||
#define CRASHPAD_SNAPSHOT_FUCHSIA_PROCESS_SNAPSHOT_FUCHSIA_H_
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <zircon/types.h>
|
||||
|
||||
#include <memory>
|
||||
@ -84,6 +85,7 @@ class ProcessSnapshotFuchsia : public ProcessSnapshot {
|
||||
std::vector<std::unique_ptr<internal::ModuleSnapshotElf>> modules_;
|
||||
ProcessReaderFuchsia process_reader_;
|
||||
std::map<std::string, std::string> annotations_simple_map_;
|
||||
timeval snapshot_time_;
|
||||
InitializationStateDcheck initialized_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ProcessSnapshotFuchsia);
|
||||
|
Loading…
x
Reference in New Issue
Block a user