[RFA] dwarf2read pascal language char recognition.

Pierre Muller
2009-02-10T15:14:10Z

Jonas Maebe pointed me to a pascal specific error
in dwarf2read code.
This patch sets TYPE_CODE for
DW_ATE_signed_char and DW_ATE_unsigned_char
to TYPE_CODE_CHAR in case of Pascal (rather than only for Ada and Modula-2).

This could almost go in as obvious, but
I still prefer to ask for your approval.

Is it OK to check this in?

Pierre Muller
Pascal language support maintainer for GDB

2009-02-10 Pierre Muller <muller@ics.u-strasbg.fr>

* dwarf2read.c (read_base_type): Set code to TYPE_CODE_CHAR
for DW_ATE_signed_char and DW_ATE_unisgned_char
for pascal language.

Index: gdb/dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.293
diff -u -p -r1.293 dwarf2read.c
--- gdb/dwarf2read.c 9 Feb 2009 00:07:53 -0000 1.293
+++ gdb/dwarf2read.c 10 Feb 2009 15:03:07 -0000
@@ -5098,11 +5098,13 @@ read_base_type (struct die_info *die, st
type_flags |= TYPE_FLAG_UNSIGNED;
break;
case DW_ATE_signed_char:
- if (cu->language == language_ada || cu->language == language_m2)
+ if (cu->language == language_ada || cu->language == language_m2
+ || cu->language == language_pascal)
code = TYPE_CODE_CHAR;
break;
case DW_ATE_unsigned_char:
- if (cu->language == language_ada || cu->language == language_m2)
+ if (cu->language == language_ada || cu->language == language_m2
+ || cu->language == language_pascal)
code = TYPE_CODE_CHAR;
type_flags |= TYPE_FLAG_UNSIGNED;
break;