This is the mail archive of the gdb-patches@sourceware.org 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


>>>>> "Pierre" == Pierre Muller <pierre.muller@ics-cnrs.unistra.fr> writes:

Pierre> --- src/gdb/dwarf2read.c	28 Jun 2010 22:03:31 -0000	1.406
Pierre> +++ src/gdb/dwarf2read.c	29 Jun 2010 12:31:55 -0000
Pierre> @@ -3220,12 +3220,15 @@ process_die (struct die_info *die, struc
Pierre>      case DW_TAG_base_type:
Pierre>      case DW_TAG_subrange_type:
Pierre>      case DW_TAG_typedef:
Pierre> -    case DW_TAG_const_type:
Pierre> -    case DW_TAG_volatile_type:
Pierre>        /* Add a typedef symbol for the type definition, if it has a
Pierre>           DW_AT_name.  */
Pierre>        new_symbol (die, read_type_die (die, cu), cu);
Pierre>        break;
Pierre> +      /* Type modifiers should be accepted without creating a new type
Pierre> name.  */
Pierre> +    case DW_TAG_const_type:
Pierre> +    case DW_TAG_volatile_type:
Pierre> +      read_type_die (die, cu);
Pierre> +      break;

Why here and not a little earlier, with this case?

    /* These dies have a type, but processing them does not create
       a symbol or recurse to process the children.  Therefore we can
       read them on-demand through read_type_die.  */
    case DW_TAG_subroutine_type:
    case DW_TAG_set_type:
    case DW_TAG_array_type:
    case DW_TAG_pointer_type:
    case DW_TAG_ptr_to_member_type:
    case DW_TAG_reference_type:
    case DW_TAG_string_type:
      break;

Pierre>  	case DW_TAG_base_type:
Pierre> -        case DW_TAG_subrange_type:
Pierre> -        case DW_TAG_const_type:
Pierre> -        case DW_TAG_volatile_type:
Pierre> +	case DW_TAG_subrange_type:
Pierre>  	  SYMBOL_CLASS (sym) = LOC_TYPEDEF;
Pierre>  	  SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
Pierre>  	  add_symbol_to_list (sym, cu->list_in_scope);

Why remove DW_TAG_subrange_type here?

Tom


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