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

Function wrap

tools/gef.py:434–439  ·  view source on GitHub ↗
(f: Callable)

Source from the content-addressed store, hash-verified

432def only_if_events_supported(event_type: str) -> Callable:
433 """Checks if GDB supports events without crashing."""
434 def wrap(f: Callable) -> Callable:
435 def wrapped_f(*args: Any, **kwargs: Any) -> Any:
436 if getattr(gdb, "events") and getattr(gdb.events, event_type):
437 return f(*args, **kwargs)
438 warn("GDB events cannot be set")
439 return wrapped_f
440 return wrap
441
442

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected