ptrace(2) modifications:

- add T_GETRANGE/T_SETRANGE to get/set ranges of values
- change EIO error code to EFAULT
- move common-I&D text-to-data translation to umap_local
This commit is contained in:
David van Moolenbroek
2009-12-29 21:32:15 +00:00
parent 8da928d2df
commit e423c86009
5 changed files with 118 additions and 32 deletions

View File

@@ -21,6 +21,8 @@
#define T_ATTACH 11 /* attach to a running process */
#define T_DETACH 12 /* detach from a traced process */
#define T_SETOPT 13 /* set trace options */
#define T_GETRANGE 14 /* get range of values */
#define T_SETRANGE 15 /* set range of values */
#define T_READB_INS 100 /* Read a byte from the text segment of an
* untraced process (only for root)
@@ -33,6 +35,18 @@
#define TO_TRACEFORK 0x1 /* automatically attach to forked children */
#define TO_ALTEXEC 0x2 /* send SIGSTOP on successful exec() */
/* Trace spaces. */
#define TS_INS 0 /* text space */
#define TS_DATA 1 /* data space */
/* Trance range structure. */
struct ptrace_range {
int pr_space; /* space in traced process */
long pr_addr; /* address in traced process */
void *pr_ptr; /* buffer in caller process */
size_t pr_size; /* size of range, in bytes */
};
/* Function Prototypes. */
#ifndef _ANSI_H
#include <ansi.h>