1 /* xdr_ptrace.c - xdr routines for remote ptrace calls */
3 /* Copyright 1984, 1985, 1986, 1987, 1988, 1989, 1991, 1992, 1993, 1998
4 Free Software Foundation, Inc.
6 This code was donated by Wind River Systems, Inc. */
11 01b,25may91,maf now uses counted bytes struct to transfer registers.
12 removed xdr_regs_ptr (), xdr_fp_status_ptr (), and
14 01a,05jun90,llk extracted from xdr_ptrace.h, version 01c.
20 #include "xdr_ptrace.h"
24 /********************************************************************
28 * xdr routine for counted bytes
31 bool_t
xdr_c_bytes(xdrs
,objp
)
35 return(xdr_bytes(xdrs
, &objp
->bytes
, (u_int
*) &objp
->len
, MAX_LEN
));
38 /********************************************************************
42 * xdr routine for counted bytes branch of ptrace_info
46 LOCAL bool_t
xdr_c_bytes_ptr(xdrs
,objp
)
50 return(xdr_pointer(xdrs
, (char **) objp
, sizeof(C_bytes
), xdr_c_bytes
));
51 } /* xdr_c_bytes_ptr */
53 /********************************************************************
57 * xdr routine for discriminated union ptrace_info
61 bool_t
xdr_ptrace_info(xdrs
,objp
)
65 static struct xdr_discrim choices
[] =
67 { (int) DATA
, xdr_c_bytes_ptr
},
68 { __dontcare__
, NULL
}
71 return(xdr_union(xdrs
, (enum_t
*) &objp
->ttype
,
72 (char *) &objp
->more_data
, choices
, xdr_void
));
73 } /* xdr_ptrace_info */
75 /********************************************************************
79 * xdr routine for remote ptrace data into server
83 bool_t
xdr_rptrace(xdrs
,objp
)
87 if (! xdr_int(xdrs
, &objp
->pid
))
89 if (! xdr_int(xdrs
, &objp
->data
))
91 if (! xdr_int(xdrs
, &objp
->addr
))
93 if (! xdr_ptrace_info(xdrs
, &objp
->info
))
99 /********************************************************************
101 * xdr_ptrace_return -
103 * xdr routine for remote ptrace data returned by server
107 bool_t
xdr_ptrace_return(xdrs
, objp
)
111 if (! xdr_int(xdrs
, &objp
->status
))
113 if (! xdr_int(xdrs
, &objp
->errno_num
))
115 if (! xdr_ptrace_info(xdrs
, &objp
->info
))
119 } /* xdr_ptrace_return */
This page took 0.031322 seconds and 4 git commands to generate.