@@ -86,7 +86,42 @@ class RegisterContext :
86
86
87
87
bool
88
88
CopyFromRegisterContext (lldb::RegisterContextSP context);
89
-
89
+
90
+ // ------------------------------------------------------------------
91
+ // / Convert from a given register numbering scheme to the lldb register
92
+ // / numbering scheme
93
+ // /
94
+ // / There may be multiple ways to enumerate the registers for a given
95
+ // / architecture. ABI references will specify one to be used with
96
+ // / DWARF, the register numberings from stabs (aka "gcc"), there may
97
+ // / be a variation used for eh_frame unwind instructions (e.g. on Darwin),
98
+ // / and so on. Register 5 by itself is meaningless - RegisterKind
99
+ // / enumeration tells you what context that number should be translated as.
100
+ // /
101
+ // / Inside lldb, register numbers are in the eRegisterKindLLDB scheme;
102
+ // / arguments which take a register number should take one in that
103
+ // / scheme.
104
+ // /
105
+ // / eRegisterKindGeneric is a special numbering scheme which gives us
106
+ // / constant values for the pc, frame register, stack register, etc., for
107
+ // / use within lldb. They may not be defined for all architectures but
108
+ // / it allows generic code to translate these common registers into the
109
+ // / lldb numbering scheme.
110
+ // /
111
+ // / This method translates a given register kind + register number into
112
+ // / the eRegisterKindLLDB register numbering.
113
+ // /
114
+ // / @param [in] kind
115
+ // / The register numbering scheme (RegisterKind) that the following
116
+ // / register number is in.
117
+ // /
118
+ // / @param [in] num
119
+ // / A register number in the 'kind' register numbering scheme.
120
+ // /
121
+ // / @return
122
+ // / The equivalent register number in the eRegisterKindLLDB
123
+ // / numbering scheme, if possible, else LLDB_INVALID_REGNUM.
124
+ // ------------------------------------------------------------------
90
125
virtual uint32_t
91
126
ConvertRegisterKindToRegisterNumber (lldb::RegisterKind kind, uint32_t num) = 0 ;
92
127
0 commit comments