| Index: snapshot/win/thread_snapshot_win.cc
|
| diff --git a/snapshot/win/thread_snapshot_win.cc b/snapshot/win/thread_snapshot_win.cc
|
| index 9c8c9ea69861d58e949d7267a778e311a3f6cda0..f3446e9825825bd313b67670bf5a22582705e77c 100644
|
| --- a/snapshot/win/thread_snapshot_win.cc
|
| +++ b/snapshot/win/thread_snapshot_win.cc
|
| @@ -17,6 +17,7 @@
|
| #include <vector>
|
|
|
| #include "base/logging.h"
|
| +#include "snapshot/win/capture_context_memory.h"
|
| #include "snapshot/win/cpu_context_win.h"
|
| #include "snapshot/win/process_reader_win.h"
|
|
|
| @@ -75,6 +76,9 @@ bool ThreadSnapshotWin::Initialize(
|
| InitializeX86Context(process_reader_thread.context.native, context_.x86);
|
| #endif // ARCH_CPU_X86_64
|
|
|
| + CaptureMemoryPointedToByContext(
|
| + context_, process_reader, thread_, &pointed_to_memory_);
|
| +
|
| INITIALIZATION_STATE_SET_VALID(initialized_);
|
| return true;
|
| }
|
| @@ -111,9 +115,13 @@ uint64_t ThreadSnapshotWin::ThreadSpecificDataAddress() const {
|
|
|
| std::vector<const MemorySnapshot*> ThreadSnapshotWin::ExtraMemory() const {
|
| INITIALIZATION_STATE_DCHECK_VALID(initialized_);
|
| - // TODO(scottmg): Ensure this region is readable, and make sure we don't
|
| - // discard the entire dump if it isn't. https://crashpad.chromium.org/bug/59
|
| - return std::vector<const MemorySnapshot*>(1, &teb_);
|
| + std::vector<const MemorySnapshot*> result;
|
| + result.reserve(1 + pointed_to_memory_.size());
|
| + result.push_back(&teb_);
|
| + std::copy(pointed_to_memory_.begin(),
|
| + pointed_to_memory_.end(),
|
| + std::back_inserter(result));
|
| + return result;
|
| }
|
|
|
| } // namespace internal
|
|
|