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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

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]>
ValekoZ and others added 6 commits June 24, 2024 22:23
…ow multiple filters

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)
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)

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.

None yet

3 participants