Skip to content

Commit e774b5c

Browse files
committed
m1n1.trace.agx: Log hook writes
Signed-off-by: Asahi Lina <[email protected]>
1 parent 8e77f8f commit e774b5c

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

proxyclient/m1n1/trace/agx.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,16 @@ def hook_r(self, addr, width, **kwargs):
320320

321321
return val
322322

323+
def hook_w(self, addr, val, width, **kwargs):
324+
if isinstance(val, (list, tuple)):
325+
xval = list(map(hex, val))
326+
else:
327+
xval = hex(val)
328+
329+
self.log(f"HOOK: {addr:#x}:{width} = {xval}")
330+
331+
super().hook_w(addr, val, width, **kwargs)
332+
323333
class AGXTracer(ASCTracer):
324334
ENDPOINTS = {
325335
0x20: PongEp,

0 commit comments

Comments
 (0)