(f: Callable)
| 432 | def 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 |
nothing calls this directly
no outgoing calls
no test coverage detected