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: [patch] Fix DW_AT_lower_bound DWARF-4+ defaults


>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> +	case language_d:
Jan> +	case language_java:
Jan> +	case language_objc:
Jan> +	  if (cu->header.version >= 4)
Jan> +	    low = 0;
Jan> +	  break;

I looked at the DWARF 3 spec and it says:

    If the lower bound value is missing, the value is assumed to be a
    language-dependent default constant. The default lower bound value for C
    or C++ is 0. For Fortran, it is 1.

So it seems wrong to complain here; at least for Java and ObjC, where
there is only a single sensible default.  I can't speak for the other
languages, but even there I think the DWARF text mentioning specific
defaults is informative, not exhaustive, and we should just pick a
reasonable default and not complain.

Tom


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