aboutsummaryrefslogtreecommitdiff
path: root/gdb/xtensa-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/xtensa-tdep.c')
-rw-r--r--gdb/xtensa-tdep.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c
index 60e34c3..7c0d8c1 100644
--- a/gdb/xtensa-tdep.c
+++ b/gdb/xtensa-tdep.c
@@ -319,15 +319,14 @@ xtensa_register_type (struct gdbarch *gdbarch, int regnum)
if (tp == NULL)
{
- char *name = xstrprintf ("int%d", size * 8);
+ std::string name = string_printf ("int%d", size * 8);
tp = XNEW (struct ctype_cache);
tp->next = tdep->type_entries;
tdep->type_entries = tp;
tp->size = size;
tp->virtual_type
- = arch_integer_type (gdbarch, size * 8, 1, name);
- xfree (name);
+ = arch_integer_type (gdbarch, size * 8, 1, name.c_str ());
}
reg->ctype = tp->virtual_type;