MCPcopy Index your code
hub / github.com/qilingframework/qiling / offsetof

Method offsetof

qiling/os/struct.py:188–198  ·  view source on GitHub ↗

Get field offset within the structure. Args: fname: field name Returns: field offset in bytes Raises: `AttributeError` if the specified field does not exist

(cls, fname: str)

Source from the content-addressed store, hash-verified

186
187 @classmethod
188 def offsetof(cls, fname: str) -> int:
189 """Get field offset within the structure.
190
191 Args:
192 fname: field name
193
194 Returns: field offset in bytes
195 Raises: `AttributeError` if the specified field does not exist
196 """
197
198 return getattr(cls, fname).offset
199
200 @classmethod
201 def memberat(cls, offset: int) -> Optional[str]:

Callers 9

memberatMethod · 0.80
hook_GetSidSubAuthorityFunction · 0.80
__init__Method · 0.80
init_structFunction · 0.80
test_ref_saveMethod · 0.80
test_volatile_refMethod · 0.80

Calls

no outgoing calls

Tested by 4

test_ref_saveMethod · 0.64
test_volatile_refMethod · 0.64