mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-15 22:04:48 +08:00
2007-09-26 Pierre Muller <muller@ics.u-strasbg.fr>
* Fix PR pascal/2283 p-valprint.c (pascal_val_print): correct current language check. Also print array of char as strings.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2007-09-26 Pierre Muller <muller@ics.u-strasbg.fr>
|
||||||
|
|
||||||
|
* Fix PR pascal/2283
|
||||||
|
p-valprint.c (pascal_val_print): correct current language check.
|
||||||
|
Also print array of char as strings.
|
||||||
|
|
||||||
|
|
||||||
2007-09-26 David Ung <davidu@mips.com>
|
2007-09-26 David Ung <davidu@mips.com>
|
||||||
Maciej W. Rozycki <macro@mips.com>
|
Maciej W. Rozycki <macro@mips.com>
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr,
|
|||||||
/* For an array of chars, print with string syntax. */
|
/* For an array of chars, print with string syntax. */
|
||||||
if (eltlen == 1
|
if (eltlen == 1
|
||||||
&& ((TYPE_CODE (elttype) == TYPE_CODE_INT)
|
&& ((TYPE_CODE (elttype) == TYPE_CODE_INT)
|
||||||
|| ((current_language->la_language == language_m2)
|
|| ((current_language->la_language == language_pascal)
|
||||||
&& (TYPE_CODE (elttype) == TYPE_CODE_CHAR)))
|
&& (TYPE_CODE (elttype) == TYPE_CODE_CHAR)))
|
||||||
&& (format == 0 || format == 's'))
|
&& (format == 0 || format == 's'))
|
||||||
{
|
{
|
||||||
@ -170,7 +170,8 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr,
|
|||||||
/* For a pointer to char or unsigned char, also print the string
|
/* For a pointer to char or unsigned char, also print the string
|
||||||
pointed to, unless pointer is null. */
|
pointed to, unless pointer is null. */
|
||||||
if (TYPE_LENGTH (elttype) == 1
|
if (TYPE_LENGTH (elttype) == 1
|
||||||
&& TYPE_CODE (elttype) == TYPE_CODE_INT
|
&& (TYPE_CODE (elttype) == TYPE_CODE_INT
|
||||||
|
|| TYPE_CODE(elttype) == TYPE_CODE_CHAR)
|
||||||
&& (format == 0 || format == 's')
|
&& (format == 0 || format == 's')
|
||||||
&& addr != 0)
|
&& addr != 0)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user