fix PTRACE_PEEKUSER, PTRACE_POKEUSER, PTRACE_GETREGS.

support PTRACE_SETREGS.
  In struct process, add 'unsigned long *ptrace_debugreg', instead of 'struct user *userp'.
  debug registers are read/written from/to ptrace_debugreg, save/restore in schedule().
  most general registers are proc->uctx.
  fs_base is proc->thread.tlsblock_base.
  gs_base,ds,es,fs,gs and orig_rax are uncompleted.
  other members in 'struct user' are ignored, same as Linux implementation.

refs #257
refs #373
refs #263
This commit is contained in:
Susumu Komae
2015-01-29 14:08:38 +09:00
committed by postpeta
parent 9c35935671
commit c3ade864d9
5 changed files with 296 additions and 98 deletions

View File

@@ -352,7 +352,7 @@ struct process {
cpu_set_t cpu_set;
unsigned long saved_auxv[AUXV_LEN];
struct user *userp;
unsigned long *ptrace_debugreg; /* debug registers for ptrace */
};
struct process_vm {