Add basic support for Fortran binaries

Apparently, the only DWARF TAG that we needed to support to allow the
analysis of Fortran binaries is DW_TAG_string_type, at least for now.

The only place where we need to handle the DW_TAG_string_type is in
the DIE canonicalizer.  Basically, with this patch we now consider all
the DW_TAG_string_type DIEs as being equal.  This seems good enough for
ABIs purpose, unless proven otherwise.

Note that this fixes PR23492 and PR23905.

	* src/abg-dwarf-reader.cc (die_pretty_print_type): Support
	DW_TAG_string_type DIEs.  They all have the same representation
	for now.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
Dodji Seketeli 2018-11-29 11:18:57 +01:00
parent 8fee729a34
commit 2c6ecfad6f

View File

@ -10967,6 +10967,17 @@ die_pretty_print_type(read_context& ctxt, Dwarf_Die* die, size_t where_offset)
int tag = dwarf_tag(die);
switch (tag)
{
case DW_TAG_string_type:
// For now, we won't try to go get the actual representation of
// the string because this would make things more complicated;
// for that we'd need to interpret some location expressions to
// get the length of the string. And for dynamically allocated
// strings, the result of the location expression evaluation
// might not even be a constant. So at the moment I consider
// this to be a lot of hassle for no great return. Until proven
// otherwise, of course.
repr = "string type";
case DW_TAG_unspecified_type:
case DW_TAG_ptr_to_member_type:
break;
@ -11078,7 +11089,6 @@ die_pretty_print_type(read_context& ctxt, Dwarf_Die* die, size_t where_offset)
}
break;
case DW_TAG_string_type:
case DW_TAG_set_type:
case DW_TAG_file_type:
case DW_TAG_packed_type: