Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] dwarf2read pascal language char recognition.
@ 2009-02-10 15:14 Pierre Muller
  2009-02-11 18:56 ` Joel Brobecker
  0 siblings, 1 reply; 3+ messages in thread
From: Pierre Muller @ 2009-02-10 15:14 UTC (permalink / raw)
  To: elena.zannoni; +Cc: 'gdb-patches ml', 'Jonas Maebe'

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;


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-02-11 22:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-10 15:14 [RFA] dwarf2read pascal language char recognition Pierre Muller
2009-02-11 18:56 ` Joel Brobecker
2009-02-11 22:31   ` Pierre Muller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox