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

Add a header to the vmmap table #1311

Merged
merged 4 commits into from
Oct 21, 2022
Merged

Conversation

alufers
Copy link
Contributor

@alufers alufers commented Oct 20, 2022

A simple header has been added to the output of vmmap which helps new users identify the columns.

image

A simple header has been added to the output of vmmap which helps new users identify the columns.
Adjust the length of expected vmmaps
Copy link
Member

@gsingh93 gsingh93 left a comment

Choose a reason for hiding this comment

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

Overall this lgtm. For the lint issue, you can run ./lint.sh -f locally (more details here: https://github.com/pwndbg/pwndbg/blob/dev/DEVELOPING.md). For the tests, it seems like there are more tests that use the vmmap output that you'll need to update with the header. You can run ./tests.sh locally to reproduce this.

"""
width = 2 + 2 * pwndbg.gdblib.arch.ptrsize
fmt_string = "%#{}s %#{}s %#4s %#8s %#6s %s".format(width, width)
print(fmt_string % ("Start", "End", "Perm", "Size", "Offset", "File"))
Copy link
Member

Choose a reason for hiding this comment

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

nitpick: we can probably do all this in the previous format() call, right? If so, we should probably just do that.

Copy link
Member

Choose a reason for hiding this comment

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

we can probably use f-string literal for all this

Copy link
Member

Choose a reason for hiding this comment

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

This didn't get fixed 😞

Copy link
Member

Choose a reason for hiding this comment

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

I know but I don't think it is that big deal; it was also copied from another part of the code ;p

we can easily fix it too :P

@codecov-commenter
Copy link

Codecov Report

Merging #1311 (16ad5c5) into dev (9427727) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##              dev    #1311      +/-   ##
==========================================
- Coverage   54.67%   54.64%   -0.04%     
==========================================
  Files         156      156              
  Lines       19263    19397     +134     
  Branches     1785     1804      +19     
==========================================
+ Hits        10533    10599      +66     
- Misses       8284     8361      +77     
+ Partials      446      437       -9     
Impacted Files Coverage Δ
pwndbg/commands/vmmap.py 44.32% <100.00%> (+3.02%) ⬆️
pwndbg/heap/ptmalloc.py 56.64% <0.00%> (-1.36%) ⬇️
pwndbg/commands/heap.py 67.23% <0.00%> (-0.68%) ⬇️
pwndbg/lib/regs.py 100.00% <0.00%> (ø)
pwndbg/commands/context.py 65.83% <0.00%> (+0.68%) ⬆️
pwndbg/gdblib/config.py 79.41% <0.00%> (+1.63%) ⬆️
pwndbg/commands/config.py 81.57% <0.00%> (+7.89%) ⬆️

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

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