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

Class GefSetCommand

tools/gef.py:9815–9836  ·  view source on GitHub ↗

Override GDB set commands with the context from GEF.

Source from the content-addressed store, hash-verified

9813
9814
9815class GefSetCommand(gdb.Command):
9816 """Override GDB set commands with the context from GEF."""
9817 _cmdline_ = "gef set"
9818 _syntax_ = f"{_cmdline_} [GDB_SET_ARGUMENTS]"
9819
9820 def __init__(self) -> None:
9821 super().__init__(self._cmdline_, gdb.COMMAND_SUPPORT, gdb.COMPLETE_SYMBOL, False)
9822 return
9823
9824 def invoke(self, args: Any, from_tty: bool) -> None:
9825 self.dont_repeat()
9826 args = args.split()
9827 cmd = ["set", args[0],]
9828 for p in args[1:]:
9829 if p.startswith("$_gef"):
9830 c = gdb.parse_and_eval(p)
9831 cmd.append(c.string())
9832 else:
9833 cmd.append(p)
9834
9835 gdb.execute(" ".join(cmd))
9836 return
9837
9838
9839class GefRunCommand(gdb.Command):

Callers 1

setupMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected