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

Unified Diff: snapshot/win/process_reader_win.cc

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/win/process_reader_win.h ('k') | snapshot/win/thread_snapshot_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: snapshot/win/process_reader_win.cc
diff --git a/snapshot/win/process_reader_win.cc b/snapshot/win/process_reader_win.cc
index 20e17ed93959463ddc50df960a8aedadbe8dd9fd..a7665c293aaae99ec34c03dd41f81e230c34aa06 100644
--- a/snapshot/win/process_reader_win.cc
+++ b/snapshot/win/process_reader_win.cc
@@ -177,7 +177,8 @@ bool FillThreadContextAndSuspendCount(HANDLE thread_handle,
ProcessReaderWin::Thread::Thread()
: context(),
id(0),
- teb(0),
+ teb_address(0),
+ teb_size(0),
stack_region_address(0),
stack_region_size(0),
suspend_count(0),
@@ -332,8 +333,9 @@ void ProcessReaderWin::ReadThreadData(bool is_64_reading_32) {
// Read the TIB (Thread Information Block) which is the first element of the
// TEB, for its stack fields.
process_types::NT_TIB<Traits> tib;
- thread.teb = thread_basic_info.TebBaseAddress;
- if (ReadMemory(thread.teb, sizeof(tib), &tib)) {
+ thread.teb_address = thread_basic_info.TebBaseAddress;
+ thread.teb_size = sizeof(process_types::TEB<Traits>);
+ if (ReadMemory(thread.teb_address, sizeof(tib), &tib)) {
WinVMAddress base = 0;
WinVMAddress limit = 0;
// If we're reading a WOW64 process, then the TIB we just retrieved is the
@@ -341,8 +343,10 @@ void ProcessReaderWin::ReadThreadData(bool is_64_reading_32) {
// https://msdn.microsoft.com/en-us/library/dn424783.aspx
if (is_64_reading_32) {
process_types::NT_TIB<process_types::internal::Traits32> tib32;
- thread.teb = tib.Wow64Teb;
- if (ReadMemory(thread.teb, sizeof(tib32), &tib32)) {
+ thread.teb_address = tib.Wow64Teb;
+ thread.teb_size =
+ sizeof(process_types::TEB<process_types::internal::Traits32>);
+ if (ReadMemory(thread.teb_address, sizeof(tib32), &tib32)) {
base = tib32.StackBase;
limit = tib32.StackLimit;
}
« no previous file with comments | « snapshot/win/process_reader_win.h ('k') | snapshot/win/thread_snapshot_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698