[PATCH 1/1] gdb/riscv: Add command to switch between numeric & abi register names
Tom Tromey
tom@tromey.com
Tue Jan 14 17:06:02 GMT 2025
>>>>> "Ciaran" == Ciaran Woodward <ciaranwoodward@xmos.com> writes:
Thank you for the patch.
I think a RISC-V maintainer should take a look at this as well (I know
nothing about the arch) but I had a couple of notes.
Ciaran> I will note that the check that was removed appears to
Ciaran> have already been broken, since the equality check was
Ciaran> (const char * == const char *), not a string comparison.
Looking at the code it seems like these both come from the same array,
so perhaps == is fine:
for (const char *name : this->names)
...
const char *alias = this->names[i];
if (alias == name && !prefer_first_name_p)
Ciaran> + if(numeric_register_names && (regnum <= RISCV_ZERO_REGNUM + 31))
Space before paren.
There's a few instances of this.
Ciaran> + add_setshow_boolean_cmd("numeric-register-names", no_class,
Ciaran> + &numeric_register_names,
New commands should be documented and mentioned in gdb/NEWS.
thanks,
Tom
More information about the Gdb-patches
mailing list