Use gdb.VERSION instead of parsing gdb.execute result (#467)

Yay, this is finally there:

```
>>> gdb.VERSION
'8.1.0.20180409-git'
```
pull/469/head
Disconnect3d 8 years ago committed by GitHub
parent e3b172ed88
commit c3e32375e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -20,7 +20,10 @@ from pwndbg.color import message
def _gdb_version():
return gdb.execute('show version', to_string=True).split('\n')[0]
try:
return gdb.VERSION # GDB >= 8.1 (or earlier?)
except AttributeError:
return gdb.execute('show version', to_string=True).split('\n')[0]
def _py_version():

Loading…
Cancel
Save