Eric Pouech : winedbg: A couple of fixes after running valgrind.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Feb 16 05:34:07 CST 2006


Module: wine
Branch: refs/heads/master
Commit: a7ff2f671c5ff57645dc5f875c1e370ed9ceaf87
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=a7ff2f671c5ff57645dc5f875c1e370ed9ceaf87

Author: Eric Pouech <eric.pouech at wanadoo.fr>
Date:   Thu Feb 16 12:06:43 2006 +0100

winedbg: A couple of fixes after running valgrind.

---

 programs/winedbg/stack.c   |    3 ++-
 programs/winedbg/winedbg.c |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/programs/winedbg/stack.c b/programs/winedbg/stack.c
index f506f5f..91796c8 100644
--- a/programs/winedbg/stack.c
+++ b/programs/winedbg/stack.c
@@ -84,6 +84,7 @@ static BOOL stack_set_frame_internal(int
 
 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(in
         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;
diff --git a/programs/winedbg/winedbg.c b/programs/winedbg/winedbg.c
index 3a1caef..fae7a42 100644
--- a/programs/winedbg/winedbg.c
+++ b/programs/winedbg/winedbg.c
@@ -397,6 +397,7 @@ struct dbg_thread* dbg_add_thread(struct
     t->frames = NULL;
     t->num_frames = 0;
     t->curr_frame = -1;
+    t->addr_mode = AddrModeFlat;
 
     snprintf(t->name, sizeof(t->name), "0x%08lx", tid);
 




More information about the wine-cvs mailing list