()
| 51 | |
| 52 | @lru_cache() |
| 53 | def is_gdb_available(): |
| 54 | try: |
| 55 | # Try to use the same arguments as in GdbSession so that the |
| 56 | # same error return gets propagated. |
| 57 | proc = subprocess.run(gdb_command + ["--version"], |
| 58 | env=environment_for_gdb(), bufsize=0, |
| 59 | stdin=subprocess.PIPE, |
| 60 | stdout=subprocess.PIPE, |
| 61 | stderr=subprocess.STDOUT) |
| 62 | except FileNotFoundError: |
| 63 | return False |
| 64 | return proc.returncode == 0 |
| 65 | |
| 66 | |
| 67 | @lru_cache() |
no test coverage detected