winedbg enhancement
Eric Pouech
eric.pouech at wanadoo.fr
Sat Jan 12 08:52:34 CST 2002
when several "objects" of same name exist in winedbg, and the user
requests one of these object
by its in a command, the list presented (with all the object of this
name), is a bit enhanced
the local symbols (from current stack frame) are now clearly indicated
A+
--
---------------
Eric Pouech (http://perso.wanadoo.fr/eric.pouech/)
"The future will be better tomorrow", Vice President Dan Quayle
-------------- next part --------------
Name: wdbg_sympick
ChangeLog: enhance display for symbol picking
GenDate: 2002/01/12 14:32:24 UTC
ModifiedFiles: debugger/hash.c
AddedFiles:
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/debugger/hash.c,v
retrieving revision 1.25
diff -u -u -r1.25 hash.c
--- debugger/hash.c 23 Nov 2001 23:10:08 -0000 1.25
+++ debugger/hash.c 2 Jan 2002 10:06:56 -0000
@@ -362,7 +362,7 @@
/* FIXME: NUMDBGV should be made variable */
DBG_VALUE value[NUMDBGV];
DBG_VALUE vtmp;
- int num, i;
+ int num, i, local = -1;
num = DEBUG_GSV_Helper(name, lineno, value, NUMDBGV, bp_flag);
if (!num && (name[0] != '_'))
@@ -379,6 +379,7 @@
if (DEBUG_GetStackSymbolValue(name, &vtmp) && num < NUMDBGV)
{
value[num] = vtmp;
+ local = num;
num++;
}
@@ -396,8 +397,19 @@
DEBUG_Printf(DBG_CHN_MESG, "Many symbols with name '%s', choose the one you want (<cr> to abort):\n", name);
for (i = 0; i < num; i++) {
DEBUG_Printf(DBG_CHN_MESG, "[%d]: ", i + 1);
- DEBUG_PrintAddress( &value[i].addr, DEBUG_GetSelectorType(value[i].addr.seg), TRUE);
- DEBUG_Printf(DBG_CHN_MESG, "\n");
+ if (i == local) {
+ struct name_hash*func;
+ unsigned int ebp;
+ unsigned int eip;
+
+ if (DEBUG_GetCurrentFrame(&func, &eip, &ebp))
+ DEBUG_Printf(DBG_CHN_MESG, "local variable of %s in %s\n", func->name, func->sourcefile);
+ else
+ DEBUG_Printf(DBG_CHN_MESG, "local variable\n");
+ } else {
+ DEBUG_PrintAddress( &value[i].addr, DEBUG_GetSelectorType(value[i].addr.seg), TRUE);
+ DEBUG_Printf(DBG_CHN_MESG, "\n");
+ }
}
do {
i = 0;
More information about the wine-patches
mailing list