Class: ASMREPL::Linux::Tracer
- Inherits:
-
Object
- Object
- ASMREPL::Linux::Tracer
- Defined in:
- lib/asmrepl/linux.rb
Instance Method Summary collapse
- #continue ⇒ Object
-
#initialize(pid) ⇒ Tracer
constructor
A new instance of Tracer.
- #state ⇒ Object
- #wait ⇒ Object
Constructor Details
#initialize(pid) ⇒ Tracer
Returns a new instance of Tracer.
164 165 166 |
# File 'lib/asmrepl/linux.rb', line 164 def initialize pid @pid = pid end |
Instance Method Details
#continue ⇒ Object
179 180 181 182 183 |
# File 'lib/asmrepl/linux.rb', line 179 def continue unless Linux.ptrace(Linux::PTRACE_CONT, @pid, 1, 0).zero? raise end end |
#state ⇒ Object
172 173 174 175 176 177 |
# File 'lib/asmrepl/linux.rb', line 172 def state state = ThreadState.malloc raise unless Linux.ptrace(PTRACE_GETREGS, @pid, 0, state).zero? state end |
#wait ⇒ Object
168 169 170 |
# File 'lib/asmrepl/linux.rb', line 168 def wait Process.waitpid @pid end |