winedbg: In 'info locals' command, show the full register/stack layout for parameters & locals.

This commit is contained in:
Eric Pouech 2012-06-24 13:03:09 +02:00 committed by Alexandre Julliard
parent 83462bf081
commit 244099689c
1 changed files with 10 additions and 1 deletions

View File

@ -81,11 +81,20 @@ static BOOL fill_sym_lvalue(const SYMBOL_INFO* sym, ULONG_PTR base,
else if (sym->Flags & SYMFLAG_REGREL) else if (sym->Flags & SYMFLAG_REGREL)
{ {
DWORD_PTR* pval; DWORD_PTR* pval;
size_t l;
*buffer++ = '['; sz--;
if (!memory_get_register(sym->Register, &pval, buffer, sz)) if (!memory_get_register(sym->Register, &pval, buffer, sz))
return FALSE; return FALSE;
l = strlen(buffer);
sz -= l;
buffer += l;
lvalue->cookie = DLV_TARGET; lvalue->cookie = DLV_TARGET;
lvalue->addr.Offset = (ULONG64)*pval + sym->Address; lvalue->addr.Offset = (ULONG64)*pval + sym->Address;
if ((LONG_PTR)sym->Address >= 0)
snprintf(buffer, sz, "+%ld]", (ULONG_PTR)sym->Address);
else
snprintf(buffer, sz, "-%ld]", -(LONG_PTR)sym->Address);
} }
else if (sym->Flags & SYMFLAG_VALUEPRESENT) else if (sym->Flags & SYMFLAG_VALUEPRESENT)
{ {
@ -711,7 +720,7 @@ void symbol_print_local(const SYMBOL_INFO* sym, DWORD_PTR base, BOOL detailed)
{ {
print_value(&lvalue, 0, 1); print_value(&lvalue, 0, 1);
if (detailed) if (detailed)
dbg_printf(" (%s%s)", dbg_printf(" (%s %s)",
(sym->Flags & SYMFLAG_PARAMETER) ? "parameter" : "local", (sym->Flags & SYMFLAG_PARAMETER) ? "parameter" : "local",
buffer); buffer);
} }