"Pierre" == Pierre Muller<pierre.muller@ics-cnrs.unistra.fr> writes:
Pierre> The only non-trivial change is in xtensa_register_type:
Pierre> this is mainly because I do not understand the old code:
Pierre> it was using both xmalloc and strdup, which should
Pierre> create a memory leak, no?
Pierre> But maybe I miss something?
I agree.
Pierre> - char *name = xmalloc (16);
Pierre> + char *name = xstrprintf ("int%d", size * 8);
Looks better.
Pierre> + = arch_integer_type (gdbarch, size * 8, 1, name);
arch_integer_type calls arch_type, which calls xstrdup(name).
So I think you need to xfree name here.
Tom