maurer/ptrace

What are the differences between ptrace and linux-ptrace?

Closed this issue · 3 comments

There is an existing binding called linux ptrace. It seems to be a bit old, and I was about to make modifications to it so it compiles... then I noticed your library.

Can you give me some differences on features/approaches between the two libraries?

The main interface style difference is that I'm using a monad to represent remote operations, and separate them from regular IO actions.

The main benefit to using my package over the existing one is that it should be much more feature complete. The main disadvantage is that it is not as thoroughly tested - this package was written as a dependency for a research project, and while it works correctly there, it's not thoroughly tested. The code is also still a bit messy.

tl;dr, mine

  • Uses a monad to separate trace control actions.
  • Supports more tracing operations, both for efficiency and some operations that are simply absent
  • Is not well tested, don't assume it will work

Sorry about the code mess, and PRs/testcases welcome :)

I didn't see anything related to modifying the program counter, did I
overlook it? If not, any guidance or suggestions in implementing it?

Thanks for the awesome library BTW!
On Dec 28, 2015 10:10 PM, "Matthew Maurer" notifications@github.com wrote:

The main interface style difference is that I'm using a monad to represent
remote operations, and separate them from regular IO actions.

The main benefit to using my package over the existing one is that it
should be much more feature complete. The main disadvantage is that it is
not as thoroughly tested - this package was written as a dependency for a
research project, and while it works correctly there, it's not thoroughly
tested. The code is also still a bit messy.

tl;dr, mine

  • Uses a monad to separate trace control actions.
  • Supports more tracing operations, both for efficiency and some
    operations that are simply absent
  • Is not well tested, don't assume it will work

Sorry about the code mess, and PRs/testcases welcome :)


Reply to this email directly or view it on GitHub
#1 (comment).

I don't think I have a explicit function for doing it, but you can modify the program counter by using getRegsPT, modifying the rip or eip member as appropriate, and then using setRegsPT. You could certainly imagine a modifyRegsPT and jumpPT built on top of it to accomplish the same thing in a more user friendly way though.