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

Subversion Repositories or1k

[/] [or1k/] [branches/] [oc/] [gdb-5.0/] [gdb/] [vx-share/] [xdr_ld.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_ld.c  - xdr routines for remote dbx interface to VxWorks  */
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
01a,05jun90,llk  extracted from xdr_dbx.c.
11
*/
12
 
13
/*
14
DESCRIPTION
15
This module contains the eXternal Data Representation (XDR) routines
16
for object files that are downloaded to VxWorks.  They are used by
17
remote debuggers that use RPC (such as dbxWorks and vxGdb).
18
*/
19
 
20
#include "defs.h"
21
#include "vxWorks.h"
22
#include "rpc/rpc.h"
23
#include "xdr_ld.h"
24
 
25
/* forward declarations */
26
 
27
bool_t xdr_String();    /* xdr routine for argument list */
28
 
29
 
30
/*******************************************************************************
31
*
32
* xdr_String - xdr routine for strings.
33
*
34
* Used by xdr_arg_info to handle the actual argument
35
* strings.  normally calls xdr_string - but does something
36
* reasonable encode of null pointer.
37
*/
38
 
39
bool_t xdr_String (xdrs, strp)
40
    XDR *xdrs;
41
    char **strp;
42
 
43
    {
44
    if ((*strp == NULL) & (xdrs->x_op == XDR_ENCODE))
45
        return(FALSE);
46
    else
47
        return(xdr_string(xdrs, strp, MAXSTRLEN));
48
    }
49
/*******************************************************************************
50
*
51
* xdr_ldfile - xdr routine for a single element in the load table
52
*/
53
 
54
bool_t xdr_ldfile (xdrs, objp)
55
    XDR *xdrs;
56
    ldfile *objp;
57
 
58
    {
59
    if (! xdr_String(xdrs, &objp->name))
60
        return(FALSE);
61
    if (! xdr_int(xdrs, &objp->txt_addr))
62
        return(FALSE);
63
    if (! xdr_int(xdrs, &objp->data_addr))
64
        return(FALSE);
65
    if (! xdr_int(xdrs, &objp->bss_addr))
66
        return(FALSE);
67
 
68
    return(TRUE);
69
    }
70
/*******************************************************************************
71
*
72
* xdr_ldtabl -
73
*
74
* xdr routine for a list of files and load addresses loaded into VxWorks.
75
*/
76
 
77
bool_t xdr_ldtabl (xdrs,objp)
78
    XDR *xdrs;
79
    ldtabl *objp;
80
 
81
    {
82
    return (xdr_array (xdrs, (char **) &objp->tbl_ent, (UINT *) &objp->tbl_size,
83
            MAXTBLSZ, sizeof(ldfile), xdr_ldfile));
84
    }

powered by: WebSVN 2.1.0

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