Commit a7ff2f67 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

winedbg: A couple of fixes after running valgrind.

parent 0ba307d2
......@@ -84,6 +84,7 @@ static BOOL stack_set_frame_internal(int newframe)
static BOOL stack_get_frame(int nf, IMAGEHLP_STACK_FRAME* ihsf)
{
memset(ihsf, 0, sizeof(*ihsf));
ihsf->InstructionOffset = (unsigned long)memory_to_linear_addr(&dbg_curr_thread->frames[nf].addr_pc);
ihsf->FrameOffset = (unsigned long)memory_to_linear_addr(&dbg_curr_thread->frames[nf].addr_frame);
return TRUE;
......@@ -229,7 +230,7 @@ static void stack_print_addr_and_args(int nf)
DWORD disp;
dbg_printf(" %s", si->Name);
if (disp) dbg_printf("+0x%lx", (DWORD_PTR)disp64);
if (disp64) dbg_printf("+0x%lx", (DWORD_PTR)disp64);
SymSetContext(dbg_curr_process->handle, &ihsf, NULL);
se.tmp = tmp;
......
......@@ -397,6 +397,7 @@ struct dbg_thread* dbg_add_thread(struct dbg_process* p, DWORD tid,
t->frames = NULL;
t->num_frames = 0;
t->curr_frame = -1;
t->addr_mode = AddrModeFlat;
snprintf(t->name, sizeof(t->name), "0x%08lx", tid);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment