OpenOCD
gdb_regs.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #ifndef TARGET__RISCV__GDB_REGS_H
4 #define TARGET__RISCV__GDB_REGS_H
5 
6 /* gdb's register list is defined in riscv_gdb_reg_names gdb/riscv-tdep.c in
7  * its source tree. We must interpret the numbers the same here. */
8 enum gdb_regno {
9  GDB_REGNO_ZERO = 0, /* Read-only register, always 0. */
10  GDB_REGNO_RA = 1, /* Return Address. */
11  GDB_REGNO_SP = 2, /* Stack Pointer. */
12  GDB_REGNO_GP = 3, /* Global Pointer. */
13  GDB_REGNO_TP = 4, /* Thread Pointer. */
18  GDB_REGNO_FP = 8, /* Frame Pointer. */
20  GDB_REGNO_A0 = 10, /* First argument. */
21  GDB_REGNO_A1 = 11, /* Second argument. */
44 
100  /* It's still undecided what register numbers GDB will actually use for
101  * these. See
102  * https://groups.google.com/a/groups.riscv.org/d/msg/sw-dev/7lQYiTUN9Ms/gTxGhzaYBQAJ
103  */
113 };
114 
115 const char *gdb_regno_name(enum gdb_regno regno);
116 
117 #endif
#define CSR_TSELECT
#define CSR_DPC
#define CSR_TDATA1
#define CSR_DCSR
#define CSR_TDATA2
#define CSR_DSCRATCH0
#define CSR_MCAUSE
Definition: encoding.h:2910
#define CSR_MEPC
Definition: encoding.h:2909
#define CSR_MSTATUS
Definition: encoding.h:2895
#define CSR_VLENB
Definition: encoding.h:2830
#define CSR_SATP
Definition: encoding.h:2848
#define CSR_VTYPE
Definition: encoding.h:2829
#define CSR_MISA
Definition: encoding.h:2896
#define CSR_VL
Definition: encoding.h:2828
#define CSR_VXRM
Definition: encoding.h:2793
#define CSR_VXSAT
Definition: encoding.h:2792
#define CSR_VSTART
Definition: encoding.h:2791
const char * gdb_regno_name(enum gdb_regno regno)
Definition: riscv.c:3598
gdb_regno
Definition: gdb_regs.h:8
@ GDB_REGNO_DPC
Definition: gdb_regs.h:91
@ GDB_REGNO_V18
Definition: gdb_regs.h:108
@ GDB_REGNO_S8
Definition: gdb_regs.h:35
@ GDB_REGNO_V19
Definition: gdb_regs.h:108
@ GDB_REGNO_FS7
Definition: gdb_regs.h:70
@ GDB_REGNO_FS10
Definition: gdb_regs.h:73
@ GDB_REGNO_SATP
Definition: gdb_regs.h:97
@ GDB_REGNO_CSR0
Definition: gdb_regs.h:80
@ GDB_REGNO_FS8
Definition: gdb_regs.h:71
@ GDB_REGNO_MSTATUS
Definition: gdb_regs.h:94
@ GDB_REGNO_FS6
Definition: gdb_regs.h:69
@ GDB_REGNO_S4
Definition: gdb_regs.h:31
@ GDB_REGNO_V15
Definition: gdb_regs.h:107
@ GDB_REGNO_S11
Definition: gdb_regs.h:38
@ GDB_REGNO_V22
Definition: gdb_regs.h:109
@ GDB_REGNO_V2
Definition: gdb_regs.h:104
@ GDB_REGNO_VXRM
Definition: gdb_regs.h:83
@ GDB_REGNO_ZERO
Definition: gdb_regs.h:9
@ GDB_REGNO_V1
Definition: gdb_regs.h:104
@ GDB_REGNO_S5
Definition: gdb_regs.h:32
@ GDB_REGNO_T5
Definition: gdb_regs.h:41
@ GDB_REGNO_VTYPE
Definition: gdb_regs.h:86
@ GDB_REGNO_T6
Definition: gdb_regs.h:42
@ GDB_REGNO_A4
Definition: gdb_regs.h:24
@ GDB_REGNO_GP
Definition: gdb_regs.h:12
@ GDB_REGNO_FA3
Definition: gdb_regs.h:60
@ GDB_REGNO_VXSAT
Definition: gdb_regs.h:82
@ GDB_REGNO_S7
Definition: gdb_regs.h:34
@ GDB_REGNO_A1
Definition: gdb_regs.h:21
@ GDB_REGNO_FT3
Definition: gdb_regs.h:50
@ GDB_REGNO_V7
Definition: gdb_regs.h:105
@ GDB_REGNO_V21
Definition: gdb_regs.h:109
@ GDB_REGNO_V14
Definition: gdb_regs.h:107
@ GDB_REGNO_A5
Definition: gdb_regs.h:25
@ GDB_REGNO_TSELECT
Definition: gdb_regs.h:87
@ GDB_REGNO_T2
Definition: gdb_regs.h:16
@ GDB_REGNO_S1
Definition: gdb_regs.h:19
@ GDB_REGNO_XPR15
Definition: gdb_regs.h:26
@ GDB_REGNO_T3
Definition: gdb_regs.h:39
@ GDB_REGNO_V26
Definition: gdb_regs.h:110
@ GDB_REGNO_SP
Definition: gdb_regs.h:11
@ GDB_REGNO_FA2
Definition: gdb_regs.h:59
@ GDB_REGNO_FA0
Definition: gdb_regs.h:57
@ GDB_REGNO_FPR31
Definition: gdb_regs.h:79
@ GDB_REGNO_V12
Definition: gdb_regs.h:107
@ GDB_REGNO_V24
Definition: gdb_regs.h:110
@ GDB_REGNO_FPR0
Definition: gdb_regs.h:46
@ GDB_REGNO_V11
Definition: gdb_regs.h:106
@ GDB_REGNO_FT5
Definition: gdb_regs.h:52
@ GDB_REGNO_V0
Definition: gdb_regs.h:104
@ GDB_REGNO_V29
Definition: gdb_regs.h:111
@ GDB_REGNO_DSCRATCH0
Definition: gdb_regs.h:93
@ GDB_REGNO_A6
Definition: gdb_regs.h:27
@ GDB_REGNO_FP
Definition: gdb_regs.h:18
@ GDB_REGNO_VL
Definition: gdb_regs.h:85
@ GDB_REGNO_TDATA1
Definition: gdb_regs.h:88
@ GDB_REGNO_V16
Definition: gdb_regs.h:108
@ GDB_REGNO_VSTART
Definition: gdb_regs.h:81
@ GDB_REGNO_FA1
Definition: gdb_regs.h:58
@ GDB_REGNO_XPR31
Definition: gdb_regs.h:43
@ GDB_REGNO_A0
Definition: gdb_regs.h:20
@ GDB_REGNO_MEPC
Definition: gdb_regs.h:95
@ GDB_REGNO_FS4
Definition: gdb_regs.h:67
@ GDB_REGNO_FT9
Definition: gdb_regs.h:76
@ GDB_REGNO_FT2
Definition: gdb_regs.h:49
@ GDB_REGNO_V28
Definition: gdb_regs.h:111
@ GDB_REGNO_FA4
Definition: gdb_regs.h:61
@ GDB_REGNO_V6
Definition: gdb_regs.h:105
@ GDB_REGNO_V25
Definition: gdb_regs.h:110
@ GDB_REGNO_FT7
Definition: gdb_regs.h:54
@ GDB_REGNO_FS0
Definition: gdb_regs.h:55
@ GDB_REGNO_FT6
Definition: gdb_regs.h:53
@ GDB_REGNO_FS9
Definition: gdb_regs.h:72
@ GDB_REGNO_FT1
Definition: gdb_regs.h:48
@ GDB_REGNO_FT8
Definition: gdb_regs.h:75
@ GDB_REGNO_FT11
Definition: gdb_regs.h:78
@ GDB_REGNO_A2
Definition: gdb_regs.h:22
@ GDB_REGNO_V20
Definition: gdb_regs.h:109
@ GDB_REGNO_V13
Definition: gdb_regs.h:107
@ GDB_REGNO_V17
Definition: gdb_regs.h:108
@ GDB_REGNO_FS3
Definition: gdb_regs.h:66
@ GDB_REGNO_A7
Definition: gdb_regs.h:28
@ GDB_REGNO_RA
Definition: gdb_regs.h:10
@ GDB_REGNO_V5
Definition: gdb_regs.h:105
@ GDB_REGNO_S9
Definition: gdb_regs.h:36
@ GDB_REGNO_PC
Definition: gdb_regs.h:45
@ GDB_REGNO_S0
Definition: gdb_regs.h:17
@ GDB_REGNO_T4
Definition: gdb_regs.h:40
@ GDB_REGNO_VLENB
Definition: gdb_regs.h:84
@ GDB_REGNO_FA5
Definition: gdb_regs.h:62
@ GDB_REGNO_V9
Definition: gdb_regs.h:106
@ GDB_REGNO_V27
Definition: gdb_regs.h:110
@ GDB_REGNO_V31
Definition: gdb_regs.h:111
@ GDB_REGNO_FA6
Definition: gdb_regs.h:63
@ GDB_REGNO_V3
Definition: gdb_regs.h:104
@ GDB_REGNO_S10
Definition: gdb_regs.h:37
@ GDB_REGNO_FT10
Definition: gdb_regs.h:77
@ GDB_REGNO_PRIV
Definition: gdb_regs.h:99
@ GDB_REGNO_S2
Definition: gdb_regs.h:29
@ GDB_REGNO_V4
Definition: gdb_regs.h:105
@ GDB_REGNO_CSR4095
Definition: gdb_regs.h:98
@ GDB_REGNO_FS1
Definition: gdb_regs.h:56
@ GDB_REGNO_FA7
Definition: gdb_regs.h:64
@ GDB_REGNO_TP
Definition: gdb_regs.h:13
@ GDB_REGNO_MCAUSE
Definition: gdb_regs.h:96
@ GDB_REGNO_TDATA2
Definition: gdb_regs.h:89
@ GDB_REGNO_FS2
Definition: gdb_regs.h:65
@ GDB_REGNO_FT0
Definition: gdb_regs.h:47
@ GDB_REGNO_COUNT
Definition: gdb_regs.h:112
@ GDB_REGNO_V23
Definition: gdb_regs.h:109
@ GDB_REGNO_T1
Definition: gdb_regs.h:15
@ GDB_REGNO_S6
Definition: gdb_regs.h:33
@ GDB_REGNO_V10
Definition: gdb_regs.h:106
@ GDB_REGNO_FT4
Definition: gdb_regs.h:51
@ GDB_REGNO_S3
Definition: gdb_regs.h:30
@ GDB_REGNO_T0
Definition: gdb_regs.h:14
@ GDB_REGNO_FS11
Definition: gdb_regs.h:74
@ GDB_REGNO_MISA
Definition: gdb_regs.h:90
@ GDB_REGNO_DCSR
Definition: gdb_regs.h:92
@ GDB_REGNO_V30
Definition: gdb_regs.h:111
@ GDB_REGNO_A3
Definition: gdb_regs.h:23
@ GDB_REGNO_FS5
Definition: gdb_regs.h:68
@ GDB_REGNO_V8
Definition: gdb_regs.h:106