mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-16 12:28:46 +00:00
fix printing of Ada wide characters on ppc-aix
Same problem as before: We were downcasting the character value from
int to unsigned char, which caused an overflow. The reason why we did
not see this problem before is probably related to the fact that
we're using stabs on AIX and thus characters types are defined as
a TYPE_CODE_INT (or TYPE_CODE_RANGE?).
gdb/ChangeLog:
* ada-valprint.c (ada_print_scalar): Remove unsigned char downcast.
(ada_val_print_1): Likewise.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2011-01-18 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
|
* ada-valprint.c (ada_print_scalar): Remove unsigned char downcast.
|
||||||
|
(ada_val_print_1): Likewise.
|
||||||
|
|
||||||
2011-01-18 Joel Brobecker <brobecker@adacore.com>
|
2011-01-18 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
* rs6000-tdep.c (rs6000_skip_prologue): Make sure that the prologue
|
* rs6000-tdep.c (rs6000_skip_prologue): Make sure that the prologue
|
||||||
|
|||||||
@@ -417,7 +417,7 @@ ada_print_scalar (struct type *type, LONGEST val, struct ui_file *stream)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case TYPE_CODE_CHAR:
|
case TYPE_CODE_CHAR:
|
||||||
LA_PRINT_CHAR ((unsigned char) val, type, stream);
|
LA_PRINT_CHAR (val, type, stream);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TYPE_CODE_BOOL:
|
case TYPE_CODE_BOOL:
|
||||||
@@ -801,8 +801,7 @@ ada_val_print_1 (struct type *type, const gdb_byte *valaddr0,
|
|||||||
if (ada_is_character_type (type))
|
if (ada_is_character_type (type))
|
||||||
{
|
{
|
||||||
fputs_filtered (" ", stream);
|
fputs_filtered (" ", stream);
|
||||||
ada_printchar ((unsigned char) unpack_long (type, valaddr),
|
ada_printchar (unpack_long (type, valaddr), type, stream);
|
||||||
type, stream);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user