Skip to content

Commit

Permalink
m1n1.trace.agx: Log hook writes
Browse files Browse the repository at this point in the history
Signed-off-by: Asahi Lina <[email protected]>
  • Loading branch information
asahilina committed Jan 20, 2023
1 parent 8e77f8f commit e774b5c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions proxyclient/m1n1/trace/agx.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,16 @@ def hook_r(self, addr, width, **kwargs):

return val

def hook_w(self, addr, val, width, **kwargs):
if isinstance(val, (list, tuple)):
xval = list(map(hex, val))
else:
xval = hex(val)

self.log(f"HOOK: {addr:#x}:{width} = {xval}")

super().hook_w(addr, val, width, **kwargs)

class AGXTracer(ASCTracer):
ENDPOINTS = {
0x20: PongEp,
Expand Down

0 comments on commit e774b5c

Please sign in to comment.