This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [RFA]dwarf reader: Avoid complaint on const type

 I agree with Doug's analysis that new_symbol
should never be called for those dwarf tags.
 The most logical seems to just revert the addition of 
of the two tags, which would lead to a complaint if
new_symbol would be called for those tags,
as it did before my original patch.
  As Doug explained, this should not happen anymore
as new_symbol is only called from process_die
and the first part of the patch removes this call for
DW_TAG_const_type and DW_TAG_volatile_type.

  Tested on x86_64 linux machine from GCC compiler farm,
nothing related to the patch seemed to appear.
(sigaltstack.exp showed failures but I don't think this is related).

2010-06-29  Pierre Muller  <>
	    Doug Evans  <>

	* dwarf2read.c (process_die): Only call read_type_die function for
	const and volatile modifiers.
	(new_symbol): Revert change adding a new type for DW_TAG_const_type
	or DW_TAG_volatile_type tag if it has a name attribute.

Index: src/gdb/dwarf2read.c
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.406
diff -u -p -r1.406 dwarf2read.c
--- src/gdb/dwarf2read.c	28 Jun 2010 22:03:31 -0000	1.406
+++ src/gdb/dwarf2read.c	29 Jun 2010 12:31:55 -0000
@@ -3220,12 +3220,15 @@ process_die (struct die_info *die, struc
     case DW_TAG_base_type:
     case DW_TAG_subrange_type:
     case DW_TAG_typedef:
-    case DW_TAG_const_type:
-    case DW_TAG_volatile_type:
       /* Add a typedef symbol for the type definition, if it has a
          DW_AT_name.  */
       new_symbol (die, read_type_die (die, cu), cu);
+      /* Type modifiers should be accepted without creating a new type
name.  */
+    case DW_TAG_const_type:
+    case DW_TAG_volatile_type:
+      read_type_die (die, cu);
+      break;
     case DW_TAG_common_block:
       read_common_block (die, cu);
@@ -8987,9 +8990,7 @@ new_symbol (struct die_info *die, struct
 	  add_symbol_to_list (sym, cu->list_in_scope);
 	case DW_TAG_base_type:
-        case DW_TAG_subrange_type:
-        case DW_TAG_const_type:
-        case DW_TAG_volatile_type:
+	case DW_TAG_subrange_type:
 	  add_symbol_to_list (sym, cu->list_in_scope);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]