| 5219 | return self.name |
| 5220 | |
| 5221 | def pprint(self) -> None: |
| 5222 | res = [] |
| 5223 | for _name, _type in self.class_type._fields_: |
| 5224 | size = ctypes.sizeof(_type) |
| 5225 | name = Color.colorify(_name, gef.config["pcustom.structure_name"]) |
| 5226 | type = Color.colorify(_type.__name__, gef.config["pcustom.structure_type"]) |
| 5227 | size = Color.colorify(hex(size), gef.config["pcustom.structure_size"]) |
| 5228 | offset = Color.boldify(f"{getattr(self.class_type, _name).offset:04x}") |
| 5229 | res.append(f"{offset} {name:32s} {type:16s} /* size={size} */") |
| 5230 | gef_print("\n".join(res)) |
| 5231 | return |
| 5232 | |
| 5233 | def __get_structure_class(self) -> Type: |
| 5234 | """Returns a tuple of (class, instance) if modname!classname exists""" |