Eric Pouech : winedbg: Added support for constant values passed by dbghelp.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Dec 6 05:49:02 CST 2006


Module: wine
Branch: master
Commit: 32a8b2fa59cd4b4514d36f26134027cb0841ff4f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=32a8b2fa59cd4b4514d36f26134027cb0841ff4f

Author: Eric Pouech <eric.pouech at wanadoo.fr>
Date:   Tue Dec  5 22:13:33 2006 +0100

winedbg: Added support for constant values passed by dbghelp.

---

 programs/winedbg/symbol.c |   25 ++++++++++++++++++++++++-
 1 files changed, 24 insertions(+), 1 deletions(-)

diff --git a/programs/winedbg/symbol.c b/programs/winedbg/symbol.c
index 55e35ee..f714409 100644
--- a/programs/winedbg/symbol.c
+++ b/programs/winedbg/symbol.c
@@ -87,6 +87,29 @@ static BOOL fill_sym_lvalue(const SYMBOL
         lvalue->cookie = DLV_TARGET;
         lvalue->addr.Offset = (ULONG)((ULONG64)*pval + sym->Address);
     }
+    else if (sym->Flags & SYMFLAG_VALUEPRESENT)
+    {
+        struct dbg_type type;
+        VARIANT         v;
+        DWORD*          pdw;
+
+        type.module = sym->ModBase;
+        type.id = sym->info;
+
+        /* FIXME: this won't work for pointers, as we always for the
+         * dereference to be in debuggee address space while here
+         * it's in debugger address space
+         */
+        if (!types_get_info(&type, TI_GET_VALUE, &v) || (v.n1.n2.vt & VT_BYREF))
+        {
+            snprintf(buffer, sz, "Couldn't dereference pointer for const value");
+            return FALSE;
+        }
+        pdw = (DWORD*)lexeme_alloc_size(sizeof(*pdw));
+        lvalue->cookie = DLV_HOST;
+        lvalue->addr.Offset = (ULONG)(DWORD_PTR)pdw;
+        *pdw = sym->Value;
+    }
     else if (sym->Flags & SYMFLAG_LOCAL)
     {
         lvalue->cookie = DLV_TARGET;
@@ -125,7 +148,7 @@ static BOOL CALLBACK sgv_cb(SYMBOL_INFO*
 {
     struct sgv_data*    sgv = (struct sgv_data*)ctx;
     unsigned            insp;
-    char                tmp[32];
+    char                tmp[64];
 
     if (sym->Flags & SYMFLAG_THUNK)
     {




More information about the wine-cvs mailing list