Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 52 lines (44 sloc) 1.542 kb
648ff264 »
2011-01-17 Start to separate ptrace.c into a library.
1 #include <sys/ptrace.h>
2 #include <sys/user.h>
3 #include <unistd.h>
4
35d826e5 »
2011-01-17 Implement memcpy to/from child.
5 #ifdef __amd64__
6 #include "arch/amd64.h"
7 #else
8 #include "arch/i386.h"
9 #endif
10
11 #ifndef mmap_syscall
12 #define mmap_syscall __NR_mmap
13 #endif
14
648ff264 »
2011-01-17 Start to separate ptrace.c into a library.
15 enum child_state {
16 ptrace_detached = 0,
17 ptrace_at_syscall,
18 ptrace_after_syscall,
19 ptrace_running,
20 ptrace_stopped,
21 ptrace_exited
22 };
23
24 struct ptrace_child {
25 pid_t pid;
26 struct user user;
27 enum child_state state;
28 int status;
c2c47012 »
2011-01-21 ptrace: Make error handling consistent.
29 int error;
9e916629 »
2011-01-17 Checkpoint working version.
30 unsigned long forked_pid;
648ff264 »
2011-01-17 Start to separate ptrace.c into a library.
31 };
32
35d826e5 »
2011-01-17 Implement memcpy to/from child.
33 typedef unsigned long child_addr_t;
34
648ff264 »
2011-01-17 Start to separate ptrace.c into a library.
35 int ptrace_wait(struct ptrace_child *child);
36 int ptrace_attach_child(struct ptrace_child *child, pid_t pid);
9e916629 »
2011-01-17 Checkpoint working version.
37 int ptrace_finish_attach(struct ptrace_child *child, pid_t pid);
648ff264 »
2011-01-17 Start to separate ptrace.c into a library.
38 int ptrace_detach_child(struct ptrace_child *child);
39 int ptrace_wait(struct ptrace_child *child);
40 int ptrace_advance_to_state(struct ptrace_child *child,
41 enum child_state desired);
42 int ptrace_save_regs(struct ptrace_child *child);
43 int ptrace_restore_regs(struct ptrace_child *child);
44 unsigned long ptrace_remote_syscall(struct ptrace_child *child,
45 unsigned long sysno,
46 unsigned long p0, unsigned long p1,
47 unsigned long p2, unsigned long p3,
48 unsigned long p4, unsigned long p5);
35d826e5 »
2011-01-17 Implement memcpy to/from child.
49
fff1db52 »
2011-01-17 const fix for memcpy_to_child
50 int ptrace_memcpy_to_child(struct ptrace_child *, child_addr_t, const void*, size_t);
35d826e5 »
2011-01-17 Implement memcpy to/from child.
51 int ptrace_memcpy_from_child(struct ptrace_child *, void*, child_addr_t, size_t);
Something went wrong with that request. Please try again.