winedbg: Added 'a' to the format supported in examine command (a stands for address).

This commit is contained in:
Eric Pouech 2009-12-14 22:05:34 +01:00 committed by Alexandre Julliard
parent 5aa859de72
commit f96bdda0f3
2 changed files with 17 additions and 8 deletions

View File

@ -109,7 +109,7 @@ static int syntax_error;
DIGIT [0-9] DIGIT [0-9]
HEXDIGIT [0-9a-fA-F] HEXDIGIT [0-9a-fA-F]
FORMAT [ubcdgiswx] FORMAT [ubcdgiswxa]
IDENTIFIER [_a-zA-Z~?][_a-zA-Z0-9~?@]* IDENTIFIER [_a-zA-Z~?][_a-zA-Z0-9~?@]*
PATHNAME [\\/_a-zA-Z0-9\.~@][\\/\-_a-zA-Z0-9\.~@]* PATHNAME [\\/_a-zA-Z0-9\.~@][\\/\-_a-zA-Z0-9\.~@]*
STRING \"[^\n"]+\" STRING \"[^\n"]+\"

View File

@ -216,15 +216,24 @@ void memory_examine(const struct dbg_lvalue *lvalue, int count, char format)
} \ } \
} \ } \
dbg_printf("\n"); \ dbg_printf("\n"); \
} \ }
return
#define DO_DUMP(_t,_l,_f) DO_DUMP2(_t,_l,_f,_v) #define DO_DUMP(_t,_l,_f) DO_DUMP2(_t,_l,_f,_v)
case 'x': DO_DUMP(int, 4, " %8.8x"); case 'x': DO_DUMP(int, 4, " %8.8x"); break;
case 'd': DO_DUMP(unsigned int, 4, " %4.4d"); case 'd': DO_DUMP(unsigned int, 4, " %4.4d"); break;
case 'w': DO_DUMP(unsigned short, 8, " %04x"); case 'w': DO_DUMP(unsigned short, 8, " %04x"); break;
case 'c': DO_DUMP2(char, 32, " %c", (_v < 0x20) ? ' ' : _v); case 'a':
case 'b': DO_DUMP2(char, 16, " %02x", (_v) & 0xff); if (sizeof(DWORD_PTR) == 4)
{
DO_DUMP(DWORD_PTR, 4, " %8.8lx");
}
else
{
DO_DUMP(DWORD_PTR, 2, " %16.16lx");
}
break;
case 'c': DO_DUMP2(char, 32, " %c", (_v < 0x20) ? ' ' : _v); break;
case 'b': DO_DUMP2(char, 16, " %02x", (_v) & 0xff); break;
} }
} }