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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [c/] [src/] [librdbg/] [src/] [i386/] [any/] [remdeb_xdr.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
/*
2
 * Please do not edit this file.
3
 * It was generated using rpcgen.
4
 */
5
 
6
#include "remdeb.h"
7
#define RTEMS_PORT 2071
8
#define RTEMS_BACK_PORT 2073
9
 
10
bool_t
11
xdr_rpc_type (XDR *xdrs, rpc_type *objp)
12
{
13
        register int32_t *buf;
14
 
15
         if (!xdr_enum (xdrs, (enum_t *) objp))
16
                 return FALSE;
17
        return TRUE;
18
}
19
 
20
bool_t
21
xdr_UDP_MSG (XDR *xdrs, UDP_MSG *objp)
22
{
23
        register int32_t *buf;
24
 
25
         if (!xdr_u_char (xdrs, &objp->type))
26
                 return FALSE;
27
         if (!xdr_u_char (xdrs, &objp->msg_num))
28
                 return FALSE;
29
         if (!xdr_u_short (xdrs, &objp->spec))
30
                 return FALSE;
31
         if (!xdr_long (xdrs, &objp->pid))
32
                 return FALSE;
33
         if (!xdr_u_long (xdrs, &objp->context))
34
                 return FALSE;
35
        return TRUE;
36
}
37
/*
38
 * Sun request values for the remote ptrace system call
39
 */
40
 
41
 
42
bool_t
43
xdr_ptracereq (XDR *xdrs, ptracereq *objp)
44
{
45
        register int32_t *buf;
46
 
47
         if (!xdr_enum (xdrs, (enum_t *) objp))
48
                 return FALSE;
49
        return TRUE;
50
}
51
 
52
bool_t
53
xdr_xdr_regs (XDR *xdrs, xdr_regs *objp)
54
{
55
        register int32_t *buf;
56
 
57
        int i;
58
 
59
        if (xdrs->x_op == XDR_ENCODE) {
60
                buf = XDR_INLINE (xdrs, ( 19 ) * BYTES_PER_XDR_UNIT);
61
                if (buf == NULL) {
62
                         if (!xdr_vector (xdrs, (char *)objp->tabreg, 19,
63
                                sizeof (u_int), (xdrproc_t) xdr_u_int))
64
                                 return FALSE;
65
                } else {
66
                        {
67
                                register u_int *genp;
68
 
69
                                for (i = 0, genp = objp->tabreg;
70
                                        i < 19; ++i) {
71
                                        IXDR_PUT_U_LONG(buf, *genp++);
72
                                }
73
                        }
74
                }
75
                return TRUE;
76
        } else if (xdrs->x_op == XDR_DECODE) {
77
                buf = XDR_INLINE (xdrs, ( 19 ) * BYTES_PER_XDR_UNIT);
78
                if (buf == NULL) {
79
                         if (!xdr_vector (xdrs, (char *)objp->tabreg, 19,
80
                                sizeof (u_int), (xdrproc_t) xdr_u_int))
81
                                 return FALSE;
82
                } else {
83
                        {
84
                                register u_int *genp;
85
 
86
                                for (i = 0, genp = objp->tabreg;
87
                                        i < 19; ++i) {
88
                                        *genp++ = IXDR_GET_U_LONG(buf);
89
                                }
90
                        }
91
                }
92
         return TRUE;
93
        }
94
 
95
         if (!xdr_vector (xdrs, (char *)objp->tabreg, 19,
96
                sizeof (u_int), (xdrproc_t) xdr_u_int))
97
                 return FALSE;
98
        return TRUE;
99
}
100
 /*
101
   * Memory data for read/write text or data. The size is in data. The target
102
   * addr is in the addr field.
103
   * Be careful before modifying because this value goes into internal
104
   * pipes and is allocated on stack too. Pipes and/or the stack could
105
   * become too small if this value gets incremented.
106
   */
107
bool_t xdr_xdr_mem(xdrs, objp)
108
 XDR *xdrs;
109
 struct xdr_mem *objp;
110
{
111
 if (!xdr_u_long(xdrs, &objp->addr)) {
112
 return (FALSE);
113
 }
114
 if (!xdr_u_int(xdrs, &objp->dataNb)) {
115
 return(FALSE);
116
 }
117
 return (xdr_opaque(xdrs, objp->data, objp->dataNb));
118
}
119
 
120
bool_t
121
xdr_break_type (XDR *xdrs, break_type *objp)
122
{
123
        register int32_t *buf;
124
 
125
         if (!xdr_enum (xdrs, (enum_t *) objp))
126
                 return FALSE;
127
        return TRUE;
128
}
129
 
130
bool_t
131
xdr_xdr_break (XDR *xdrs, xdr_break *objp)
132
{
133
        register int32_t *buf;
134
 
135
        int i;
136
 
137
        if (xdrs->x_op == XDR_ENCODE) {
138
                 if (!xdr_u_char (xdrs, &objp->type))
139
                         return FALSE;
140
                 if (!xdr_u_char (xdrs, &objp->thread_spec))
141
                         return FALSE;
142
                buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT);
143
                if (buf == NULL) {
144
                         if (!xdr_u_short (xdrs, &objp->handle))
145
                                 return FALSE;
146
                         if (!xdr_u_long (xdrs, &objp->ee_loc))
147
                                 return FALSE;
148
                         if (!xdr_u_long (xdrs, &objp->ee_type))
149
                                 return FALSE;
150
                         if (!xdr_u_short (xdrs, &objp->length))
151
                                 return FALSE;
152
 
153
                } else {
154
                IXDR_PUT_U_SHORT(buf, objp->handle);
155
                IXDR_PUT_U_LONG(buf, objp->ee_loc);
156
                IXDR_PUT_U_LONG(buf, objp->ee_type);
157
                IXDR_PUT_U_SHORT(buf, objp->length);
158
                }
159
                 if (!xdr_u_char (xdrs, &objp->pass_count))
160
                         return FALSE;
161
                 if (!xdr_u_char (xdrs, &objp->curr_pass))
162
                         return FALSE;
163
                buf = XDR_INLINE (xdrs, ( MAX_THRD_BRK ) * BYTES_PER_XDR_UNIT);
164
                if (buf == NULL) {
165
                         if (!xdr_vector (xdrs, (char *)objp->thread_list, MAX_THRD_BRK,
166
                                sizeof (u_long), (xdrproc_t) xdr_u_long))
167
                                 return FALSE;
168
                } else {
169
                        {
170
                                register u_long *genp;
171
 
172
                                for (i = 0, genp = objp->thread_list;
173
                                        i < MAX_THRD_BRK; ++i) {
174
                                        IXDR_PUT_U_LONG(buf, *genp++);
175
                                }
176
                        }
177
                }
178
                return TRUE;
179
        } else if (xdrs->x_op == XDR_DECODE) {
180
                 if (!xdr_u_char (xdrs, &objp->type))
181
                         return FALSE;
182
                 if (!xdr_u_char (xdrs, &objp->thread_spec))
183
                         return FALSE;
184
                buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT);
185
                if (buf == NULL) {
186
                         if (!xdr_u_short (xdrs, &objp->handle))
187
                                 return FALSE;
188
                         if (!xdr_u_long (xdrs, &objp->ee_loc))
189
                                 return FALSE;
190
                         if (!xdr_u_long (xdrs, &objp->ee_type))
191
                                 return FALSE;
192
                         if (!xdr_u_short (xdrs, &objp->length))
193
                                 return FALSE;
194
 
195
                } else {
196
                objp->handle = IXDR_GET_U_SHORT(buf);
197
                objp->ee_loc = IXDR_GET_U_LONG(buf);
198
                objp->ee_type = IXDR_GET_U_LONG(buf);
199
                objp->length = IXDR_GET_U_SHORT(buf);
200
                }
201
                 if (!xdr_u_char (xdrs, &objp->pass_count))
202
                         return FALSE;
203
                 if (!xdr_u_char (xdrs, &objp->curr_pass))
204
                         return FALSE;
205
                buf = XDR_INLINE (xdrs, ( MAX_THRD_BRK ) * BYTES_PER_XDR_UNIT);
206
                if (buf == NULL) {
207
                         if (!xdr_vector (xdrs, (char *)objp->thread_list, MAX_THRD_BRK,
208
                                sizeof (u_long), (xdrproc_t) xdr_u_long))
209
                                 return FALSE;
210
                } else {
211
                        {
212
                                register u_long *genp;
213
 
214
                                for (i = 0, genp = objp->thread_list;
215
                                        i < MAX_THRD_BRK; ++i) {
216
                                        *genp++ = IXDR_GET_U_LONG(buf);
217
                                }
218
                        }
219
                }
220
         return TRUE;
221
        }
222
 
223
         if (!xdr_u_char (xdrs, &objp->type))
224
                 return FALSE;
225
         if (!xdr_u_char (xdrs, &objp->thread_spec))
226
                 return FALSE;
227
         if (!xdr_u_short (xdrs, &objp->handle))
228
                 return FALSE;
229
         if (!xdr_u_long (xdrs, &objp->ee_loc))
230
                 return FALSE;
231
         if (!xdr_u_long (xdrs, &objp->ee_type))
232
                 return FALSE;
233
         if (!xdr_u_short (xdrs, &objp->length))
234
                 return FALSE;
235
         if (!xdr_u_char (xdrs, &objp->pass_count))
236
                 return FALSE;
237
         if (!xdr_u_char (xdrs, &objp->curr_pass))
238
                 return FALSE;
239
         if (!xdr_vector (xdrs, (char *)objp->thread_list, MAX_THRD_BRK,
240
                sizeof (u_long), (xdrproc_t) xdr_u_long))
241
                 return FALSE;
242
        return TRUE;
243
}
244
 
245
bool_t
246
xdr_thread_name (XDR *xdrs, thread_name *objp)
247
{
248
        register int32_t *buf;
249
 
250
         if (!xdr_string (xdrs, objp, THREADNAMEMAX))
251
                 return FALSE;
252
        return TRUE;
253
}
254
 
255
bool_t
256
xdr_KernThread (XDR *xdrs, KernThread *objp)
257
{
258
        register int32_t *buf;
259
 
260
         if (!xdr_u_int (xdrs, &objp->threadLi))
261
                 return FALSE;
262
        return TRUE;
263
}
264
bool_t xdr_thread_list(xdrs, objp)
265
 XDR *xdrs;
266
 struct thread_list *objp;
267
{
268
 return (xdr_array(xdrs, (char**)&objp->threads, &objp->nbThread,
269
 UTHREAD_MAX, sizeof(KernThread), xdr_KernThread));
270
}
271
 
272
bool_t
273
xdr_ptrace_addr_data_in (XDR *xdrs, ptrace_addr_data_in *objp)
274
{
275
        register int32_t *buf;
276
 
277
         if (!xdr_ptracereq (xdrs, &objp->req))
278
                 return FALSE;
279
        switch (objp->req) {
280
        case RPT_SETTHREADREGS:
281
                 if (!xdr_xdr_regs (xdrs, &objp->ptrace_addr_data_in_u.regs))
282
                         return FALSE;
283
                break;
284
        case RPT_SETREGS:
285
                 if (!xdr_xdr_regs (xdrs, &objp->ptrace_addr_data_in_u.regs))
286
                         return FALSE;
287
                break;
288
        case RPT_PSETTHREADREGS:
289
                 if (!xdr_array (xdrs, (char **)&objp->ptrace_addr_data_in_u.pregs.pregs_val, (u_int *) &objp->ptrace_addr_data_in_u.pregs.pregs_len, ~0,
290
                        sizeof (u_int), (xdrproc_t) xdr_u_int))
291
                         return FALSE;
292
                break;
293
        case RPT_PSETREGS:
294
                 if (!xdr_array (xdrs, (char **)&objp->ptrace_addr_data_in_u.pregs.pregs_val, (u_int *) &objp->ptrace_addr_data_in_u.pregs.pregs_len, ~0,
295
                        sizeof (u_int), (xdrproc_t) xdr_u_int))
296
                         return FALSE;
297
                break;
298
        case RPT_SETTHREADNAME:
299
                 if (!xdr_thread_name (xdrs, &objp->ptrace_addr_data_in_u.name))
300
                         return FALSE;
301
                break;
302
        case RPT_WRITETEXT:
303
                 if (!xdr_xdr_mem (xdrs, &objp->ptrace_addr_data_in_u.mem))
304
                         return FALSE;
305
                break;
306
        case RPT_WRITEDATA:
307
                 if (!xdr_xdr_mem (xdrs, &objp->ptrace_addr_data_in_u.mem))
308
                         return FALSE;
309
                break;
310
        case RPT_SETBREAK:
311
                 if (!xdr_xdr_break (xdrs, &objp->ptrace_addr_data_in_u.breakp))
312
                         return FALSE;
313
                break;
314
        default:
315
                 if (!xdr_u_int (xdrs, &objp->ptrace_addr_data_in_u.address))
316
                         return FALSE;
317
                break;
318
        }
319
        return TRUE;
320
}
321
 
322
bool_t
323
xdr_ptrace_addr_data_out (XDR *xdrs, ptrace_addr_data_out *objp)
324
{
325
        register int32_t *buf;
326
 
327
         if (!xdr_ptracereq (xdrs, &objp->req))
328
                 return FALSE;
329
        switch (objp->req) {
330
        case RPT_GETREGS:
331
                 if (!xdr_xdr_regs (xdrs, &objp->ptrace_addr_data_out_u.regs))
332
                         return FALSE;
333
                break;
334
        case RPT_GETTHREADREGS:
335
                 if (!xdr_xdr_regs (xdrs, &objp->ptrace_addr_data_out_u.regs))
336
                         return FALSE;
337
                break;
338
        case RPT_PGETREGS:
339
                 if (!xdr_array (xdrs, (char **)&objp->ptrace_addr_data_out_u.pregs.pregs_val, (u_int *) &objp->ptrace_addr_data_out_u.pregs.pregs_len, ~0,
340
                        sizeof (u_int), (xdrproc_t) xdr_u_int))
341
                         return FALSE;
342
                break;
343
        case RPT_PGETTHREADREGS:
344
                 if (!xdr_array (xdrs, (char **)&objp->ptrace_addr_data_out_u.pregs.pregs_val, (u_int *) &objp->ptrace_addr_data_out_u.pregs.pregs_len, ~0,
345
                        sizeof (u_int), (xdrproc_t) xdr_u_int))
346
                         return FALSE;
347
                break;
348
        case RPT_THREADLIST:
349
                 if (!xdr_thread_list (xdrs, &objp->ptrace_addr_data_out_u.threads))
350
                         return FALSE;
351
                break;
352
        case RPT_GETTHREADNAME:
353
                 if (!xdr_thread_name (xdrs, &objp->ptrace_addr_data_out_u.name))
354
                         return FALSE;
355
                break;
356
        case RPT_READTEXT:
357
                 if (!xdr_xdr_mem (xdrs, &objp->ptrace_addr_data_out_u.mem))
358
                         return FALSE;
359
                break;
360
        case RPT_GETNAME:
361
                 if (!xdr_xdr_mem (xdrs, &objp->ptrace_addr_data_out_u.mem))
362
                         return FALSE;
363
                break;
364
        case RPT_READDATA:
365
                 if (!xdr_xdr_mem (xdrs, &objp->ptrace_addr_data_out_u.mem))
366
                         return FALSE;
367
                break;
368
        case RPT_GETBREAK:
369
                 if (!xdr_xdr_break (xdrs, &objp->ptrace_addr_data_out_u.breakp))
370
                         return FALSE;
371
                break;
372
        default:
373
                 if (!xdr_u_int (xdrs, &objp->ptrace_addr_data_out_u.addr))
374
                         return FALSE;
375
                break;
376
        }
377
        return TRUE;
378
}
379
 
380
bool_t
381
xdr_CHAR_DATA (XDR *xdrs, CHAR_DATA *objp)
382
{
383
        register int32_t *buf;
384
 
385
         if (!xdr_bytes (xdrs, (char **)&objp->CHAR_DATA_val, (u_int *) &objp->CHAR_DATA_len, NET_SAFE))
386
                 return FALSE;
387
        return TRUE;
388
}
389
 
390
bool_t
391
xdr_one_arg (XDR *xdrs, one_arg *objp)
392
{
393
        register int32_t *buf;
394
 
395
         if (!xdr_string (xdrs, objp, NET_SAFE))
396
                 return FALSE;
397
        return TRUE;
398
}
399
 /* now open_connex() routine which establishes a connection to server */
400
 
401
bool_t
402
xdr_debug_type (XDR *xdrs, debug_type *objp)
403
{
404
        register int32_t *buf;
405
 
406
         if (!xdr_enum (xdrs, (enum_t *) objp))
407
                 return FALSE;
408
        return TRUE;
409
}
410
#define DEBUGGER_IS_GDB 0x2 /* */
411
 
412
bool_t
413
xdr_open_in (XDR *xdrs, open_in *objp)
414
{
415
        register int32_t *buf;
416
 
417
        int i;
418
         if (!xdr_vector (xdrs, (char *)objp->back_port, 16,
419
                sizeof (u_char), (xdrproc_t) xdr_u_char))
420
                 return FALSE;
421
         if (!xdr_u_short (xdrs, &objp->debug_type))
422
                 return FALSE;
423
         if (!xdr_u_short (xdrs, &objp->flags))
424
                 return FALSE;
425
         if (!xdr_vector (xdrs, (char *)objp->destination, 16,
426
                sizeof (u_char), (xdrproc_t) xdr_u_char))
427
                 return FALSE;
428
         if (!xdr_one_arg (xdrs, &objp->user_name))
429
                 return FALSE;
430
        return TRUE;
431
}
432
 
433
bool_t
434
xdr_open_out (XDR *xdrs, open_out *objp)
435
{
436
        register int32_t *buf;
437
 
438
        int i;
439
 
440
        if (xdrs->x_op == XDR_ENCODE) {
441
                buf = XDR_INLINE (xdrs, (2 + ( 4 )) * BYTES_PER_XDR_UNIT);
442
                if (buf == NULL) {
443
                         if (!xdr_u_long (xdrs, &objp->port))
444
                                 return FALSE;
445
                         if (!xdr_vector (xdrs, (char *)objp->pad, 4,
446
                                sizeof (u_int), (xdrproc_t) xdr_u_int))
447
                                 return FALSE;
448
                         if (!xdr_u_int (xdrs, &objp->fp))
449
                                 return FALSE;
450
 
451
                } else {
452
                IXDR_PUT_U_LONG(buf, objp->port);
453
                {
454
                        register u_int *genp;
455
 
456
                        for (i = 0, genp = objp->pad;
457
                                i < 4; ++i) {
458
                                IXDR_PUT_U_LONG(buf, *genp++);
459
                        }
460
                }
461
                IXDR_PUT_U_LONG(buf, objp->fp);
462
                }
463
                 if (!xdr_u_char (xdrs, &objp->cmd_table_num))
464
                         return FALSE;
465
                 if (!xdr_u_char (xdrs, &objp->cmd_table_vers))
466
                         return FALSE;
467
                 if (!xdr_u_short (xdrs, &objp->server_vers))
468
                         return FALSE;
469
                return TRUE;
470
        } else if (xdrs->x_op == XDR_DECODE) {
471
                buf = XDR_INLINE (xdrs, (2 + ( 4 )) * BYTES_PER_XDR_UNIT);
472
                if (buf == NULL) {
473
                         if (!xdr_u_long (xdrs, &objp->port))
474
                                 return FALSE;
475
                         if (!xdr_vector (xdrs, (char *)objp->pad, 4,
476
                                sizeof (u_int), (xdrproc_t) xdr_u_int))
477
                                 return FALSE;
478
                         if (!xdr_u_int (xdrs, &objp->fp))
479
                                 return FALSE;
480
 
481
                } else {
482
                objp->port = IXDR_GET_U_LONG(buf);
483
                {
484
                        register u_int *genp;
485
 
486
                        for (i = 0, genp = objp->pad;
487
                                i < 4; ++i) {
488
                                *genp++ = IXDR_GET_U_LONG(buf);
489
                        }
490
                }
491
                objp->fp = IXDR_GET_U_LONG(buf);
492
                }
493
                 if (!xdr_u_char (xdrs, &objp->cmd_table_num))
494
                         return FALSE;
495
                 if (!xdr_u_char (xdrs, &objp->cmd_table_vers))
496
                         return FALSE;
497
                 if (!xdr_u_short (xdrs, &objp->server_vers))
498
                         return FALSE;
499
         return TRUE;
500
        }
501
 
502
         if (!xdr_u_long (xdrs, &objp->port))
503
                 return FALSE;
504
         if (!xdr_vector (xdrs, (char *)objp->pad, 4,
505
                sizeof (u_int), (xdrproc_t) xdr_u_int))
506
                 return FALSE;
507
         if (!xdr_u_int (xdrs, &objp->fp))
508
                 return FALSE;
509
         if (!xdr_u_char (xdrs, &objp->cmd_table_num))
510
                 return FALSE;
511
         if (!xdr_u_char (xdrs, &objp->cmd_table_vers))
512
                 return FALSE;
513
         if (!xdr_u_short (xdrs, &objp->server_vers))
514
                 return FALSE;
515
        return TRUE;
516
}
517
 /* now close_connex() routine which detaches from server */
518
 
519
bool_t
520
xdr_close_control (XDR *xdrs, close_control *objp)
521
{
522
        register int32_t *buf;
523
 
524
         if (!xdr_enum (xdrs, (enum_t *) objp))
525
                 return FALSE;
526
        return TRUE;
527
}
528
 
529
bool_t
530
xdr_close_in (XDR *xdrs, close_in *objp)
531
{
532
        register int32_t *buf;
533
 
534
         if (!xdr_close_control (xdrs, &objp->control))
535
                 return FALSE;
536
        return TRUE;
537
}
538
 /* now send_signal() routine which sends signals to processes like kill(2) */
539
 
540
bool_t
541
xdr_signal_in (XDR *xdrs, signal_in *objp)
542
{
543
        register int32_t *buf;
544
 
545
         if (!xdr_int (xdrs, &objp->pid))
546
                 return FALSE;
547
         if (!xdr_int (xdrs, &objp->sig))
548
                 return FALSE;
549
        return TRUE;
550
}
551
 
552
bool_t
553
xdr_signal_out (XDR *xdrs, signal_out *objp)
554
{
555
        register int32_t *buf;
556
 
557
         if (!xdr_int (xdrs, &objp->kill_return))
558
                 return FALSE;
559
         if (!xdr_int (xdrs, &objp->errNo))
560
                 return FALSE;
561
        return TRUE;
562
}
563
 /* now wait_info() routine which returns results of polling the wait status
564
        of a process/actor. It may return 0 if running, else pid or -1 */
565
 
566
bool_t
567
xdr_stop_code (XDR *xdrs, stop_code *objp)
568
{
569
        register int32_t *buf;
570
 
571
         if (!xdr_enum (xdrs, (enum_t *) objp))
572
                 return FALSE;
573
        return TRUE;
574
}
575
 
576
bool_t
577
xdr_wait_in (XDR *xdrs, wait_in *objp)
578
{
579
        register int32_t *buf;
580
 
581
         if (!xdr_int (xdrs, &objp->pid))
582
                 return FALSE;
583
        return TRUE;
584
}
585
 
586
bool_t
587
xdr_wait_out (XDR *xdrs, wait_out *objp)
588
{
589
        register int32_t *buf;
590
 
591
 
592
        if (xdrs->x_op == XDR_ENCODE) {
593
                buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
594
                if (buf == NULL) {
595
                         if (!xdr_int (xdrs, &objp->wait_return))
596
                                 return FALSE;
597
                         if (!xdr_int (xdrs, &objp->errNo))
598
                                 return FALSE;
599
                         if (!xdr_int (xdrs, &objp->status))
600
                                 return FALSE;
601
 
602
                } else {
603
                IXDR_PUT_LONG(buf, objp->wait_return);
604
                IXDR_PUT_LONG(buf, objp->errNo);
605
                IXDR_PUT_LONG(buf, objp->status);
606
                }
607
                 if (!xdr_stop_code (xdrs, &objp->reason))
608
                         return FALSE;
609
                buf = XDR_INLINE (xdrs, 5 * BYTES_PER_XDR_UNIT);
610
                if (buf == NULL) {
611
                         if (!xdr_int (xdrs, &objp->handle))
612
                                 return FALSE;
613
                         if (!xdr_u_long (xdrs, &objp->PC))
614
                                 return FALSE;
615
                         if (!xdr_u_long (xdrs, &objp->SP))
616
                                 return FALSE;
617
                         if (!xdr_u_long (xdrs, &objp->FP))
618
                                 return FALSE;
619
                         if (!xdr_u_long (xdrs, &objp->thread))
620
                                 return FALSE;
621
                } else {
622
                        IXDR_PUT_LONG(buf, objp->handle);
623
                        IXDR_PUT_U_LONG(buf, objp->PC);
624
                        IXDR_PUT_U_LONG(buf, objp->SP);
625
                        IXDR_PUT_U_LONG(buf, objp->FP);
626
                        IXDR_PUT_U_LONG(buf, objp->thread);
627
                }
628
                return TRUE;
629
        } else if (xdrs->x_op == XDR_DECODE) {
630
                buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
631
                if (buf == NULL) {
632
                         if (!xdr_int (xdrs, &objp->wait_return))
633
                                 return FALSE;
634
                         if (!xdr_int (xdrs, &objp->errNo))
635
                                 return FALSE;
636
                         if (!xdr_int (xdrs, &objp->status))
637
                                 return FALSE;
638
 
639
                } else {
640
                objp->wait_return = IXDR_GET_LONG(buf);
641
                objp->errNo = IXDR_GET_LONG(buf);
642
                objp->status = IXDR_GET_LONG(buf);
643
                }
644
                 if (!xdr_stop_code (xdrs, &objp->reason))
645
                         return FALSE;
646
                buf = XDR_INLINE (xdrs, 5 * BYTES_PER_XDR_UNIT);
647
                if (buf == NULL) {
648
                         if (!xdr_int (xdrs, &objp->handle))
649
                                 return FALSE;
650
                         if (!xdr_u_long (xdrs, &objp->PC))
651
                                 return FALSE;
652
                         if (!xdr_u_long (xdrs, &objp->SP))
653
                                 return FALSE;
654
                         if (!xdr_u_long (xdrs, &objp->FP))
655
                                 return FALSE;
656
                         if (!xdr_u_long (xdrs, &objp->thread))
657
                                 return FALSE;
658
                } else {
659
                        objp->handle = IXDR_GET_LONG(buf);
660
                        objp->PC = IXDR_GET_U_LONG(buf);
661
                        objp->SP = IXDR_GET_U_LONG(buf);
662
                        objp->FP = IXDR_GET_U_LONG(buf);
663
                        objp->thread = IXDR_GET_U_LONG(buf);
664
                }
665
         return TRUE;
666
        }
667
 
668
         if (!xdr_int (xdrs, &objp->wait_return))
669
                 return FALSE;
670
         if (!xdr_int (xdrs, &objp->errNo))
671
                 return FALSE;
672
         if (!xdr_int (xdrs, &objp->status))
673
                 return FALSE;
674
         if (!xdr_stop_code (xdrs, &objp->reason))
675
                 return FALSE;
676
         if (!xdr_int (xdrs, &objp->handle))
677
                 return FALSE;
678
         if (!xdr_u_long (xdrs, &objp->PC))
679
                 return FALSE;
680
         if (!xdr_u_long (xdrs, &objp->SP))
681
                 return FALSE;
682
         if (!xdr_u_long (xdrs, &objp->FP))
683
                 return FALSE;
684
         if (!xdr_u_long (xdrs, &objp->thread))
685
                 return FALSE;
686
        return TRUE;
687
}
688
 /* now ptrace() routine. This matches the Sun UNIX ptrace as well as
689
        some additions */
690
 
691
bool_t
692
xdr_ptrace_in (XDR *xdrs, ptrace_in *objp)
693
{
694
        register int32_t *buf;
695
 
696
         if (!xdr_int (xdrs, &objp->pid))
697
                 return FALSE;
698
         if (!xdr_ptrace_addr_data_in (xdrs, &objp->addr))
699
                 return FALSE;
700
         if (!xdr_u_int (xdrs, &objp->data))
701
                 return FALSE;
702
         if (!xdr_u_int (xdrs, &objp->flags))
703
                 return FALSE;
704
        return TRUE;
705
}
706
 
707
bool_t
708
xdr_ptrace_out (XDR *xdrs, ptrace_out *objp)
709
{
710
        register int32_t *buf;
711
 
712
         if (!xdr_ptrace_addr_data_out (xdrs, &objp->addr))
713
                 return FALSE;
714
         if (!xdr_int (xdrs, &objp->result))
715
                 return FALSE;
716
         if (!xdr_int (xdrs, &objp->errNo))
717
                 return FALSE;
718
        return TRUE;
719
}
720
 
721
bool_t
722
xdr_one_symbol (XDR *xdrs, one_symbol *objp)
723
{
724
        register int32_t *buf;
725
 
726
         if (!xdr_string (xdrs, &objp->symbolName, ~0))
727
                 return FALSE;
728
         if (!xdr_long (xdrs, &objp->symbolValue))
729
                 return FALSE;
730
        return TRUE;
731
}
732
 
733
bool_t
734
xdr_all_symbols (XDR *xdrs, all_symbols *objp)
735
{
736
        register int32_t *buf;
737
 
738
         if (!xdr_array (xdrs, (char **)&objp->all_symbols_val, (u_int *) &objp->all_symbols_len, ~0,
739
                sizeof (one_symbol), (xdrproc_t) xdr_one_symbol))
740
                 return FALSE;
741
        return TRUE;
742
}
743
 
744
bool_t
745
xdr_get_global_symbols_out (XDR *xdrs, get_global_symbols_out *objp)
746
{
747
        register int32_t *buf;
748
 
749
         if (!xdr_all_symbols (xdrs, &objp->symbols))
750
                 return FALSE;
751
        return TRUE;
752
}
753
 
754
bool_t
755
xdr_get_text_data_in (XDR *xdrs, get_text_data_in *objp)
756
{
757
        register int32_t *buf;
758
 
759
         if (!xdr_int (xdrs, &objp->pid))
760
                 return FALSE;
761
         if (!xdr_string (xdrs, &objp->actorName, 16))
762
                 return FALSE;
763
        return TRUE;
764
}
765
 
766
bool_t
767
xdr_get_text_data_out (XDR *xdrs, get_text_data_out *objp)
768
{
769
        register int32_t *buf;
770
 
771
 
772
        if (xdrs->x_op == XDR_ENCODE) {
773
                buf = XDR_INLINE (xdrs, 6 * BYTES_PER_XDR_UNIT);
774
                if (buf == NULL) {
775
                         if (!xdr_int (xdrs, &objp->result))
776
                                 return FALSE;
777
                         if (!xdr_int (xdrs, &objp->errNo))
778
                                 return FALSE;
779
                         if (!xdr_u_long (xdrs, &objp->textStart))
780
                                 return FALSE;
781
                         if (!xdr_u_long (xdrs, &objp->textSize))
782
                                 return FALSE;
783
                         if (!xdr_u_long (xdrs, &objp->dataStart))
784
                                 return FALSE;
785
                         if (!xdr_u_long (xdrs, &objp->dataSize))
786
                                 return FALSE;
787
                } else {
788
                        IXDR_PUT_LONG(buf, objp->result);
789
                        IXDR_PUT_LONG(buf, objp->errNo);
790
                        IXDR_PUT_U_LONG(buf, objp->textStart);
791
                        IXDR_PUT_U_LONG(buf, objp->textSize);
792
                        IXDR_PUT_U_LONG(buf, objp->dataStart);
793
                        IXDR_PUT_U_LONG(buf, objp->dataSize);
794
                }
795
                return TRUE;
796
        } else if (xdrs->x_op == XDR_DECODE) {
797
                buf = XDR_INLINE (xdrs, 6 * BYTES_PER_XDR_UNIT);
798
                if (buf == NULL) {
799
                         if (!xdr_int (xdrs, &objp->result))
800
                                 return FALSE;
801
                         if (!xdr_int (xdrs, &objp->errNo))
802
                                 return FALSE;
803
                         if (!xdr_u_long (xdrs, &objp->textStart))
804
                                 return FALSE;
805
                         if (!xdr_u_long (xdrs, &objp->textSize))
806
                                 return FALSE;
807
                         if (!xdr_u_long (xdrs, &objp->dataStart))
808
                                 return FALSE;
809
                         if (!xdr_u_long (xdrs, &objp->dataSize))
810
                                 return FALSE;
811
                } else {
812
                        objp->result = IXDR_GET_LONG(buf);
813
                        objp->errNo = IXDR_GET_LONG(buf);
814
                        objp->textStart = IXDR_GET_U_LONG(buf);
815
                        objp->textSize = IXDR_GET_U_LONG(buf);
816
                        objp->dataStart = IXDR_GET_U_LONG(buf);
817
                        objp->dataSize = IXDR_GET_U_LONG(buf);
818
                }
819
         return TRUE;
820
        }
821
 
822
         if (!xdr_int (xdrs, &objp->result))
823
                 return FALSE;
824
         if (!xdr_int (xdrs, &objp->errNo))
825
                 return FALSE;
826
         if (!xdr_u_long (xdrs, &objp->textStart))
827
                 return FALSE;
828
         if (!xdr_u_long (xdrs, &objp->textSize))
829
                 return FALSE;
830
         if (!xdr_u_long (xdrs, &objp->dataStart))
831
                 return FALSE;
832
         if (!xdr_u_long (xdrs, &objp->dataSize))
833
                 return FALSE;
834
        return TRUE;
835
}
836
 
837
bool_t
838
xdr_one_signal (XDR *xdrs, one_signal *objp)
839
{
840
        register int32_t *buf;
841
 
842
         if (!xdr_u_int (xdrs, &objp->number))
843
                 return FALSE;
844
         if (!xdr_string (xdrs, &objp->name, ~0))
845
                 return FALSE;
846
        return TRUE;
847
}
848
 
849
bool_t
850
xdr_all_signals (XDR *xdrs, all_signals *objp)
851
{
852
        register int32_t *buf;
853
 
854
         if (!xdr_array (xdrs, (char **)&objp->all_signals_val, (u_int *) &objp->all_signals_len, ~0,
855
                sizeof (one_signal), (xdrproc_t) xdr_one_signal))
856
                 return FALSE;
857
        return TRUE;
858
}
859
 
860
bool_t
861
xdr_get_signal_names_out (XDR *xdrs, get_signal_names_out *objp)
862
{
863
        register int32_t *buf;
864
 
865
         if (!xdr_all_signals (xdrs, &objp->signals))
866
                 return FALSE;
867
        return TRUE;
868
}
869
 /* now define the actual calls we support */

powered by: WebSVN 2.1.0

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