fetch GDB version via regex to fit Fedora format (#1632)

Co-authored-by: disconnect3d <dominik.b.czarnota+pwndbg@gmail.com>
pull/1633/head
Disconnect3d 3 years ago committed by GitHub
parent 36972fd982
commit 5cf18e18e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,3 +1,4 @@
import re
import signal
import gdb
@ -55,7 +56,8 @@ handle SIGSEGV stop print nopass
)
# See https://github.com/pwndbg/pwndbg/issues/808
if int(getattr(gdb, "VERSION", "0.0").split(".")[0]) <= 9:
gdb_version = tuple(map(int, re.search(r"(\d+)[^\d]+(\d+)", gdb.VERSION).groups()))
if gdb_version[0] <= 9:
pre_commands += "\nset remote search-memory-packet off"
for line in pre_commands.strip().splitlines():

Loading…
Cancel
Save