class Ptrace::Debugger

A ptrace debugger. Note that this class is not instantiated; it is simply a wrapper for the ptrace system call that performs translation of objects between Ruby and C.

Public Class Methods

commands() click to toggle source

Return a Hash mapping command symbols (e.g. :singlestep) to ptrace command numbers. This serves as a list of all ptrace commands supported by the OS.

# File module/rdoc_input/Ptrace_ext.rb, line 43
def self.commands
end
event_msg(pid) click to toggle source
# File module/rdoc_input/Ptrace_ext.rb, line 116
def self.event_msg(pid)
end
fpregs(pid) click to toggle source

Read the FPU registers for the specified process. This returns a Hash mapping register name to value.

# File module/rdoc_input/Ptrace_ext.rb, line 93
def self.fpregs(pid)
end
fpregs=(pid, hash) click to toggle source

Write the FPU registers for the specified process. The Hash must be a complete set of registers as returned by Debugger.fpregs; missing registers will be set to 0.

# File module/rdoc_input/Ptrace_ext.rb, line 101
def self.fpregs=(pid, hash)
end
peek(cmd, pid, addr) click to toggle source

Read a word from memory at the specified address in the specified process. The cms is expected to be one of PT_READ_I, PT_READ_D, or PT_READ_U.

# File module/rdoc_input/Ptrace_ext.rb, line 64
def self.peek(cmd, pid, addr)
end
poke(cmd, pid, addr, word) click to toggle source

Write a word to memory at the specified address in the specified process. The cms is expected to be one of PT_WRITE_I, PT_WRITE_D, or PT_WRITE_U.

# File module/rdoc_input/Ptrace_ext.rb, line 71
def self.poke(cmd, pid, addr, word)
end
regs(pid) click to toggle source

Read the general (CPU) registers for the specified process. This returns a Hash mapping register name to value.

# File module/rdoc_input/Ptrace_ext.rb, line 78
def self.regs(pid)
end
regs=(pid, hash) click to toggle source

Write the general (CPU) registers for the specified process. The Hash must be a complete set of registers as returned by Debugger.regs; missing registers will be set to 0.

# File module/rdoc_input/Ptrace_ext.rb, line 86
def self.regs=(pid, hash)
end
send_cmd(cmd, pid, addr) click to toggle source

Send a ptrace command number to the specified PID. The addr argument can be nil. This is a wrapper for the ptrace system call.

# File module/rdoc_input/Ptrace_ext.rb, line 50
def self.send_cmd(cmd, pid, addr)
end
send_data(cmd, pid, addr, data) click to toggle source

Send a ptrace command number to the specified PID, using addr and data as the address and data arguments. This is a wrapper for the ptrace system call.

# File module/rdoc_input/Ptrace_ext.rb, line 57
def self.send_data(cmd, pid, addr, data)
end
signal(pid) click to toggle source
# File module/rdoc_input/Ptrace_ext.rb, line 106
def self.signal(pid)
end
signal=(pid, hash) click to toggle source
# File module/rdoc_input/Ptrace_ext.rb, line 111
def self.signal=(pid, hash)
end