1/**********************************************************************
2ptproxy.h
3
4Copyright (C) 1999 Lars Brinkhoff.  See the file COPYING for licensing
5terms and conditions.
6**********************************************************************/
7
8#ifndef __PTPROXY_H
9#define __PTPROXY_H
10
11#include <sys/types.h>
12
13typedef struct debugger debugger_state;
14typedef struct debugee debugee_state;
15
16struct debugger
17{
18	pid_t pid;
19	int wait_options;
20	int *wait_status_ptr;
21	unsigned int waiting : 1;
22	unsigned int real_wait : 1;
23	unsigned int expecting_child : 1;
24	int (*handle_trace) (debugger_state *, pid_t);
25
26	debugee_state *debugee;
27};
28
29struct debugee
30{
31	pid_t pid;
32	int wait_status;
33	unsigned int died : 1;
34	unsigned int event : 1;
35	unsigned int stopped : 1;
36	unsigned int trace_singlestep : 1;
37	unsigned int trace_syscall : 1;
38	unsigned int traced : 1;
39	unsigned int zombie : 1;
40	unsigned int in_context : 1;
41};
42
43extern int debugger_syscall(debugger_state *debugger, pid_t pid);
44extern int debugger_normal_return (debugger_state *debugger, pid_t unused);
45
46extern long proxy_ptrace (struct debugger *, int, pid_t, long, long, pid_t,
47			  int *strace_out);
48extern void debugger_cancelled_return(debugger_state *debugger, int result);
49
50#endif
51
52/*
53 * Overrides for Emacs so that we follow Linus's tabbing style.
54 * Emacs will notice this stuff at the end of the file and automatically
55 * adjust the settings for this buffer only.  This must remain at the end
56 * of the file.
57 * ---------------------------------------------------------------------------
58 * Local variables:
59 * c-file-style: "linux"
60 * End:
61 */
62