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

Update break commands #702

Merged
merged 6 commits into from
Aug 24, 2021
Merged

Update break commands #702

merged 6 commits into from
Aug 24, 2021

Conversation

theguy147
Copy link
Collaborator

Update break commands

Description/Motivation/Screenshots

This PR is part of #693 and covers the following points:

  • Fix address parsing for name-break cmd by using parse_address() now.
  • Update name-break docs.
  • Rename "location" argument to "address".
  • Clarify that pie breakpoint takes an offset (or symbol) as an argument and not an absolute address.
  • Fix address parsing for pie breakpoint.
  • Update pie commands documentation and usage instructions.

How Has This Been Tested?

Architecture Yes/No Comments
x86-32 ✔️
x86-64 ✔️
ARM ✖️
AARCH64 ✖️
MIPS ✖️
POWERPC ✖️
SPARC ✖️
RISC-V ✖️
make test ✔️

Checklist

  • My PR was done against the dev branch, not master.
  • My code follows the code style of this project.
  • My change includes a change to the documentation, if required.
  • My change adds tests as appropriate.
  • I have read and agree to the CONTRIBUTING document.

Copy link
Collaborator

@Grazfather Grazfather left a comment

Choose a reason for hiding this comment

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

just wording nits. Looks good.

```
gef➤ pie <sub_commands>
```
The `pie` command provides a useful way to set breakpoint to a PIE enabled
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's fix up the wording.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Is it better now?

```
The `pie` command provides a useful way to set breakpoint to a PIE enabled
binary. `pie` command then provides what we call "PIE breakpoints". A PIE
breakpoint is just a virtual breakpoint which will be turned to a real
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think we need this level of detail the. Maybe just mention that it's handy to resolve to addresses that aren't static.

```

### `pie info` command ###

Since PIE breakpoint is not real breakpoint, this command provide a way to observe the
state of all PIE breakpoints.
Since a PIE breakpoint is not a real breakpoint, this command provide a way to
Copy link
Collaborator

Choose a reason for hiding this comment

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

typo provide -> provides


You can ignore VNum argument to get info of all PIE breakpoints.
You can ommit the VNum argument to get the info on all PIE breakpoints.
Copy link
Collaborator

Choose a reason for hiding this comment

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

typo ommit -> omit

docs/commands/pie.md Show resolved Hide resolved
gef.py Outdated
@@ -4499,21 +4499,20 @@ def do_invoke(self, argv):

@register_command
class PieBreakpointCommand(GenericCommand):
"""Set a PIE breakpoint."""
"""Set a PIE breakpoint at an offset to the target binaries base address."""
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: offset from

@hugsy
Copy link
Owner

hugsy commented Aug 24, 2021

All good for merge AFAIC after @Grazfather 's suggestions are added

docs/commands/pie.md Show resolved Hide resolved
The VNum is the virtual number, which is the number of the PIE breakpoint. The Num is the
number of the according real breakpoint number in gdb. Address is the PIE breakpoint's
address.
VNum stands for virtual number and is used to numerate the PIE breakpoints and
Copy link
Collaborator

Choose a reason for hiding this comment

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

enumerate.

Then new sentence before "Num is.."


You can ignore VNum argument to get info of all PIE breakpoints.
You can omit the VNum argument to get the info on all PIE breakpoints.
Copy link
Collaborator

Choose a reason for hiding this comment

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

no the in the info

@Grazfather Grazfather merged commit 5e5c638 into hugsy:dev Aug 24, 2021
@theguy147 theguy147 deleted the break branch August 24, 2021 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants