MCPcopy Create free account
hub / github.com/HexHive/NASS / do_invoke

Method do_invoke

tools/gef.py:5432–5457  ·  view source on GitHub ↗
(self, *_: Any, **kwargs: Dict[str, Any])

Source from the content-addressed store, hash-verified

5430
5431 @parse_arguments({"type": "", "address": ""}, {})
5432 def do_invoke(self, *_: Any, **kwargs: Dict[str, Any]) -> None:
5433 args : argparse.Namespace = kwargs["arguments"]
5434 if not args.type:
5435 gdb.execute("pcustom list")
5436 return
5437
5438 _, structname = self.explode_type(args.type)
5439
5440 if not args.address:
5441 gdb.execute(f"pcustom show {structname}")
5442 return
5443
5444 if not is_alive():
5445 err("Session is not active")
5446 return
5447
5448 manager = ExternalStructureManager()
5449 address = parse_address(args.address)
5450 result = manager.find(structname)
5451 if not result:
5452 err(f"No structure named '{structname}' found")
5453 return
5454
5455 _, structure = result
5456 structure.apply_at(address, self["max_depth"])
5457 return
5458
5459 def explode_type(self, arg: str) -> Tuple[str, str]:
5460 modname, structname = arg.split(":", 1) if ":" in arg else (arg, arg)

Callers

nothing calls this directly

Calls 7

explode_typeMethod · 0.95
findMethod · 0.95
is_aliveFunction · 0.85
errFunction · 0.85
parse_addressFunction · 0.85
apply_atMethod · 0.80

Tested by

no test coverage detected