Skip to content

Commit 7af96f1

Browse files
committed
A few more comments
1 parent cccecf7 commit 7af96f1

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

qiling/arch/register.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,22 +123,37 @@ def register_pc(self, pc_id: int):
123123

124124
@property
125125
def arch_pc(self) -> int:
126+
"""Get the value of the architectural program counter register.
127+
"""
128+
126129
return self.ql.uc.reg_read(self.uc_pc)
127130

128131

129132
@arch_pc.setter
130133
def arch_pc(self, value: int) -> None:
134+
"""Set the value of the architectural program counter register.
135+
"""
136+
131137
return self.ql.uc.reg_write(self.uc_pc, value)
132138

133139
@property
134140
def arch_pc_name(self) -> str:
141+
"""Get the architectural program counter register name.
142+
"""
143+
135144
return next(k for k, v in self.register_mapping.items() if v == self.uc_pc)
136145

137146
@property
138147
def arch_sp(self) -> int:
148+
"""Get the value of the architectural stack pointer register.
149+
"""
150+
139151
return self.ql.uc.reg_read(self.uc_sp)
140152

141153

142154
@arch_sp.setter
143155
def arch_sp(self, value: int) -> None:
156+
"""Set the value of the architectural stack pointer register.
157+
"""
158+
144159
return self.ql.uc.reg_write(self.uc_sp, value)

0 commit comments

Comments
 (0)