Skip to content

Commit 2ceb6c5

Browse files
committed
Add pc to the peripheral monitor output
1 parent 87ccbcc commit 2ceb6c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

qiling/hw/peripheral.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def decorator(func):
1818
def read(self, offset: int, size: int) -> int:
1919
retval = func(self, offset, size)
2020
if self.verbose:
21-
self.ql.log.info(f'[{self.label.upper()}] [R] {self.find_field(offset, size):{width}s} = {hex(retval)}')
21+
self.ql.log.info(f'[{self.label.upper()}] [{hex(self.ql.reg.pc)}] [R] {self.find_field(offset, size):{width}s} = {hex(retval)}')
2222

2323
return retval
2424

@@ -28,7 +28,7 @@ def write(self, offset: int, size: int, value: int):
2828
if field.startswith('DR') and value <= 255:
2929
extra = f'({repr(chr(value))})'
3030

31-
self.ql.log.info(f'[{self.label.upper()}] [W] {field:{width}s} = {hex(value)} {extra}')
31+
self.ql.log.info(f'[{self.label.upper()}] [{hex(self.ql.reg.pc)}] [W] {field:{width}s} = {hex(value)} {extra}')
3232

3333
return func(self, offset, size, value)
3434

0 commit comments

Comments
 (0)