Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Unified Diff: snapshot/test/test_thread_snapshot.h

Issue 1364803004: win: Save contents of TEBs allowing !teb and !gle to work in windbg (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@dump-without-crashing
Patch Set: . Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « snapshot/test/test_process_snapshot.h ('k') | snapshot/test/test_thread_snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: snapshot/test/test_thread_snapshot.h
diff --git a/snapshot/test/test_thread_snapshot.h b/snapshot/test/test_thread_snapshot.h
index b956469525169283e18d69608906bd5c5ac486f6..9b00d32ff300cb1aba22562a093fc76465dd2762 100644
--- a/snapshot/test/test_thread_snapshot.h
+++ b/snapshot/test/test_thread_snapshot.h
@@ -17,11 +17,14 @@
#include <stdint.h>
+#include <vector>
+
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "snapshot/cpu_context.h"
#include "snapshot/memory_snapshot.h"
#include "snapshot/thread_snapshot.h"
+#include "util/stdlib/pointer_container.h"
namespace crashpad {
namespace test {
@@ -61,6 +64,15 @@ class TestThreadSnapshot final : public ThreadSnapshot {
thread_specific_data_address_ = thread_specific_data_address;
}
+ //! \brief Add a memory snapshot to be returned by ExtraMemory().
+ //!
+ //! \param[in] extra_memory The memory snapshot that will be included in
+ //! ExtraMemory(). The TestThreadSnapshot object takes ownership of \a
+ //! extra_memory.
+ void AddExtraMemory(scoped_ptr<MemorySnapshot> extra_memory) {
+ extra_memory_.push_back(extra_memory.release());
+ }
+
// ThreadSnapshot:
const CPUContext* Context() const override;
@@ -69,6 +81,7 @@ class TestThreadSnapshot final : public ThreadSnapshot {
int SuspendCount() const override;
int Priority() const override;
uint64_t ThreadSpecificDataAddress() const override;
+ std::vector<const MemorySnapshot*> ExtraMemory() const override;
private:
union {
@@ -81,6 +94,7 @@ class TestThreadSnapshot final : public ThreadSnapshot {
int suspend_count_;
int priority_;
uint64_t thread_specific_data_address_;
+ PointerVector<MemorySnapshot> extra_memory_;
DISALLOW_COPY_AND_ASSIGN(TestThreadSnapshot);
};
« no previous file with comments | « snapshot/test/test_process_snapshot.h ('k') | snapshot/test/test_thread_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698