(tg_start_function): Likewise.
+2007-04-28 Alan Modra <amodra@bigpond.net.au>
+
+ * prdbg.c (tg_variable): Adjust for changed demangler.
+ (tg_start_function): Likewise.
+
2007-04-27 Alan Modra <amodra@bigpond.net.au>
* bucumm.h: Split off host dependencies to..
2007-04-27 Alan Modra <amodra@bigpond.net.au>
* bucumm.h: Split off host dependencies to..
bfd_vma val ATTRIBUTE_UNUSED)
{
struct pr_handle *info = (struct pr_handle *) p;
bfd_vma val ATTRIBUTE_UNUSED)
{
struct pr_handle *info = (struct pr_handle *) p;
- char *t;
- const char *dname, *from_class;
+ char *t, *dname, *from_class;
t = pop_type (info);
if (t == NULL)
return FALSE;
t = pop_type (info);
if (t == NULL)
return FALSE;
- {
- dname = info->demangler (info->abfd, name, DMGL_ANSI | DMGL_PARAMS);
- if (strcmp (name, dname) == 0)
- {
- free ((char *) dname);
- dname = name;
- }
- }
+ dname = info->demangler (info->abfd, name, DMGL_ANSI | DMGL_PARAMS);
+ from_class = NULL;
+ if (dname != NULL)
{
char *sep;
sep = strstr (dname, "::");
{
char *sep;
sep = strstr (dname, "::");
from_class = dname;
}
else
from_class = dname;
}
else
- {
- /* Obscure types as vts and type_info nodes. */
- name = dname;
- from_class = NULL;
- }
+ /* Obscure types as vts and type_info nodes. */
+ name = dname;
- else
- from_class = NULL;
fprintf (info->f, "%s\t%s\t0;\"\tkind:v\ttype:%s", name, info->filename, t);
fprintf (info->f, "%s\t%s\t0;\"\tkind:v\ttype:%s", name, info->filename, t);
- {
- fprintf (info->f, "\tclass:%s",from_class);
- free ((char *) dname);
- }
+ fprintf (info->f, "\tclass:%s", from_class);
+
+ if (dname)
+ free (dname);
tg_start_function (void *p, const char *name, bfd_boolean global)
{
struct pr_handle *info = (struct pr_handle *) p;
tg_start_function (void *p, const char *name, bfd_boolean global)
{
struct pr_handle *info = (struct pr_handle *) p;
if (! global)
info->stack->flavor = "static";
else
info->stack->flavor = NULL;
if (! global)
info->stack->flavor = "static";
else
info->stack->flavor = NULL;
- {
- dname = info->demangler (info->abfd, name, DMGL_ANSI | DMGL_PARAMS);
- if (strcmp (name, dname) == 0)
- {
- free ((char *) dname);
- dname = name;
- }
- }
+ dname = info->demangler (info->abfd, name, DMGL_ANSI | DMGL_PARAMS);
- if (! substitute_type (info, dname))
+ if (! substitute_type (info, dname ? dname : name))
+ info->stack->method = NULL;
+ if (dname != NULL)
{
char *sep;
sep = strstr (dname, "::");
{
char *sep;
sep = strstr (dname, "::");
*sep = 0;
/* Obscure functions as type_info function. */
}
*sep = 0;
/* Obscure functions as type_info function. */
}
- else
- info->stack->method = NULL;
info->stack->parents = strdup (name);
info->stack->parents = strdup (name);