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

'debugger-style' API #13

Closed
ndrewh opened this issue Jul 8, 2024 · 2 comments
Closed

'debugger-style' API #13

ndrewh opened this issue Jul 8, 2024 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@ndrewh
Copy link
Owner

ndrewh commented Jul 8, 2024

# Run until a pc is reached
p.run_until(0x123456)

# Run until a 'breakpoint' is reached
p.cont()

How this works with hooks is TBD, but I would assume that hooks would execute at all times by default.

Potential use case (pseudocode):

while tcache_is_not_full(p, 0x100):
    p.send("a" * 0x100)
    p.run_until(0x12345678)
@ndrewh ndrewh added the enhancement New feature or request label Jul 8, 2024
@ndrewh ndrewh mentioned this issue Jul 9, 2024
@ndrewh
Copy link
Owner Author

ndrewh commented Jul 9, 2024

Following from #17, we need the following restriction:

p.run_until(...) can only be called when:

  • The application is stopped (i.e. it cannot have been resumed due to a previous p.recv() call)
  • AND the call is in the top-level context for a thread (i.e. the outermost scope of the script, or the outermost
    scope of a thread entry hook). run_until is not valid in hooks*

*i think that nested hooks would cause a problem.

@ndrewh
Copy link
Owner Author

ndrewh commented Jul 23, 2024

opened #26 to ensure the examples from this issue gets made

@ndrewh ndrewh closed this as completed in 2c32581 Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant