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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [librdbg/] [src/] [powerpc/] [mcp750/] [remdeb.h] - Blame information for rev 389

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

Line No. Rev Author Line
1 30 unneback
/*
2
 * Please do not edit this file.
3
 * It was generated using rpcgen.
4
 */
5
 
6
#ifndef _REMDEB_H_RPCGEN
7
#define _REMDEB_H_RPCGEN
8
 
9
#include <rpc/rpc.h>
10
 
11
 
12
#ifdef __cplusplus
13
extern "C" {
14
#endif
15
 
16
#define RTEMS_PORT 2071
17
#define RTEMS_BACK_PORT 2073
18
#ifndef REMDEB_H
19
#define RPCGENSRVNAME(a)     a
20
 
21
enum rpc_type {
22
        SUNRPC = 0,
23
        BADRPCTYPE = 25,
24
};
25
typedef enum rpc_type rpc_type;
26
#define NET_SAFE 1400
27
 
28
struct UDP_MSG {
29
        u_char type;
30
        u_char msg_num;
31
        u_short spec;
32
        long pid;
33
        u_long context;
34
};
35
typedef struct UDP_MSG UDP_MSG;
36
/*
37
 * Sun request values for the remote ptrace system call
38
 */
39
 
40
 
41
enum ptracereq {
42
        RPT_TRACEME = 0,
43
        RPT_CHILDDONE = 0,
44
        RPT_PEEKTEXT = 0 + 1,
45
        RPT_PEEKDATA = 0 + 2,
46
        RPT_PEEKUSER = 0 + 3,
47
        RPT_POKETEXT = 0 + 4,
48
        RPT_POKEDATA = 0 + 5,
49
        RPT_POKEUSER = 0 + 6,
50
        RPT_CONT = 0 + 7,
51
        RPT_KILL = 0 + 8,
52
        RPT_SINGLESTEP = 0 + 9,
53
        RPT_ATTACH = 0 + 10,
54
        RPT_DETACH = 0 + 11,
55
        RPT_GETREGS = 0 + 12,
56
        RPT_SETREGS = 0 + 13,
57
        RPT_GETFPREGS = 0 + 14,
58
        RPT_SETFPREGS = 0 + 15,
59
        RPT_READDATA = 0 + 16,
60
        RPT_WRITEDATA = 0 + 17,
61
        RPT_READTEXT = 0 + 18,
62
        RPT_WRITETEXT = 0 + 19,
63
        RPT_GETFPAREGS = 0 + 20,
64
        RPT_SETFPAREGS = 0 + 21,
65
        RPT_22 = 0 + 22,
66
        RPT_23 = 0 + 23,
67
        RPT_SYSCALL = 0 + 24,
68
        RPT_DUMPCORE = 0 + 25,
69
        RPT_26 = 0 + 26,
70
        RPT_27 = 0 + 27,
71
        RPT_28 = 0 + 28,
72
        RPT_GETUCODE = 0 + 29,
73
        RPT_GETTARGETTHREAD = 50,
74
        RPT_SETTARGETTHREAD = 51,
75
        RPT_THREADSUSPEND = 52,
76
        RPT_THREADRESUME = 53,
77
        RPT_THREADLIST = 54,
78
        RPT_GETTHREADNAME = 55,
79
        RPT_SETTHREADNAME = 56,
80
        RPT_SETTHREADREGS = 57,
81
        RPT_GETTHREADREGS = 58,
82
        RPT_STEPRANGE = 75,
83
        RPT_CONTTO = 76,
84
        RPT_SETBREAK = 77,
85
        RPT_CLRBREAK = 78,
86
        RPT_GETBREAK = 79,
87
        RPT_GETNAME = 80,
88
        RPT_STOP = 81,
89
        RPT_PGETREGS = 82,
90
        RPT_PSETREGS = 83,
91
        RPT_PSETTHREADREGS = 84,
92
        RPT_PGETTHREADREGS = 85,
93
};
94
typedef enum ptracereq ptracereq;
95
 
96
struct xdr_regs {
97
        u_int tabreg[40];
98
};
99
typedef struct xdr_regs xdr_regs;
100
/* now define register macros to apply to xdr_regs struct */
101
 
102
#define R_PC            0
103
#define R_MSR           1
104
#define R_EXCEPNB       2
105
#define R_R0            3
106
#define R_R1    (R_R0 + 1) 
107
#define R_R2    (R_R0 + 2)
108
#define R_R3    (R_R0 + 3)
109
#define R_R4    (R_R0 + 4)
110
#define R_R5    (R_R0 + 5)
111
#define R_R6    (R_R0 + 6)
112
#define R_R7    (R_R0 + 7)
113
#define R_R8    (R_R0 + 8)
114
#define R_R9    (R_R0 + 9)
115
#define R_R10   (R_R0 + 10)
116
#define R_R11   (R_R0 + 11)
117
#define R_R12   (R_R0 + 12)
118
#define R_R13   (R_R0 + 13)
119
#define R_R14   (R_R0 + 14)
120
#define R_R15   (R_R0 + 15)
121
#define R_R16   (R_R0 + 16)
122
#define R_R17   (R_R0 + 17)
123
#define R_R18   (R_R0 + 18)
124
#define R_R19   (R_R0 + 19)
125
#define R_R20   (R_R0 + 20)
126
#define R_R21   (R_R0 + 21)
127
#define R_R22   (R_R0 + 22)
128
#define R_R23   (R_R0 + 23)
129
#define R_R24   (R_R0 + 24)
130
#define R_R25   (R_R0 + 25)
131
#define R_R26   (R_R0 + 26)
132
#define R_R27   (R_R0 + 27)
133
#define R_R28   (R_R0 + 28)
134
#define R_R29   (R_R0 + 29)
135
#define R_R30   (R_R0 + 30)
136
#define R_R31   (R_R0 + 31)
137
#define R_CR    35
138
#define R_CTR   36
139
#define R_XER   37
140
#define R_LR    38
141
#define R_MQ    39
142
 
143
#include <libcpu/raw_exception.h>
144
 
145
#define REG_PC tabreg[R_PC]     /* PC register offset */
146
#define REG_SP tabreg[R_R1]    /* SP register offset */
147
#define REG_FP tabreg[R_R1]    /* SP register offset (no FP on PPC) */
148
#define BREAK_SIZE     4       /* Breakpoint occupies 4 bytes */
149
#define BREAK_ADJ      0       /* Nothing to subtract from address after bp */
150
#define IS_BREAK(l)    ((l) == 0x7d8d6808)
151
#define SET_BREAK(l)   (0x7d8d6808)
152
#define ORG_BREAK(c,p) (p)
153
#define IS_STEP(regs)  (regs.tabreg[R_EXCEPNB] == ASM_TRACE_VECTOR) /* Was step and not break */
154
#define TARGET_PROC_TYPE  3
155
#define MAXDEBUGGEE 150
156
#define NAMEMAX 17
157
  /*
158
   * Memory data for read/write text or data. The size is in data. The target
159
   * addr is in the addr field.
160
   * Be careful before modifying because this value goes into internal
161
   * pipes and is allocated on stack too. Pipes and/or the stack could
162
   * become too small if this value gets incremented.
163
   */
164
#define MEM_DATA_MAX 256
165
 
166
struct xdr_mem {
167
        u_long addr;
168
        u_int dataNb;
169
        u_char data[MEM_DATA_MAX];
170
};
171
typedef struct xdr_mem xdr_mem;
172
 
173
enum break_type {
174
        BRKT_NONE = 0,
175
        BRKT_INSTR = 1,
176
        BRKT_READ = 2,
177
        BRKT_WRITE = 3,
178
        BRKT_ACCESS = 4,
179
        BRKT_EXEC = 5,
180
        BRKT_OS_CALL = 6,
181
        BRKT_OS_SWITCH = 7,
182
        BRKT_STEPEMUL = 8,
183
};
184
typedef enum break_type break_type;
185
#define MAX_THRD_BRK 4
186
 
187
struct xdr_break {
188
        u_char type;
189
        u_char thread_spec;
190
        u_short handle;
191
        u_long ee_loc;
192
        u_long ee_type;
193
        u_short length;
194
        u_char pass_count;
195
        u_char curr_pass;
196
        u_long thread_list[MAX_THRD_BRK];
197
};
198
typedef struct xdr_break xdr_break;
199
#define UTHREAD_MAX 64
200
#define THREADNAMEMAX 16
201
 
202
typedef char *thread_name;
203
 
204
struct KernThread {
205
        u_int threadLi;
206
};
207
typedef struct KernThread KernThread;
208
typedef KernThread *ptThreadList;
209
 
210
struct thread_list {
211
        u_int nbThread;
212
        ptThreadList threads;
213
};
214
typedef struct thread_list thread_list;
215
 
216
struct ptrace_addr_data_in {
217
        ptracereq req;
218
        union {
219
                xdr_regs regs;
220
                struct {
221
                        u_int pregs_len;
222
                        u_int *pregs_val;
223
                } pregs;
224
                thread_name name;
225
                xdr_mem mem;
226
                xdr_break breakp;
227
                u_int address;
228
        } ptrace_addr_data_in_u;
229
};
230
typedef struct ptrace_addr_data_in ptrace_addr_data_in;
231
 
232
struct ptrace_addr_data_out {
233
        ptracereq req;
234
        union {
235
                xdr_regs regs;
236
                struct {
237
                        u_int pregs_len;
238
                        u_int *pregs_val;
239
                } pregs;
240
                thread_list threads;
241
                thread_name name;
242
                xdr_mem mem;
243
                xdr_break breakp;
244
                u_int addr;
245
        } ptrace_addr_data_out_u;
246
};
247
typedef struct ptrace_addr_data_out ptrace_addr_data_out;
248
 
249
typedef struct {
250
        u_int CHAR_DATA_len;
251
        char *CHAR_DATA_val;
252
} CHAR_DATA;
253
#define XRY_MAX_INST_BUFF 128
254
#define XRY_MAX_INSTANCES 16
255
#ifndef XRY_MAX_CMD_STR
256
#define XRY_MAX_CMD_STR 320
257
#endif  /* REMDEB_H */
258
 
259
struct xry_inst {
260
        u_char flags;
261
        u_char type;
262
        u_char sub_type;
263
        u_char res_type;
264
        u_long value;
265
        u_long value2;
266
};
267
typedef struct xry_inst xry_inst;
268
 
269
struct instance {
270
        struct xry_inst instances[XRY_MAX_INSTANCES];
271
        u_char buffer[XRY_MAX_INST_BUFF];
272
};
273
typedef struct instance instance;
274
 
275
struct instance_union {
276
        bool_t instances;
277
        union {
278
                instance inst;
279
                char *buffer;
280
        } instance_union_u;
281
};
282
typedef struct instance_union instance_union;
283
 
284
typedef char *one_arg;
285
#define XRY_MAX_OBJ_NAME 32
286
  /* now open_connex() routine which establishes a connection to server */
287
 
288
enum debug_type {
289
        DEBTYP_PROCESS = 0,
290
        DEBTYP_C_ACTOR = 1,
291
        DEBTYP_KERNEL = 2,
292
        DEBTYP_OTHER = 3,
293
};
294
typedef enum debug_type debug_type;
295
#define DEBUGGER_IS_GDB 0x2    /* */
296
 
297
struct open_in {
298
        u_char back_port[16];
299
        u_short debug_type;
300
        u_short flags;
301
        u_char destination[16];
302
        one_arg user_name;
303
};
304
typedef struct open_in open_in;
305
 
306
struct open_out {
307
        u_long port;
308
        u_int pad[4];
309
        u_int fp;
310
        u_char cmd_table_num;
311
        u_char cmd_table_vers;
312
        u_short server_vers;
313
};
314
typedef struct open_out open_out;
315
  /* now close_connex() routine which detaches from server */
316
 
317
enum close_control {
318
        CLOSE_IGNORE = 0,
319
        CLOSE_KILL = 1,
320
        CLOSE_DETACH = 2,
321
};
322
typedef enum close_control close_control;
323
 
324
struct close_in {
325
        close_control control;
326
};
327
typedef struct close_in close_in;
328
  /* now send_signal() routine which sends signals to processes like kill(2) */
329
 
330
struct signal_in {
331
        int pid;
332
        int sig;
333
};
334
typedef struct signal_in signal_in;
335
 
336
struct signal_out {
337
        int kill_return;
338
        int errNo;
339
};
340
typedef struct signal_out signal_out;
341
  /* now wait_info() routine which returns results of polling the wait status
342
        of a process/actor. It may return 0 if running, else pid or -1 */
343
 
344
enum stop_code {
345
        STOP_ERROR = 0,
346
        STOP_NONE = 1,
347
        STOP_UNKNOWN = 2,
348
        STOP_BREAK = 3,
349
        STOP_STEP = 4,
350
        STOP_SIGNAL = 5,
351
        STOP_TERM_EXIT = 6,
352
        STOP_TERM_SIG = 7,
353
        STOP_DETACHED = 8,
354
        STOP_KILLED = 9,
355
        STOP_SPAWN_FAILED = 10,
356
};
357
typedef enum stop_code stop_code;
358
 
359
struct wait_in {
360
        int pid;
361
};
362
typedef struct wait_in wait_in;
363
 
364
struct wait_out {
365
        int wait_return;
366
        int errNo;
367
        int status;
368
        stop_code reason;
369
        int handle;
370
        u_long PC;
371
        u_long SP;
372
        u_long FP;
373
        u_long thread;
374
};
375
typedef struct wait_out wait_out;
376
  /* now ptrace() routine. This matches the Sun UNIX ptrace as well as
377
        some additions */
378
#define PTRFLG_FORCE 1
379
#define PTRFLG_NON_OWNER 2
380
#define PTRFLG_FREE 4
381
#define PTRDET_UNOWN 0x100
382
 
383
struct ptrace_in {
384
        int pid;
385
        ptrace_addr_data_in addr;
386
        u_int data;
387
        u_int flags;
388
};
389
typedef struct ptrace_in ptrace_in;
390
 
391
struct ptrace_out {
392
        ptrace_addr_data_out addr;
393
        int result;
394
        int errNo;
395
};
396
typedef struct ptrace_out ptrace_out;
397
 
398
struct one_symbol {
399
        char *symbolName;
400
        long symbolValue;
401
};
402
typedef struct one_symbol one_symbol;
403
 
404
typedef struct {
405
        u_int all_symbols_len;
406
        one_symbol *all_symbols_val;
407
} all_symbols;
408
 
409
struct get_global_symbols_out {
410
        all_symbols symbols;
411
};
412
typedef struct get_global_symbols_out get_global_symbols_out;
413
 
414
struct get_text_data_in {
415
        int pid;
416
        char *actorName;
417
};
418
typedef struct get_text_data_in get_text_data_in;
419
 
420
struct get_text_data_out {
421
        int result;
422
        int errNo;
423
        u_long textStart;
424
        u_long textSize;
425
        u_long dataStart;
426
        u_long dataSize;
427
};
428
typedef struct get_text_data_out get_text_data_out;
429
 
430
struct one_signal {
431
        u_int number;
432
        char *name;
433
};
434
typedef struct one_signal one_signal;
435
 
436
typedef struct {
437
        u_int all_signals_len;
438
        one_signal *all_signals_val;
439
} all_signals;
440
 
441
struct get_signal_names_out {
442
        all_signals signals;
443
};
444
typedef struct get_signal_names_out get_signal_names_out;
445
  /* now define the actual calls we support */
446
#define REMDEB_H
447
#endif
448
 
449
#define REMOTEDEB 0x20000fff
450
#define REMOTEVERS 2
451
 
452
#if defined(__STDC__) || defined(__cplusplus)
453
#define OPEN_CONNEX 1
454
extern  open_out * open_connex_2(open_in *, CLIENT *);
455
extern  open_out * open_connex_2_svc(open_in *, struct svc_req *);
456
#define SEND_SIGNAL 2
457
extern  signal_out * send_signal_2(signal_in *, CLIENT *);
458
extern  signal_out * send_signal_2_svc(signal_in *, struct svc_req *);
459
#define CLOSE_CONNEX 10
460
extern  void * close_connex_2(close_in *, CLIENT *);
461
extern  void * close_connex_2_svc(close_in *, struct svc_req *);
462
#define PTRACE 11
463
extern  ptrace_out * ptrace_2(ptrace_in *, CLIENT *);
464
extern  ptrace_out * ptrace_2_svc(ptrace_in *, struct svc_req *);
465
#define WAIT_INFO 13
466
extern  wait_out * wait_info_2(wait_in *, CLIENT *);
467
extern  wait_out * wait_info_2_svc(wait_in *, struct svc_req *);
468
#define GET_SIGNAL_NAMES 17
469
extern  get_signal_names_out * get_signal_names_2(void *, CLIENT *);
470
extern  get_signal_names_out * get_signal_names_2_svc(void *, struct svc_req *);
471
extern int remotedeb_2_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
472
 
473
#else /* K&R C */
474
#define OPEN_CONNEX 1
475
extern  open_out * open_connex_2();
476
extern  open_out * open_connex_2_svc();
477
#define SEND_SIGNAL 2
478
extern  signal_out * send_signal_2();
479
extern  signal_out * send_signal_2_svc();
480
#define CLOSE_CONNEX 10
481
extern  void * close_connex_2();
482
extern  void * close_connex_2_svc();
483
#define PTRACE 11
484
extern  ptrace_out * ptrace_2();
485
extern  ptrace_out * ptrace_2_svc();
486
#define WAIT_INFO 13
487
extern  wait_out * wait_info_2();
488
extern  wait_out * wait_info_2_svc();
489
#define GET_SIGNAL_NAMES 17
490
extern  get_signal_names_out * get_signal_names_2();
491
extern  get_signal_names_out * get_signal_names_2_svc();
492
extern int remotedeb_2_freeresult ();
493
#endif /* K&R C */
494
 
495
/* the xdr functions */
496
 
497
#if defined(__STDC__) || defined(__cplusplus)
498
extern  bool_t xdr_rpc_type (XDR *, rpc_type*);
499
extern  bool_t xdr_UDP_MSG (XDR *, UDP_MSG*);
500
extern  bool_t xdr_ptracereq (XDR *, ptracereq*);
501
extern  bool_t xdr_xdr_regs (XDR *, xdr_regs*);
502
extern  bool_t xdr_xdr_mem (XDR *, xdr_mem*);
503
extern  bool_t xdr_break_type (XDR *, break_type*);
504
extern  bool_t xdr_xdr_break (XDR *, xdr_break*);
505
extern  bool_t xdr_thread_name (XDR *, thread_name*);
506
extern  bool_t xdr_KernThread (XDR *, KernThread*);
507
extern  bool_t xdr_thread_list (XDR *, thread_list*);
508
extern  bool_t xdr_ptrace_addr_data_in (XDR *, ptrace_addr_data_in*);
509
extern  bool_t xdr_ptrace_addr_data_out (XDR *, ptrace_addr_data_out*);
510
extern  bool_t xdr_CHAR_DATA (XDR *, CHAR_DATA*);
511
extern  bool_t xdr_xry_inst (XDR *, xry_inst*);
512
extern  bool_t xdr_instance (XDR *, instance*);
513
extern  bool_t xdr_instance_union (XDR *, instance_union*);
514
extern  bool_t xdr_one_arg (XDR *, one_arg*);
515
extern  bool_t xdr_debug_type (XDR *, debug_type*);
516
extern  bool_t xdr_open_in (XDR *, open_in*);
517
extern  bool_t xdr_open_out (XDR *, open_out*);
518
extern  bool_t xdr_close_control (XDR *, close_control*);
519
extern  bool_t xdr_close_in (XDR *, close_in*);
520
extern  bool_t xdr_signal_in (XDR *, signal_in*);
521
extern  bool_t xdr_signal_out (XDR *, signal_out*);
522
extern  bool_t xdr_stop_code (XDR *, stop_code*);
523
extern  bool_t xdr_wait_in (XDR *, wait_in*);
524
extern  bool_t xdr_wait_out (XDR *, wait_out*);
525
extern  bool_t xdr_ptrace_in (XDR *, ptrace_in*);
526
extern  bool_t xdr_ptrace_out (XDR *, ptrace_out*);
527
extern  bool_t xdr_one_symbol (XDR *, one_symbol*);
528
extern  bool_t xdr_all_symbols (XDR *, all_symbols*);
529
extern  bool_t xdr_get_global_symbols_out (XDR *, get_global_symbols_out*);
530
extern  bool_t xdr_get_text_data_in (XDR *, get_text_data_in*);
531
extern  bool_t xdr_get_text_data_out (XDR *, get_text_data_out*);
532
extern  bool_t xdr_one_signal (XDR *, one_signal*);
533
extern  bool_t xdr_all_signals (XDR *, all_signals*);
534
extern  bool_t xdr_get_signal_names_out (XDR *, get_signal_names_out*);
535
 
536
#else /* K&R C */
537
extern bool_t xdr_rpc_type ();
538
extern bool_t xdr_UDP_MSG ();
539
extern bool_t xdr_ptracereq ();
540
extern bool_t xdr_xdr_regs ();
541
extern bool_t xdr_xdr_mem ();
542
extern bool_t xdr_break_type ();
543
extern bool_t xdr_xdr_break ();
544
extern bool_t xdr_thread_name ();
545
extern bool_t xdr_KernThread ();
546
extern bool_t xdr_thread_list ();
547
extern bool_t xdr_ptrace_addr_data_in ();
548
extern bool_t xdr_ptrace_addr_data_out ();
549
extern bool_t xdr_CHAR_DATA ();
550
extern bool_t xdr_xry_inst ();
551
extern bool_t xdr_instance ();
552
extern bool_t xdr_instance_union ();
553
extern bool_t xdr_one_arg ();
554
extern bool_t xdr_debug_type ();
555
extern bool_t xdr_open_in ();
556
extern bool_t xdr_open_out ();
557
extern bool_t xdr_close_control ();
558
extern bool_t xdr_close_in ();
559
extern bool_t xdr_signal_in ();
560
extern bool_t xdr_signal_out ();
561
extern bool_t xdr_stop_code ();
562
extern bool_t xdr_wait_in ();
563
extern bool_t xdr_wait_out ();
564
extern bool_t xdr_ptrace_in ();
565
extern bool_t xdr_ptrace_out ();
566
extern bool_t xdr_one_symbol ();
567
extern bool_t xdr_all_symbols ();
568
extern bool_t xdr_get_global_symbols_out ();
569
extern bool_t xdr_get_text_data_in ();
570
extern bool_t xdr_get_text_data_out ();
571
extern bool_t xdr_one_signal ();
572
extern bool_t xdr_all_signals ();
573
extern bool_t xdr_get_signal_names_out ();
574
 
575
#endif /* K&R C */
576
 
577
#ifdef __cplusplus
578
}
579
#endif
580
 
581
#endif /* !_REMDEB_H_RPCGEN */

powered by: WebSVN 2.1.0

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