dbghelp: Fix compilation for x86_64.

This commit is contained in:
Ge van Geldorp 2006-06-19 20:03:37 +02:00 committed by Alexandre Julliard
parent 5fb24924fb
commit 5f299d6fe5
1 changed files with 8 additions and 5 deletions

View File

@ -166,18 +166,21 @@ static BOOL fetch_thread_info(struct dump_context* dc, int thd_idx,
mdThd->Stack.StartOfMemoryRange = (ctx->Esp - 4);
else
mdThd->Stack.StartOfMemoryRange = (ULONG_PTR)tib.StackLimit;
mdThd->Stack.Memory.DataSize = (ULONG_PTR)tib.StackBase -
mdThd->Stack.StartOfMemoryRange;
#elif defined(__powerpc__)
if (ctx->Iar)
mdThd->Stack.StartOfMemoryRange = ctx->Iar - 4;
else
mdThd->Stack.StartOfMemoryRange = (ULONG_PTR)tib.StackLimit;
mdThd->Stack.Memory.DataSize = (ULONG_PTR)tib.StackBase -
mdThd->Stack.StartOfMemoryRange;
#elif defined(__x86_64__)
if (ctx->Rsp)
mdThd->Stack.StartOfMemoryRange = (ctx->Rsp - 8);
else
mdThd->Stack.StartOfMemoryRange = (ULONG_PTR)tib.StackLimit;
#else
#error unsupported CPU
#endif
mdThd->Stack.Memory.DataSize = (ULONG_PTR)tib.StackBase -
mdThd->Stack.StartOfMemoryRange;
}
ResumeThread(hThread);
}