* mipsread.c (read_alphacoff_dynamic_symtab): Replace alloca calls
[deliverable/binutils-gdb.git] / gdb / vx-share / xdr_ld.c
CommitLineData
c906108c
SS
1/* 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/*
8modification history
9--------------------
1001a,05jun90,llk extracted from xdr_dbx.c.
11*/
12
13/*
14DESCRIPTION
15This module contains the eXternal Data Representation (XDR) routines
16for object files that are downloaded to VxWorks. They are used by
17remote 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
27bool_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
39bool_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
54bool_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
77bool_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 }
This page took 0.09537 seconds and 4 git commands to generate.