OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [gdb/] [vx-share/] [xdr_ptrace.c] - Blame information for rev 106

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 106 markom
/* xdr_ptrace.c  - xdr routines for remote ptrace calls */
2
 
3
/*  Copyright 1984, 1985, 1986, 1987, 1988, 1989, 1992 Free Software Foundation, Inc.
4
 
5
    This code was donated by Wind River Systems, Inc. */
6
 
7
/*
8
modification history
9
--------------------
10
01b,25may91,maf  now uses counted bytes struct to transfer registers.
11
                 removed xdr_regs_ptr (), xdr_fp_status_ptr (), and
12
                   xdr_fpa_regs_ptr ().
13
01a,05jun90,llk  extracted from xdr_ptrace.h, version 01c.
14
*/
15
 
16
#include "defs.h"
17
#include "vxWorks.h"
18
#include <rpc/rpc.h>
19
#include "xdr_ptrace.h"
20
 
21
#define MAX_LEN 32000
22
 
23
/********************************************************************
24
*
25
* xdr_c_bytes -
26
*
27
* xdr routine for counted bytes
28
*
29
*/
30
bool_t xdr_c_bytes(xdrs,objp)
31
    XDR *xdrs;
32
    C_bytes *objp;
33
    {
34
    return(xdr_bytes(xdrs, &objp->bytes, (u_int *) &objp->len, MAX_LEN));
35
    } /* xdr_c_bytes */
36
 
37
/********************************************************************
38
*
39
* xdr_c_bytes_ptr -
40
*
41
* xdr routine for counted bytes branch of ptrace_info
42
*
43
*/
44
 
45
LOCAL bool_t xdr_c_bytes_ptr(xdrs,objp)
46
    XDR *xdrs;
47
    C_bytes **objp;
48
    {
49
    return(xdr_pointer(xdrs, (char **) objp, sizeof(C_bytes), xdr_c_bytes));
50
    } /* xdr_c_bytes_ptr */
51
 
52
/********************************************************************
53
*
54
* xdr_ptrace_info -
55
*
56
* xdr routine for discriminated union ptrace_info
57
*
58
*/
59
 
60
bool_t xdr_ptrace_info(xdrs,objp)
61
    XDR *xdrs;
62
    Ptrace_info *objp;
63
    {
64
    static struct xdr_discrim choices[] =
65
        {
66
            { (int) DATA, xdr_c_bytes_ptr },
67
            { __dontcare__, NULL }
68
        };
69
 
70
    return(xdr_union(xdrs, (enum_t *) &objp->ttype,
71
        (char *) &objp->more_data, choices, xdr_void));
72
    } /* xdr_ptrace_info */
73
 
74
/********************************************************************
75
*
76
* xdr_rptrace -
77
*
78
* xdr routine for remote ptrace data into server
79
*
80
*/
81
 
82
bool_t xdr_rptrace(xdrs,objp)
83
    XDR *xdrs;
84
    Rptrace *objp;
85
    {
86
    if (! xdr_int(xdrs, &objp->pid))
87
        return(FALSE);
88
    if (! xdr_int(xdrs, &objp->data))
89
        return(FALSE);
90
    if (! xdr_int(xdrs, &objp->addr))
91
        return(FALSE);
92
    if (! xdr_ptrace_info(xdrs, &objp->info))
93
        return(FALSE);
94
 
95
    return(TRUE);
96
    } /* xdr_rptrace */
97
 
98
/********************************************************************
99
*
100
* xdr_ptrace_return -
101
*
102
* xdr routine for remote ptrace data returned by server
103
*
104
*/
105
 
106
bool_t xdr_ptrace_return(xdrs, objp)
107
    XDR *xdrs;
108
    Ptrace_return *objp;
109
    {
110
    if (! xdr_int(xdrs, &objp->status))
111
        return(FALSE);
112
    if (! xdr_int(xdrs, &objp->errno_num))
113
        return(FALSE);
114
    if (! xdr_ptrace_info(xdrs, &objp->info))
115
        return(FALSE);
116
 
117
    return(TRUE);
118
    } /* xdr_ptrace_return */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.