(self, *_: Any, **kwargs: Dict[str, Any])
| 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) |
nothing calls this directly
no test coverage detected