Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fork GEF support for Python2 to dedicated repository #2

Open
4 of 5 tasks
hugsy opened this issue Aug 3, 2019 · 7 comments
Open
4 of 5 tasks

Fork GEF support for Python2 to dedicated repository #2

hugsy opened this issue Aug 3, 2019 · 7 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@hugsy
Copy link
Owner

hugsy commented Aug 3, 2019

This issue starts Projects/4.

ToDo list:

  • Create separate repository
  • Trim code from Python2/3 compat check
  • Update documentation (remove Py2 refs, re-do screenshots)
  • Create CI for documentation
  • Create CI for unit test
@hugsy hugsy self-assigned this Aug 3, 2019
hugsy referenced this issue in hugsy/gef Aug 3, 2019
@hugsy
Copy link
Owner Author

hugsy commented Aug 3, 2019

Created gef-legacy

@Grazfather
Copy link
Collaborator

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
Copy link
Owner Author

hugsy commented Sep 9, 2019

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
Copy link
Collaborator

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

@hugsy
Copy link
Owner Author

hugsy commented Sep 9, 2019

Good idea, like an explicit tag 👍

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

@philomath213
Copy link

philomath213 commented Oct 10, 2019

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:

  • made "py2-legacy" branch where I can do the work
  • create a Dockerfile in order to build a Ubuntu image where we should run the tests, this image contains gdb_7.12 with python2, users can use also directly
  • remove Python2/3 compat check
  • fix some errors in unittests and update them
  • fix some errors in heap commands

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

@Grazfather
Copy link
Collaborator

@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?

@hugsy hugsy transferred this issue from hugsy/gef Oct 22, 2019
@hugsy hugsy added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 22, 2019
hugsy pushed a commit that referenced this issue Oct 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants