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

GDB Refactor [2/N]: move some modules to lib/ #1118

Merged
merged 6 commits into from
Sep 5, 2022

Conversation

gsingh93
Copy link
Member

@gsingh93 gsingh93 commented Sep 5, 2022

version.py, which.py, functions.py, tips.py, and funcparser.py already didn't have any dependency on GDB, so these could just be copied to lib/. Also fixed the .gitignore to not exclude pwndbg/lib/.

@gsingh93 gsingh93 changed the title GDB Refactor [2/N]: move for more files to lib/ GDB Refactor [2/N]: move four more files to lib/ Sep 5, 2022
@codecov-commenter
Copy link

codecov-commenter commented Sep 5, 2022

Codecov Report

Merging #1118 (f107adc) into dev (77380eb) will decrease coverage by 0.01%.
The diff coverage is 78.26%.

@@            Coverage Diff             @@
##              dev    #1118      +/-   ##
==========================================
- Coverage   50.23%   50.22%   -0.02%     
==========================================
  Files         168      169       +1     
  Lines       19867    19871       +4     
  Branches     1813     1813              
==========================================
  Hits         9981     9981              
- Misses       9550     9554       +4     
  Partials      336      336              
Impacted Files Coverage Δ
pwndbg/lib/funcparser.py 16.66% <ø> (ø)
pwndbg/lib/functions.py 100.00% <ø> (ø)
pwndbg/lib/which.py 52.00% <ø> (ø)
pwndbg/arguments.py 27.27% <33.33%> (ø)
pwndbg/lib/tips.py 75.00% <75.00%> (ø)
pwndbg/__init__.py 95.09% <100.00%> (ø)
pwndbg/commands/checksec.py 85.71% <100.00%> (ø)
pwndbg/commands/got.py 37.83% <100.00%> (ø)
pwndbg/commands/mprotect.py 41.17% <100.00%> (ø)
pwndbg/commands/nearpc.py 86.88% <100.00%> (ø)
... and 6 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@syheliel
Copy link
Contributor

syheliel commented Sep 5, 2022

What is pwndbg/lib/functions.py used for? It's too large.

@gsingh93
Copy link
Member Author

gsingh93 commented Sep 5, 2022

I have no clue, for now my goal is just to move things into the right directories without breaking things. Once that's done, the next step will be to write unit tests, add types, refactor poorly designed code, etc.

@gsingh93 gsingh93 changed the title GDB Refactor [2/N]: move four more files to lib/ GDB Refactor [2/N]: move some modules to lib/ Sep 5, 2022
pwndbg/lib/version.py Outdated Show resolved Hide resolved
@@ -0,0 +1,28 @@
from random import choice
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldnt this file be moved instead of added? weird

@disconnect3d
Copy link
Member

disconnect3d commented Sep 5, 2022

@syheliel

What is pwndbg/lib/functions.py used for? It's too large.

It is used to enhance display of function arguments of known functions; I think it may have been generated from manpages or some other source

@disconnect3d disconnect3d merged commit 2b62259 into pwndbg:dev Sep 5, 2022
@syheliel
Copy link
Contributor

syheliel commented Sep 5, 2022

It uses PyCParser and generated by pwndbg.lib.funcparser.ExtractFuncDeclFromSource

@gsingh93 gsingh93 deleted the split-arch branch September 9, 2022 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants