Skip to content

Commit

Permalink
target/riscv: define register printers
Browse files Browse the repository at this point in the history
`riscv_debug_reg_to_s()` can be used to decode register value.  If the
pointer to buffer is `NULL` it does not print anything, just returns the
length of the string.

The format is:
`<register_value> { <field_name>=<field_value_name or field_value>, ..., }`

e.g:

`0x400382 { version=2, ... ndmresetpending=false, }`

`0x321009 { regno=0x1009, ... cmdtype=0, }`

Change-Id: I63733d8d36385d89ca15de1a43139134bc488c4f
Signed-off-by: Evgeniy Naydanov <[email protected]>
  • Loading branch information
en-sc committed Sep 1, 2023
1 parent c07d925 commit f826928
Show file tree
Hide file tree
Showing 6 changed files with 4,467 additions and 139 deletions.
5 changes: 4 additions & 1 deletion src/target/riscv/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ noinst_LTLIBRARIES += %D%/libriscv.la
%D%/asm.h \
%D%/batch.h \
%D%/debug_defines.h \
%D%/debug_register_printers.h \
%D%/encoding.h \
%D%/gdb_regs.h \
%D%/opcodes.h \
Expand All @@ -15,4 +16,6 @@ noinst_LTLIBRARIES += %D%/libriscv.la
%D%/riscv-011.c \
%D%/riscv-013.c \
%D%/riscv.c \
%D%/riscv_semihosting.c
%D%/riscv_semihosting.c \
%D%/debug_defines.c \
%D%/debug_register_printers.c
Loading

0 comments on commit f826928

Please sign in to comment.