hugsy / gef-legacy

Legacy version of GEF running for GDB+Python2
MIT License
18 stars 29 forks source link

Fork GEF support for Python2 to dedicated repository #2

Open hugsy opened 5 years ago

hugsy commented 5 years ago

This issue starts Projects/4.

ToDo list:

hugsy commented 5 years ago

Created gef-legacy

Grazfather commented 5 years ago

Might as well keep the 2/3 compat stuff in there. I imagine people using python2 in their GDB are building their own gdb for weird arches or are using it on old machines. I can see them also having some versions of GDB that is python3, so I don't see the need to explicitly make their life harder.

hugsy commented 4 years ago

Nope, I don't intend to keep it, the difference must be clear (for users and for us). What I do to make it transparent is that I added that tiny blob into my ~/.gdbinit so you never have to worry about loading the wrong GEF:

python
import sys
if sys.version.splitlines()[0].startswith("3."):
    gdb.execute("source ~/code/gef/gef.py")
else:
  gdb.execute("source ~/code/gef-legacy/gef.py")
Grazfather commented 4 years ago

That makes sense. Maybe we can add that as a blurb wherever we mention no more support for py2.

hugsy commented 4 years ago

Good idea, like an explicit tag 👍

I hope there won't be too much doc to write, it's not my fav part ...

philomath213 commented 4 years ago

I liked the idea to move the GEF support for python2 to a dedicated repository, and trim the py2/py3 compat check code, and I want to help with that. I checked the gef-legacy repository, I found that you just copy/past the code from the original GEF repository to gef-legacy repository, and all commits are just gone. so I made a separate repository (it's also a fork of this original one) and do the following:

right now all test are passing except "test_cmd_heap_bins_non_main". please take a look at the repository here gef-legacy

Grazfather commented 4 years ago

@hugsy this is a better way to do it, that way we don't lose the history. Maybe you can clone @philomath213 's gef-legacy and then force push it to our gef-legacy?