hugsy / gef

GEF (GDB Enhanced Features) - a modern experience for GDB with advanced debugging capabilities for exploit devs & reverse engineers on Linux
https://hugsy.github.io/gef
MIT License
6.87k stars 726 forks source link

[Bug] cant open under ubuntu 16.0.4 python 3.6 #1060

Closed dhe090 closed 8 months ago

dhe090 commented 8 months ago

GEF+GDB version

gdb -nx -ex 'pi print(sys.version)' -ex quit
GNU gdb (GDB) 8.2
3.6.10 (default, Dec 19 2019, 23:04:32) 
[GCC 5.4.0 20160609]

Operating System

x86 ubuntu 16.0.4

Describe the issue you encountered

gdb -q
Traceback (most recent call last):
  File "~/.gef-.py", line 86, in <module>
ImportError: cannot import name 'Literal'
<pi import urllib.request as u, tempfile as t; g=t.NamedTemporaryFile(suffix='-gef.py'); open(g.name, 'wb+').write(u.urlopen('https://tinyurl.com/gef-main').read()); gdb.execute('source %s' % g.name)

415592
  File "<fstring>", line 1
    (arena_addr=)
               ^
SyntaxError: invalid syntax

I was able to install inside gdb last week, but now neither inside gdb nor outside gdb installations are working. What could be the reason?

Do you read the docs and look at previously closed issues/PRs for similar cases?

No

Architecture impacted

Minimalist test case

Use this field for a minimal code to compile and spot the issue:

// compile with gcc -fPIE -pic -o my_issue.out my_issue.c
int main(){ return 0; }

You can also provide a Dockerfile if you prefer

Additional context?

image image

Grazfather commented 8 months ago

You'll need to either update gdb or downgrade gef. The compatibility matrix needs to be updated. You should be able to go to a release from mid-2022 at least.

hugsy commented 8 months ago

Should be fixed by #1061 (at least on 18.04)