core: function__tag_fprintf should check if the alias name is NULL
Only seen in some C++ inline expansion cases. Will appear as "(null)" in the rendered source code. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
e924cacdf6
commit
a386913705
|
@ -1860,8 +1860,11 @@ static size_t function__tag_fprintf(const struct tag *tag, const struct cu *cu,
|
||||||
printed = fprintf(fp, "%.*s", indent, tabs);
|
printed = fprintf(fp, "%.*s", indent, tabs);
|
||||||
name = function__name(alias, cu);
|
name = function__name(alias, cu);
|
||||||
n = fprintf(fp, "%s", name);
|
n = fprintf(fp, "%s", name);
|
||||||
|
size_t namelen = 0;
|
||||||
|
if (name != NULL)
|
||||||
|
namelen = strlen(name);
|
||||||
n += ftype__fprintf_parms(&alias->proto, cu,
|
n += ftype__fprintf_parms(&alias->proto, cu,
|
||||||
indent + (strlen(name) + 7) / 8,
|
indent + (namelen + 7) / 8,
|
||||||
fp);
|
fp);
|
||||||
n += fprintf(fp, "; /* size=%zd, low_pc=%#llx */",
|
n += fprintf(fp, "; /* size=%zd, low_pc=%#llx */",
|
||||||
exp->size, (unsigned long long)exp->low_pc);
|
exp->size, (unsigned long long)exp->low_pc);
|
||||||
|
|
Loading…
Reference in New Issue