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

feat: Add a few new memory APIs and replace old APIs #2155

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

fidgetingbits
Copy link
Contributor

These are some changes that I made while porting some musl mallocng functionality, but am breaking up PRs so that it's easier to manage. So this just exposes some new API that aren't yet being called anywhere.

Hopefully are intuitively named. If people have better ideas, I'm happy to change them. If we settle on something, we can change the read_gdbvalue() calls in a separate PR later.

Copy link

codecov bot commented May 9, 2024

Codecov Report

Attention: Patch coverage is 18.91892% with 30 lines in your changes are missing coverage. Please review.

Project coverage is 3.64%. Comparing base (5e77036) to head (e958747).
Report is 5 commits behind head on dev.

Files Patch % Lines
pwndbg/gdblib/memory.py 35.29% 8 Missing and 3 partials ⚠️
pwndbg/heap/ptmalloc.py 0.00% 6 Missing ⚠️
pwndbg/heap/structs.py 0.00% 2 Missing ⚠️
pwndbg/arguments.py 0.00% 1 Missing ⚠️
pwndbg/chain.py 0.00% 1 Missing ⚠️
pwndbg/commands/heap.py 0.00% 1 Missing ⚠️
pwndbg/commands/plist.py 0.00% 1 Missing ⚠️
pwndbg/disasm/arch.py 0.00% 1 Missing ⚠️
pwndbg/disasm/x86.py 0.00% 1 Missing ⚠️
pwndbg/enhance.py 0.00% 1 Missing ⚠️
... and 4 more
Additional details and impacted files
@@           Coverage Diff            @@
##             dev   #2155      +/-   ##
========================================
- Coverage   3.65%   3.64%   -0.01%     
========================================
  Files        196     196              
  Lines      25383   25640     +257     
  Branches    2597    2622      +25     
========================================
+ Hits         928     935       +7     
- Misses     24327   24572     +245     
- Partials     128     133       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fidgetingbits
Copy link
Contributor Author

With noting that there is a risk that people who have scripts that use pwndbg's gdblib could be using poi() and read_gdbvalue(). Not sure if there is an established API deprecation mechanism for changes like this, or if you want to create one, or just accept that this may break stuff for external tooling.

@fidgetingbits fidgetingbits changed the title feat: Add a few new typeinfo APIs feat: Add a few new memory APIs and replace old APIs May 13, 2024
@gsingh93
Copy link
Member

@fidgetingbits needs a rebase.

@disconnect3d are you good with the changes in this PR?

@fidgetingbits fidgetingbits force-pushed the typeinfo-api branch 3 times, most recently from 015992e to db55b6f Compare May 17, 2024 06:49
@fidgetingbits
Copy link
Contributor Author

rebased now

Copy link
Member

@disconnect3d disconnect3d left a comment

Choose a reason for hiding this comment

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

lgtm; @gsingh93 please merge if u are okay with those changes

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