(is_class_or_union_type(get_type()),
"", /*one_line=*/true, internal);
result += " ";
- if (member_of_anonymous_class || !qualified_name)
+ if (!internal
+ && (member_of_anonymous_class || !qualified_name))
// It doesn't make sense to name the member of an
// anonymous class or union like:
// "__anonymous__::data_member_name". So let's just use
get_type_declaration(get_type())->get_qualified_name(internal)
+ " ";
- if (member_of_anonymous_class || !qualified_name)
+ if (!internal
+ && (member_of_anonymous_class || !qualified_name))
// It doesn't make sense to name the member of an
// anonymous class or union like:
// "__anonymous__::data_member_name". So let's just use
test-read-dwarf/PR28584/PR28584-smv.cc \
test-read-dwarf/PR28584/PR28584-smv.clang.o \
test-read-dwarf/PR28584/PR28584-smv.clang.o.abi \
+tests/data/test-read-dwarf/PR29443-missing-xx.cc \
+tests/data/test-read-dwarf/PR29443-missing-xx.o \
+tests/data/test-read-dwarf/PR29443-missing-xx.o.abi \
\
test-read-ctf/test0 \
test-read-ctf/test0.abi \
test-annotate/test-anonymous-members-0.cc \
test-annotate/test-anonymous-members-0.o \
test-annotate/test-anonymous-members-0.o.abi \
+tests/data/test-annotate/PR29443-missing-xx.o.annotated.abi \
\
test-types-stability/pr19434-elf0 \
test-types-stability/pr19139-DomainNeighborMapInst.o \
--- /dev/null
+<abi-corpus version='2.1' architecture='elf-amd-x86_64'>
+ <elf-variable-symbols>
+ <!-- signed char -->
+ <elf-symbol name='a' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
+ <!-- xx -->
+ <elf-symbol name='xx' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
+ </elf-variable-symbols>
+ <abi-instr address-size='64' path='PR29443-missing-xx.cc' comp-dir-path='/home/dodji/git/libabigail/fixes/tests/data/test-read-dwarf' language='LANG_C_plus_plus_14'>
+ <!-- int -->
+ <type-decl name='int' size-in-bits='32' id='type-id-1'/>
+ <!-- struct A -->
+ <class-decl name='A' size-in-bits='32' is-struct='yes' visibility='default' filepath='/home/dodji/git/libabigail/fixes/tests/data/test-read-dwarf/PR29443-missing-xx.cc' line='1' column='1' id='type-id-2'>
+ <member-type access='public'>
+ <!-- struct {int xx;} -->
+ <class-decl name='__anonymous_struct__' size-in-bits='32' is-struct='yes' is-anonymous='yes' visibility='default' filepath='/home/dodji/git/libabigail/fixes/tests/data/test-read-dwarf/PR29443-missing-xx.cc' line='2' column='1' id='type-id-3'>
+ <data-member access='public' layout-offset-in-bits='0'>
+ <!-- int xx -->
+ <var-decl name='xx' type-id='type-id-1' visibility='default' filepath='/home/dodji/git/libabigail/fixes/tests/data/test-read-dwarf/PR29443-missing-xx.cc' line='3' column='1'/>
+ </data-member>
+ </class-decl>
+ </member-type>
+ <data-member access='public' layout-offset-in-bits='0'>
+ <!-- struct {int xx;} -->
+ <var-decl name='' type-id='type-id-3' visibility='default'/>
+ </data-member>
+ </class-decl>
+ <!-- A a -->
+ <var-decl name='a' type-id='type-id-2' mangled-name='a' visibility='default' filepath='/home/dodji/git/libabigail/fixes/tests/data/test-read-dwarf/PR29443-missing-xx.cc' line='7' column='1' elf-symbol-id='a'/>
+ <!-- int xx -->
+ <var-decl name='xx' type-id='type-id-1' mangled-name='xx' visibility='default' filepath='/home/dodji/git/libabigail/fixes/tests/data/test-read-dwarf/PR29443-missing-xx.cc' line='13' column='1' elf-symbol-id='xx'/>
+ </abi-instr>
+</abi-corpus>
--- /dev/null
+struct A {
+ struct {
+ int xx;
+ };
+};
+
+struct A a;
+int xx;
--- /dev/null
+<abi-corpus version='2.1'>
+ <elf-variable-symbols>
+ <elf-symbol name='a' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
+ <elf-symbol name='xx' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
+ </elf-variable-symbols>
+ <abi-instr address-size='64' path='PR29443-missing-xx.cc' comp-dir-path='/home/dodji/git/libabigail/fixes/tests/data/test-read-dwarf' language='LANG_C_plus_plus_14'>
+ <type-decl name='int' size-in-bits='32' id='type-id-1'/>
+ <class-decl name='A' size-in-bits='32' is-struct='yes' visibility='default' filepath='/home/dodji/git/libabigail/fixes/tests/data/test-read-dwarf/PR29443-missing-xx.cc' line='1' column='1' id='type-id-2'>
+ <member-type access='public'>
+ <class-decl name='__anonymous_struct__' size-in-bits='32' is-struct='yes' is-anonymous='yes' visibility='default' filepath='/home/dodji/git/libabigail/fixes/tests/data/test-read-dwarf/PR29443-missing-xx.cc' line='2' column='1' id='type-id-3'>
+ <data-member access='public' layout-offset-in-bits='0'>
+ <var-decl name='xx' type-id='type-id-1' visibility='default' filepath='/home/dodji/git/libabigail/fixes/tests/data/test-read-dwarf/PR29443-missing-xx.cc' line='3' column='1'/>
+ </data-member>
+ </class-decl>
+ </member-type>
+ <data-member access='public' layout-offset-in-bits='0'>
+ <var-decl name='' type-id='type-id-3' visibility='default'/>
+ </data-member>
+ </class-decl>
+ <var-decl name='a' type-id='type-id-2' mangled-name='a' visibility='default' filepath='/home/dodji/git/libabigail/fixes/tests/data/test-read-dwarf/PR29443-missing-xx.cc' line='7' column='1' elf-symbol-id='a'/>
+ <var-decl name='xx' type-id='type-id-1' mangled-name='xx' visibility='default' filepath='/home/dodji/git/libabigail/fixes/tests/data/test-read-dwarf/PR29443-missing-xx.cc' line='13' column='1' elf-symbol-id='xx'/>
+ </abi-instr>
+</abi-corpus>
"data/test-annotate/test-anonymous-members-0.o.abi",
"output/test-annotate/test-anonymous-members-0.o.abi",
},
+ {
+ "data/test-read-dwarf/PR29443-missing-xx.o",
+ "data/test-annotate/PR29443-missing-xx.o.annotated.abi",
+ "output/test-annotate/PR29443-missing-xx.o.annotated.abi",
+ },
// This should be the last entry.
{NULL, NULL, NULL}
};
"data/test-read-dwarf/PR28584/PR28584-smv.clang.o.abi",
"output/test-read-dwarf/PR28584/PR28584-smv.clang.o.abi",
},
+ {
+ "data/test-read-dwarf/PR29443-missing-xx.o",
+ "",
+ "",
+ SEQUENCE_TYPE_ID_STYLE,
+ "data/test-read-dwarf/PR29443-missing-xx.o.abi",
+ "output/test-read-dwarf/PR29443-missing-xx.o.abi",
+ },
// This should be the last entry.
{NULL, NULL, NULL, SEQUENCE_TYPE_ID_STYLE, NULL, NULL}
};