Re: [PATCH 2/4] arc: Recognize registers available on Linux targets

Tom Tromey
2020-04-24T13:50:16Z

>>>>> ">" == Shahab Vahedi via Gdb-patches <gdb-patches@sourceware.org> writes:

>> + const char *const r58_names[] = {
>> + core_regs[58],

This should probably say ARC_R58_REGNUM?

>> + core_regs[59],

ARC_R59_REGNUM ?

>> /* Allocate the ARC-private target-dependent information structure, and the
>> GDB target-independent information structure. */
>> struct gdbarch_tdep *tdep = XCNEW (struct gdbarch_tdep);
>> tdep-> jb_pc = -1; /* No longjmp support by default. */
>> +
>> + if (!arc_tdesc_init (info, &tdesc, &tdesc_data, tdep))
>> + {
>> + XDELETE (tdep);
>> + return NULL;
>> + }

gdb doesn't use XDELETE, but rather "xfree".
You might as well "return nullptr;" while you're at it.

thanks,
Tom