[PATCH 07/13] [DbgHelp]: added preliminary support for a strange stack variable object
Eric Pouech
eric.pouech at orange.fr
Wed Feb 6 14:55:40 CST 2008
A+
---
dlls/dbghelp/msc.c | 11 +++++++++++
include/wine/mscvpdb.h | 11 +++++++++++
tools/winedump/msc.c | 6 ++++++
3 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c
index 4cbe32e..b519d81 100644
--- a/dlls/dbghelp/msc.c
+++ b/dlls/dbghelp/msc.c
@@ -1476,6 +1476,17 @@ static int codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* root
codeview_get_type(sym->stack_v3.symtype, FALSE),
sym->stack_v3.name);
break;
+ case S_BPREL_XXXX_V3:
+ loc.kind = loc_regrel;
+ loc.reg = 0; /* FIXME */
+ loc.offset = sym->stack_xxxx_v3.offset;
+ WARN("Supposed stack variable %s (%d)\n", sym->stack_xxxx_v3.name, sym->stack_xxxx_v3.unknown);
+ symt_add_func_local(msc_dbg->module, curr_func,
+ sym->stack_xxxx_v3.offset > 0 ? DataIsParam : DataIsLocal,
+ &loc, block,
+ codeview_get_type(sym->stack_xxxx_v3.symtype, FALSE),
+ sym->stack_xxxx_v3.name);
+ break;
case S_REGISTER_V1:
loc.kind = loc_register;
diff --git a/include/wine/mscvpdb.h b/include/wine/mscvpdb.h
index 47a8e72..8ea37e1 100644
--- a/include/wine/mscvpdb.h
+++ b/include/wine/mscvpdb.h
@@ -1343,6 +1343,16 @@ union codeview_symbol
struct
{
+ short int len; /* Total length of this entry */
+ short int id; /* Always S_BPREL_V3 */
+ int offset; /* Stack offset relative to BP */
+ unsigned int symtype;
+ unsigned short unknown;
+ char name[1];
+ } stack_xxxx_v3;
+
+ struct
+ {
short int len; /* Total length of this entry */
short int id; /* Always S_REGISTER */
unsigned short type;
@@ -1583,6 +1593,7 @@ union codeview_symbol
#define S_PUB_V3 0x110E
#define S_LPROC_V3 0x110F
#define S_GPROC_V3 0x1110
+#define S_BPREL_XXXX_V3 0x1111 /* not really understood, but looks like bprel... */
#define S_MSTOOL_V3 0x1116 /* compiler command line options and build information */
#define S_PUB_FUNC1_V3 0x1125 /* didn't get the difference between the two */
#define S_PUB_FUNC2_V3 0x1127
diff --git a/tools/winedump/msc.c b/tools/winedump/msc.c
index 42878f2..7fb77c4 100644
--- a/tools/winedump/msc.c
+++ b/tools/winedump/msc.c
@@ -992,6 +992,12 @@ int codeview_dump_symbols(const void* root, unsigned long size)
sym->stack_v3.symtype, curr_func);
break;
+ case S_BPREL_XXXX_V3:
+ printf("\tS-BP-relative XXXX V3: '%s' @%d type:%x unkn:%x (in %s)\n",
+ sym->stack_xxxx_v3.name, sym->stack_xxxx_v3.offset,
+ sym->stack_xxxx_v3.symtype, sym->stack_xxxx_v3.unknown, curr_func);
+ break;
+
case S_REGISTER_V1:
printf("\tS-Register V1 '%s' in %s type:%x register:%x\n",
p_string(&sym->register_v1.p_name),
More information about the wine-patches
mailing list