If function die_name() finds a DIE without a name, set its name to
"__anon__". This hack is used to workaround a issue that compilers like GCC could generate DW_TAG_base_type DIE without a name. Note that we didn't need this before because the old libdwarf internally set all the unnamed DIE's name to "__anon__".
This commit is contained in:
parent
58fc1c99e4
commit
1391789ee2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/elftoolchain/; revision=260797
@ -431,6 +431,8 @@ die_name(dwarf_t *dw, Dwarf_Die die)
|
||||
char *str = NULL;
|
||||
|
||||
(void) die_string(dw, die, DW_AT_name, &str, 0);
|
||||
if (str == NULL)
|
||||
str = xstrdup("__anon__");
|
||||
|
||||
return (str);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user