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

[cmd] Add support for flags specifying filters type in vmmap, and allow multiple filters #1120

Merged
merged 20 commits into from
Oct 24, 2024

Conversation

ValekoZ
Copy link
Collaborator

@ValekoZ ValekoZ commented Jun 5, 2024

Parse args:

  • -a / --addr:
    • filter by address -> parses the next arg as an int or asks gdb the value
  • -n / --name:
    • filter based on section name
  • If nothing is specified, print a warning and guess the type (previous behavior)

@ValekoZ
Copy link
Collaborator Author

ValekoZ commented Jun 5, 2024

I will write docs and tests later :P

Copy link

github-actions bot commented Jun 5, 2024

🤖 Coverage update for 6fd7ef5 🟢

Old New
Commit 1b6f46a 6fd7ef5
Score 71.6907% 71.7283% (0.0376)

@hugsy
Copy link
Owner

hugsy commented Jun 5, 2024

I will write docs and tests later :P

No problem, I'll make this a draft then to see the diff with that's ready to review. Change the status when ready

@hugsy hugsy marked this pull request as draft June 5, 2024 15:57
Copy link

github-actions bot commented Jun 8, 2024

🤖 Coverage update for 36da9f9 🔴

Old New
Commit 1b6f46a 36da9f9
Score 71.6798% 71.6503% (-0.0295)

Copy link

github-actions bot commented Jun 8, 2024

🤖 Coverage update for 36da9f9 🟢

Old New
Commit 1b6f46a 36da9f9
Score 71.6798% 71.6798% (0)

Copy link

github-actions bot commented Jun 9, 2024

🤖 Coverage update for 4136826 🟢

Old New
Commit 1b6f46a 4136826
Score 71.6798% 71.7175% (0.0377)

Copy link

github-actions bot commented Jun 9, 2024

🤖 Coverage update for 4136826 🔴

Old New
Commit 1b6f46a 4136826
Score 71.6798% 71.6503% (-0.0295)

Copy link
Owner

@hugsy hugsy left a comment

Choose a reason for hiding this comment

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

Interesting addition but I think you should rewrite the parsing loop using the parse_arguments decorator here. It would gain in simplicity and clarity.

gef.py Outdated Show resolved Hide resolved
gef.py Outdated Show resolved Hide resolved
gef.py Outdated Show resolved Hide resolved
gef.py Outdated Show resolved Hide resolved
gef.py Outdated Show resolved Hide resolved
gef.py Outdated Show resolved Hide resolved
gef.py Outdated Show resolved Hide resolved
gef.py Outdated Show resolved Hide resolved
gef.py Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Jun 9, 2024

🤖 Coverage update for 2bf489b 🔴

Old New
Commit 1b6f46a 2bf489b
Score 71.6798% 71.669% (-0.0108)

Copy link

github-actions bot commented Jun 9, 2024

🤖 Coverage update for 2bf489b 🟢

Old New
Commit 1b6f46a 2bf489b
Score 71.6798% 71.6798% (0)

Copy link

github-actions bot commented Jun 9, 2024

🤖 Coverage update for 0027c79 🟢

Old New
Commit 1b6f46a 0027c79
Score 71.6798% 71.6798% (0)

Copy link

github-actions bot commented Jun 9, 2024

🤖 Coverage update for 0027c79 🟢

Old New
Commit 1b6f46a 0027c79
Score 71.6798% 71.6877% (0.0079)

Copy link

github-actions bot commented Jun 9, 2024

🤖 Coverage update for eb97eb0 🟢

Old New
Commit 1b6f46a eb97eb0
Score 71.6798% 71.6798% (0)

Copy link

github-actions bot commented Jun 9, 2024

🤖 Coverage update for eb97eb0 🔴

Old New
Commit 1b6f46a eb97eb0
Score 71.6798% 71.669% (-0.0108)

Copy link

github-actions bot commented Jun 9, 2024

🤖 Coverage update for 48ada57 🟢

Old New
Commit 1b6f46a 48ada57
Score 71.6798% 71.6877% (0.0079)

Copy link

github-actions bot commented Jun 9, 2024

🤖 Coverage update for 48ada57 🟢

Old New
Commit 1b6f46a 48ada57
Score 71.6798% 71.6798% (0)

hugsy added a commit that referenced this pull request Jun 24, 2024
…_arguments` decorator (#1122)

Add support for the `append` action for ArgumentParser in the `parse_arguments` decorator on optional arguments.

This makes us able to support this:

```
command --arg 1 --arg 2 --arg 3
```

And get `[1, 2, 3]` as the `arg` value.

This CL is required to make changes to
#1120 before merging.

---------

Co-authored-by: crazy hugsy <[email protected]>
Copy link

🤖 Coverage update for ec99843 🟢

Old New
Commit 6ddd780 ec99843
Score 71.6649% 71.8088% (0.1439)

@ValekoZ ValekoZ requested a review from hugsy June 25, 2024 12:39
Copy link

🤖 Coverage update for ec99843 🟢

Old New
Commit 6ddd780 ec99843
Score 71.6649% 71.6649% (0)

Copy link

🤖 Coverage update for c8d73cd 🟢

Old New
Commit 6ddd780 c8d73cd
Score 71.6649% 71.6649% (0)

Copy link

🤖 Coverage update for c8d73cd 🟢

Old New
Commit 6ddd780 c8d73cd
Score 71.6649% 71.8088% (0.1439)

Copy link

🤖 Coverage update for e9b45bc 🟢

Old New
Commit f298b7f e9b45bc
Score 71.6267% 71.7702% (0.1435)

Copy link
Owner

@hugsy hugsy left a comment

Choose a reason for hiding this comment

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

Mostly ok, just needs tests

gef.py Outdated Show resolved Hide resolved
docs/commands/vmmap.md Outdated Show resolved Hide resolved
gef.py Show resolved Hide resolved
tests/commands/vmmap.py Show resolved Hide resolved
Copy link

🤖 Coverage update for d00aa17 🟢

Old New
Commit f298b7f d00aa17
Score 71.6267% 71.7702% (0.1435)

Copy link

🤖 Coverage update for 93f588e 🟢

Old New
Commit f298b7f 93f588e
Score 71.6267% 71.6267% (0)

Copy link

🤖 Coverage update for d00aa17 🟢

Old New
Commit f298b7f d00aa17
Score 71.6267% 71.6267% (0)

Copy link

🤖 Coverage update for 93f588e 🟢

Old New
Commit f298b7f 93f588e
Score 71.6267% 71.7702% (0.1435)

Copy link

🤖 Coverage update for 3da17fe 🟢

Old New
Commit f298b7f 3da17fe
Score 71.6267% 71.6267% (0)

Copy link

🤖 Coverage update for cb9c3fb 🟢

Old New
Commit f298b7f cb9c3fb
Score 71.6267% 71.6267% (0)

gef.py Show resolved Hide resolved
gef.py Show resolved Hide resolved
gef.py Outdated Show resolved Hide resolved
gef.py Show resolved Hide resolved
Co-authored-by: Grazfather <[email protected]>
Copy link

🤖 Coverage update for c55c505 🟢

Old New
Commit f298b7f c55c505
Score 71.6319% 71.6319% (0)

Copy link

🤖 Coverage update for 55a1649 🟢

Old New
Commit f298b7f 55a1649
Score 71.6319% 71.6319% (0)

Copy link

🤖 Coverage update for 60215b4 🟢

Old New
Commit f298b7f 60215b4
Score 71.6319% 71.6319% (0)

Copy link

🤖 Coverage update for 76f40f1 🟢

Old New
Commit f298b7f 76f40f1
Score 71.6319% 71.7819% (0.15)

Copy link

🤖 Coverage update for 76f40f1 🟢

Old New
Commit f298b7f 76f40f1
Score 71.6319% 71.6319% (0)

gef.py Show resolved Hide resolved
Copy link

github-actions bot commented Oct 7, 2024

🤖 Coverage update for 4f47cf7 🟢

Old New
Commit f298b7f 4f47cf7
Score 71.5247% 71.5247% (0)

Copy link

github-actions bot commented Oct 7, 2024

🤖 Coverage update for 4f47cf7 🟢

Old New
Commit f298b7f 4f47cf7
Score 71.5247% 71.6749% (0.1502)

@ValekoZ ValekoZ requested a review from hugsy October 23, 2024 09:07
Copy link
Owner

@hugsy hugsy left a comment

Choose a reason for hiding this comment

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

lgtm rn

@ValekoZ ValekoZ merged commit ba70548 into main Oct 24, 2024
6 checks passed
@ValekoZ ValekoZ deleted the vmmap_better_args branch October 24, 2024 08:21
@Grazfather
Copy link
Collaborator

We did it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants