Skip to content

Commit

Permalink
Update capa/render/verbose.py
Browse files Browse the repository at this point in the history
Co-authored-by: Moritz <[email protected]>
  • Loading branch information
yelhamer and mr-tz authored Oct 14, 2023
1 parent 559f2fd commit d1b7afb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions capa/render/verbose.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,12 @@ def format_address(address: frz.Address) -> str:
assert isinstance(pid, int)
return f"process ppid: {ppid}, process pid: {pid}"
elif address.type == frz.AddressType.THREAD:
assert isinstance(address.value, int)
tid = address.value
assert isinstance(address.value, tuple)
ppid, pid, tid = address.value
assert isinstance(ppid, int)
assert isinstance(pid, int)
assert isinstance(tid, int)
return f"thread id: {tid}"
return f"process ppid: {ppid}, process pid: {pid}, thread id: {tid}"
elif address.type == frz.AddressType.CALL:
assert isinstance(address.value, tuple)
ppid, pid, tid, id_ = address.value
Expand Down

0 comments on commit d1b7afb

Please sign in to comment.