mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-28 10:00:51 +00:00
1) Handling of the DW_AT_byte_size attribute when processing a
DW_TAG_string_type (this is acceptable under the current DWARF 2.1/3.0 standard.) 2) In read_tag_string_type(), a fix for FORTRAN that propagates the first string length to all string types. This is important as FORTRAN strings are not delimited as in C/C++. 3) Handling of the DW_LANG_Fortran95.
This commit is contained in:
@@ -2786,12 +2786,30 @@ read_tag_string_type (struct die_info *die, struct objfile *objfile)
|
||||
}
|
||||
else
|
||||
{
|
||||
length = 1;
|
||||
/* check for the DW_AT_byte_size attribute */
|
||||
attr = dwarf_attr (die, DW_AT_byte_size);
|
||||
if (attr)
|
||||
{
|
||||
length = DW_UNSND (attr);
|
||||
}
|
||||
else
|
||||
{
|
||||
length = 1;
|
||||
}
|
||||
}
|
||||
index_type = dwarf2_fundamental_type (objfile, FT_INTEGER);
|
||||
range_type = create_range_type (NULL, index_type, 1, length);
|
||||
char_type = dwarf2_fundamental_type (objfile, FT_CHAR);
|
||||
type = create_string_type (char_type, range_type);
|
||||
if (cu_language == language_fortran)
|
||||
{
|
||||
/* Need to create a unique string type for bounds
|
||||
information */
|
||||
type = create_string_type (0, range_type);
|
||||
}
|
||||
else
|
||||
{
|
||||
char_type = dwarf2_fundamental_type (objfile, FT_CHAR);
|
||||
type = create_string_type (char_type, range_type);
|
||||
}
|
||||
die->type = type;
|
||||
}
|
||||
|
||||
@@ -3797,6 +3815,7 @@ set_cu_language (unsigned int lang)
|
||||
break;
|
||||
case DW_LANG_Fortran77:
|
||||
case DW_LANG_Fortran90:
|
||||
case DW_LANG_Fortran95:
|
||||
cu_language = language_fortran;
|
||||
break;
|
||||
case DW_LANG_Mips_Assembler:
|
||||
|
||||
Reference in New Issue
Block a user