# Proposal to add DW_AT_lower_bound to DW_TAG_string_type
## Background
Pascal normally use 1-based indexes for strings. But it can also
generate strings with a 0-based index.
Other languages may have varying defaults.
For a debugger to show the result of an expression like
`MyString[5]`
the start value of the index is needed.
## Proposed Changes
1. Allow DW_AT_lower_bound as an attribute in DW_TAG_string_type.
2. Define a list of language specific defaults (as exists for subrange
low bounds)
The default for DW_LANG_Pascal83 should be `1`
## References
http://docwiki.embarcadero.com/RADStudio/Athens/en/Zero-based_strings_(Delphi)
Also supported by FreePascal
--
Dwarf-discuss mailing list
Dwarf-discuss@lists.dwarfstd.org
https://lists.dwarfstd.org/mailman/listinfo/dwarf-discuss