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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [gdb/] [vx-share/] [xdr_ld.c] - Diff between revs 107 and 1765

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 107 Rev 1765
/* xdr_ld.c  - xdr routines for remote dbx interface to VxWorks  */
/* xdr_ld.c  - xdr routines for remote dbx interface to VxWorks  */
 
 
/*  Copyright 1984, 1985, 1986, 1987, 1988, 1989, 1992 Free Software Foundation, Inc.
/*  Copyright 1984, 1985, 1986, 1987, 1988, 1989, 1992 Free Software Foundation, Inc.
 
 
    This code was donated by Wind River Systems, Inc. */
    This code was donated by Wind River Systems, Inc. */
 
 
/*
/*
modification history
modification history
--------------------
--------------------
01a,05jun90,llk  extracted from xdr_dbx.c.
01a,05jun90,llk  extracted from xdr_dbx.c.
*/
*/
 
 
/*
/*
DESCRIPTION
DESCRIPTION
This module contains the eXternal Data Representation (XDR) routines
This module contains the eXternal Data Representation (XDR) routines
for object files that are downloaded to VxWorks.  They are used by
for object files that are downloaded to VxWorks.  They are used by
remote debuggers that use RPC (such as dbxWorks and vxGdb).
remote debuggers that use RPC (such as dbxWorks and vxGdb).
*/
*/
 
 
#include "defs.h"
#include "defs.h"
#include "vxWorks.h"
#include "vxWorks.h"
#include "rpc/rpc.h"
#include "rpc/rpc.h"
#include "xdr_ld.h"
#include "xdr_ld.h"
 
 
/* forward declarations */
/* forward declarations */
 
 
bool_t xdr_String();    /* xdr routine for argument list */
bool_t xdr_String();    /* xdr routine for argument list */
 
 
 
 
/*******************************************************************************
/*******************************************************************************
*
*
* xdr_String - xdr routine for strings.
* xdr_String - xdr routine for strings.
*
*
* Used by xdr_arg_info to handle the actual argument
* Used by xdr_arg_info to handle the actual argument
* strings.  normally calls xdr_string - but does something
* strings.  normally calls xdr_string - but does something
* reasonable encode of null pointer.
* reasonable encode of null pointer.
*/
*/
 
 
bool_t xdr_String (xdrs, strp)
bool_t xdr_String (xdrs, strp)
    XDR *xdrs;
    XDR *xdrs;
    char **strp;
    char **strp;
 
 
    {
    {
    if ((*strp == NULL) & (xdrs->x_op == XDR_ENCODE))
    if ((*strp == NULL) & (xdrs->x_op == XDR_ENCODE))
        return(FALSE);
        return(FALSE);
    else
    else
        return(xdr_string(xdrs, strp, MAXSTRLEN));
        return(xdr_string(xdrs, strp, MAXSTRLEN));
    }
    }
/*******************************************************************************
/*******************************************************************************
*
*
* xdr_ldfile - xdr routine for a single element in the load table
* xdr_ldfile - xdr routine for a single element in the load table
*/
*/
 
 
bool_t xdr_ldfile (xdrs, objp)
bool_t xdr_ldfile (xdrs, objp)
    XDR *xdrs;
    XDR *xdrs;
    ldfile *objp;
    ldfile *objp;
 
 
    {
    {
    if (! xdr_String(xdrs, &objp->name))
    if (! xdr_String(xdrs, &objp->name))
        return(FALSE);
        return(FALSE);
    if (! xdr_int(xdrs, &objp->txt_addr))
    if (! xdr_int(xdrs, &objp->txt_addr))
        return(FALSE);
        return(FALSE);
    if (! xdr_int(xdrs, &objp->data_addr))
    if (! xdr_int(xdrs, &objp->data_addr))
        return(FALSE);
        return(FALSE);
    if (! xdr_int(xdrs, &objp->bss_addr))
    if (! xdr_int(xdrs, &objp->bss_addr))
        return(FALSE);
        return(FALSE);
 
 
    return(TRUE);
    return(TRUE);
    }
    }
/*******************************************************************************
/*******************************************************************************
*
*
* xdr_ldtabl -
* xdr_ldtabl -
*
*
* xdr routine for a list of files and load addresses loaded into VxWorks.
* xdr routine for a list of files and load addresses loaded into VxWorks.
*/
*/
 
 
bool_t xdr_ldtabl (xdrs,objp)
bool_t xdr_ldtabl (xdrs,objp)
    XDR *xdrs;
    XDR *xdrs;
    ldtabl *objp;
    ldtabl *objp;
 
 
    {
    {
    return (xdr_array (xdrs, (char **) &objp->tbl_ent, (UINT *) &objp->tbl_size,
    return (xdr_array (xdrs, (char **) &objp->tbl_ent, (UINT *) &objp->tbl_size,
            MAXTBLSZ, sizeof(ldfile), xdr_ldfile));
            MAXTBLSZ, sizeof(ldfile), xdr_ldfile));
    }
    }
 
 

powered by: WebSVN 2.1.0

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