MCPcopy Create free account
hub / github.com/qilingframework/qiling / write

Method write

qiling/hw/peripheral.py:77–92  ·  view source on GitHub ↗
(self, offset: int, size: int, value: int)

Source from the content-addressed store, hash-verified

75 return retval
76
77 def write(self, offset: int, size: int, value: int):
78 self._hook_call(self.user_write[QL_INTERCEPT.ENTER], Action.WRITE, offset, size, value)
79
80 if self.verbose:
81 field, extra = self.field_description(offset, size), ''
82 if field.startswith('DR') and value <= 255:
83 extra = f'({repr(chr(value))})'
84
85 self.ql.log.info(f'[{self.label.upper()}] [{hex(self.ql.arch.regs.pc)}] [W] {field:{width}s} = {hex(value)} {extra}')
86
87 if self.user_write[QL_INTERCEPT.CALL]:
88 self._hook_call(self.user_write[QL_INTERCEPT.CALL], Action.WRITE, offset, size, value)
89 else:
90 func(self, offset, size, value)
91
92 self._hook_call(self.user_write[QL_INTERCEPT.EXIT], Action.WRITE, offset, size, value)
93
94 funcmap = {
95 'read' : read,

Callers

nothing calls this directly

Calls 5

_hook_callMethod · 0.95
AccessClass · 0.90
funcFunction · 0.85
field_descriptionMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected