Eric Pouech : dbghelp: Only reply to offset requests on symt_data in SymGetTypeInfo() for locals and parameters.

Alexandre Julliard julliard at winehq.org
Tue Jul 12 16:45:37 CDT 2022


Module: wine
Branch: master
Commit: a5c6cd5aefe40c0c104b26cbfeae9da1528f9b99
URL:    https://gitlab.winehq.org/wine/wine/-/commit/a5c6cd5aefe40c0c104b26cbfeae9da1528f9b99

Author: Eric Pouech <eric.pouech at gmail.com>
Date:   Tue Jul 12 09:28:57 2022 +0200

dbghelp: Only reply to offset requests on symt_data in SymGetTypeInfo() for locals and parameters.

Signed-off-by: Eric Pouech <eric.pouech at gmail.com>

---

 dlls/dbghelp/type.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/dlls/dbghelp/type.c b/dlls/dbghelp/type.c
index 170104bef86..53ba85f9e77 100644
--- a/dlls/dbghelp/type.c
+++ b/dlls/dbghelp/type.c
@@ -939,7 +939,13 @@ BOOL symt_get_info(struct module* module, const struct symt* type,
             {
             case DataIsParam:
             case DataIsLocal:
-                X(ULONG) = ((const struct symt_data*)type)->u.var.offset; 
+                {
+                    struct location loc = ((const struct symt_data*)type)->u.var;
+                    if (loc.kind == loc_register || loc.kind == loc_regrel)
+                        X(ULONG) = ((const struct symt_data*)type)->u.var.offset;
+                    else
+                        return FALSE; /* FIXME perhaps do better with local context? */
+                }
                 break;
             case DataIsMember:
                 X(ULONG) = ((const struct symt_data*)type)->u.member.offset;




More information about the wine-cvs mailing list