core: tag__name can't assume all cus use the global string table

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Arnaldo Carvalho de Melo 2009-04-02 16:45:30 -03:00
parent 9bb29daac4
commit e6ed526926
1 changed files with 3 additions and 1 deletions

View File

@ -1112,9 +1112,11 @@ const char *tag__name(const struct tag *self, const struct cu *cu,
case DW_TAG_base_type: {
const struct base_type *bt = tag__base_type(self);
const char *name = "nameless base type!";
char bf2[64];
if (bt->name)
name = s(bt->name);
name = base_type__name(tag__base_type(self),
bf2, sizeof(bf2));
strncpy(bf, name, len);
}