From: Dodji Seketeli Date: Thu, 29 Nov 2018 10:18:57 +0000 (+0100) Subject: Add basic support for Fortran binaries X-Git-Tag: libabigail-1.6~29 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2c6ecfad6fe61c02ef78db97d1b96039c0892fa0;p=platform%2Fupstream%2Flibabigail.git 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 --- diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc index 02abc1a1..c8b197b3 100644 --- a/src/abg-dwarf-reader.cc +++ b/src/abg-dwarf-reader.cc @@ -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: