diff options
author | Ciaran Woodward <ciaranwoodward@xmos.com> | 2023-09-13 12:32:55 +0100 |
---|---|---|
committer | Ciaran Woodward <ciaranwoodward@xmos.com> | 2025-01-24 16:13:46 +0000 |
commit | 2047479c10d6b3f213545cf759afe5f77dcdfe9d (patch) | |
tree | dc4adbc3c7675f1c7226cbc55936b9ee5b10d2a9 /gdb/xm-stratus.h | |
parent | fb570a6fe3b74fa230fcbb94a60c56abebb953be (diff) | |
download | binutils-master.zip binutils-master.tar.gz binutils-master.tar.bz2 |
In RISC-V, the general registers can be shown in their abi
form (e.g. sp, a0) or their numeric form (e.g. x2, x10).
Depending on context/preference, someone may prefer to
see one form over the other. The disassembler already
supports this configuration, which can be changed using
the 'set disassembler-options numeric' command.
This commit adds a new set/show command to change gdb's
preference: 'set riscv numeric-registers-names on/off'.
If on, 'info registers' and other situations will print
the numeric register names, rather than the abi versions.
The alias generation has been modified so that the abi
versions are still available for access if specifically
requested such as 'print $ra'. This was done by changing
the behaviour of the code which adds the aliases: all
register names will be added as aliases, even if the name
is the primary one.
There is also no functional downside to adding aliases
which are surplus-to-requirement, since they will be
ignored if there is a 'true' register with the same
name.
Approved-By: Andrew Burgess <aburgess@redhat.com>
Diffstat (limited to 'gdb/xm-stratus.h')
0 files changed, 0 insertions, 0 deletions