Commit a181ad5a authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

winedbg: Also handle 1 byte signed int as they were char (PDB files are done like this... sigh).

parent 418a001e
...@@ -340,6 +340,7 @@ static void print_typed_basic(const struct dbg_lvalue* lvalue) ...@@ -340,6 +340,7 @@ static void print_typed_basic(const struct dbg_lvalue* lvalue)
case btInt: case btInt:
case btLong: case btLong:
if (!be_cpu->fetch_integer(lvalue, size, TRUE, &val_int)) return; if (!be_cpu->fetch_integer(lvalue, size, TRUE, &val_int)) return;
if (size == 1) goto print_char;
dbg_print_longlong(val_int, TRUE); dbg_print_longlong(val_int, TRUE);
break; break;
case btUInt: case btUInt:
...@@ -354,6 +355,7 @@ static void print_typed_basic(const struct dbg_lvalue* lvalue) ...@@ -354,6 +355,7 @@ static void print_typed_basic(const struct dbg_lvalue* lvalue)
case btChar: case btChar:
if (!be_cpu->fetch_integer(lvalue, size, TRUE, &val_int)) return; if (!be_cpu->fetch_integer(lvalue, size, TRUE, &val_int)) return;
/* FIXME: should do the same for a Unicode character (size == 2) */ /* FIXME: should do the same for a Unicode character (size == 2) */
print_char:
if (size == 1 && (val_int < 0x20 || val_int > 0x80)) if (size == 1 && (val_int < 0x20 || val_int > 0x80))
dbg_printf("%d", (int)val_int); dbg_printf("%d", (int)val_int);
else else
...@@ -381,8 +383,8 @@ static void print_typed_basic(const struct dbg_lvalue* lvalue) ...@@ -381,8 +383,8 @@ static void print_typed_basic(const struct dbg_lvalue* lvalue)
if (!types_get_real_type(&sub_type, &tag)) return; if (!types_get_real_type(&sub_type, &tag)) return;
if (types_get_info(&sub_type, TI_GET_SYMTAG, &tag) && tag == SymTagBaseType && if (types_get_info(&sub_type, TI_GET_SYMTAG, &tag) && tag == SymTagBaseType &&
types_get_info(&sub_type, TI_GET_BASETYPE, &bt) && bt == btChar && types_get_info(&sub_type, TI_GET_BASETYPE, &bt) && (bt == btChar || bt == btInt) &&
types_get_info(&sub_type, TI_GET_LENGTH, &size64)) types_get_info(&sub_type, TI_GET_LENGTH, &size64) && size64 == 1)
{ {
char buffer[1024]; char buffer[1024];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment