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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [librdbg/] [src/] [i386/] [any/] [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[19];
98
};
99
typedef struct xdr_regs xdr_regs;
100
/* now define register macros to apply to xdr_reg struct */
101
 
102
#define GS     0
103
#define FS     1
104
#define ES     2
105
#define DS     3
106
#define EDI    4
107
#define ESI    5
108
#define EBP    6
109
#define ESP    7
110
#define EBX    8
111
#define EDX    9
112
#define ECX    10
113
#define EAX    11
114
#define TRAPNO 12
115
#define ERR    13
116
#define EIP    14
117
#define CS     15
118
#define EFL    16
119
#define UESP   17
120
#define SS     18
121
 
122
#define REG_PC tabreg[EIP]     /* PC (eip) register offset */
123
#define REG_SP tabreg[UESP]    /* SP (uesp) register offset */
124
#define REG_FP tabreg[EBP]     /* FP (ebp) register offset */
125
/* now define the BREAKPOINT mask technique to a long word */
126
#define SET_BREAK(l)   ((l&0xFFFFFF00) | 0xCC) 
127
#define IS_BREAK(l)    (((l) & 0xFF) == 0xCC)
128
#define ORG_BREAK(c,p) (((c) & 0xFFFFFF00) | ((p) & 0xFF))
129
#define IS_STEP(regs)  (regs.tabreg[TRAPNO] == 1) /* was step and not break */
130
#define BREAK_ADJ      1       /* must subtract one from address after bp */
131
#define BREAK_SIZE     1       /* Breakpoint occupies one byte */
132
#define TARGET_PROC_TYPE  0
133
#define MAXDEBUGGEE 150
134
#define NAMEMAX 17
135
  /*
136
   * Memory data for read/write text or data. The size is in data. The target
137
   * addr is in the addr field.
138
   * Be careful before modifying because this value goes into internal
139
   * pipes and is allocated on stack too. Pipes and/or the stack could
140
   * become too small if this value gets incremented.
141
   */
142
#define MEM_DATA_MAX 256
143
 
144
struct xdr_mem {
145
        u_long addr;
146
        u_int dataNb;
147
        u_char data[MEM_DATA_MAX];
148
};
149
typedef struct xdr_mem xdr_mem;
150
 
151
enum break_type {
152
        BRKT_NONE = 0,
153
        BRKT_INSTR = 1,
154
        BRKT_READ = 2,
155
        BRKT_WRITE = 3,
156
        BRKT_ACCESS = 4,
157
        BRKT_EXEC = 5,
158
        BRKT_OS_CALL = 6,
159
        BRKT_OS_SWITCH = 7,
160
        BRKT_STEPEMUL = 8,
161
};
162
typedef enum break_type break_type;
163
#define MAX_THRD_BRK 4
164
 
165
struct xdr_break {
166
        u_char type;
167
        u_char thread_spec;
168
        u_short handle;
169
        u_long ee_loc;
170
        u_long ee_type;
171
        u_short length;
172
        u_char pass_count;
173
        u_char curr_pass;
174
        u_long thread_list[MAX_THRD_BRK];
175
};
176
typedef struct xdr_break xdr_break;
177
#define UTHREAD_MAX 64
178
#define THREADNAMEMAX 16
179
 
180
typedef char *thread_name;
181
 
182
struct KernThread {
183
        u_int threadLi;
184
};
185
typedef struct KernThread KernThread;
186
typedef KernThread *ptThreadList;
187
 
188
struct thread_list {
189
        u_int nbThread;
190
        ptThreadList threads;
191
};
192
typedef struct thread_list thread_list;
193
 
194
struct ptrace_addr_data_in {
195
        ptracereq req;
196
        union {
197
                xdr_regs regs;
198
                struct {
199
                        u_int pregs_len;
200
                        u_int *pregs_val;
201
                } pregs;
202
                thread_name name;
203
                xdr_mem mem;
204
                xdr_break breakp;
205
                u_int address;
206
        } ptrace_addr_data_in_u;
207
};
208
typedef struct ptrace_addr_data_in ptrace_addr_data_in;
209
 
210
struct ptrace_addr_data_out {
211
        ptracereq req;
212
        union {
213
                xdr_regs regs;
214
                struct {
215
                        u_int pregs_len;
216
                        u_int *pregs_val;
217
                } pregs;
218
                thread_list threads;
219
                thread_name name;
220
                xdr_mem mem;
221
                xdr_break breakp;
222
                u_int addr;
223
        } ptrace_addr_data_out_u;
224
};
225
typedef struct ptrace_addr_data_out ptrace_addr_data_out;
226
 
227
typedef struct {
228
        u_int CHAR_DATA_len;
229
        char *CHAR_DATA_val;
230
} CHAR_DATA;
231
#define XRY_MAX_INST_BUFF 128
232
#define XRY_MAX_INSTANCES 16
233
#ifndef XRY_MAX_CMD_STR
234
#define XRY_MAX_CMD_STR 320
235
#endif  /* REMDEB_H */
236
 
237
struct xry_inst {
238
        u_char flags;
239
        u_char type;
240
        u_char sub_type;
241
        u_char res_type;
242
        u_long value;
243
        u_long value2;
244
};
245
typedef struct xry_inst xry_inst;
246
 
247
struct instance {
248
        struct xry_inst instances[XRY_MAX_INSTANCES];
249
        u_char buffer[XRY_MAX_INST_BUFF];
250
};
251
typedef struct instance instance;
252
 
253
struct instance_union {
254
        bool_t instances;
255
        union {
256
                instance inst;
257
                char *buffer;
258
        } instance_union_u;
259
};
260
typedef struct instance_union instance_union;
261
 
262
typedef char *one_arg;
263
#define XRY_MAX_OBJ_NAME 32
264
  /* now open_connex() routine which establishes a connection to server */
265
 
266
enum debug_type {
267
        DEBTYP_PROCESS = 0,
268
        DEBTYP_C_ACTOR = 1,
269
        DEBTYP_KERNEL = 2,
270
        DEBTYP_OTHER = 3,
271
};
272
typedef enum debug_type debug_type;
273
#define DEBUGGER_IS_GDB 0x2    /* */
274
 
275
struct open_in {
276
        u_char back_port[16];
277
        u_short debug_type;
278
        u_short flags;
279
        u_char destination[16];
280
        one_arg user_name;
281
};
282
typedef struct open_in open_in;
283
 
284
struct open_out {
285
        u_long port;
286
        u_int pad[4];
287
        u_int fp;
288
        u_char cmd_table_num;
289
        u_char cmd_table_vers;
290
        u_short server_vers;
291
};
292
typedef struct open_out open_out;
293
  /* now close_connex() routine which detaches from server */
294
 
295
enum close_control {
296
        CLOSE_IGNORE = 0,
297
        CLOSE_KILL = 1,
298
        CLOSE_DETACH = 2,
299
};
300
typedef enum close_control close_control;
301
 
302
struct close_in {
303
        close_control control;
304
};
305
typedef struct close_in close_in;
306
  /* now send_signal() routine which sends signals to processes like kill(2) */
307
 
308
struct signal_in {
309
        int pid;
310
        int sig;
311
};
312
typedef struct signal_in signal_in;
313
 
314
struct signal_out {
315
        int kill_return;
316
        int errNo;
317
};
318
typedef struct signal_out signal_out;
319
  /* now wait_info() routine which returns results of polling the wait status
320
        of a process/actor. It may return 0 if running, else pid or -1 */
321
 
322
enum stop_code {
323
        STOP_ERROR = 0,
324
        STOP_NONE = 1,
325
        STOP_UNKNOWN = 2,
326
        STOP_BREAK = 3,
327
        STOP_STEP = 4,
328
        STOP_SIGNAL = 5,
329
        STOP_TERM_EXIT = 6,
330
        STOP_TERM_SIG = 7,
331
        STOP_DETACHED = 8,
332
        STOP_KILLED = 9,
333
        STOP_SPAWN_FAILED = 10,
334
};
335
typedef enum stop_code stop_code;
336
 
337
struct wait_in {
338
        int pid;
339
};
340
typedef struct wait_in wait_in;
341
 
342
struct wait_out {
343
        int wait_return;
344
        int errNo;
345
        int status;
346
        stop_code reason;
347
        int handle;
348
        u_long PC;
349
        u_long SP;
350
        u_long FP;
351
        u_long thread;
352
};
353
typedef struct wait_out wait_out;
354
  /* now ptrace() routine. This matches the Sun UNIX ptrace as well as
355
        some additions */
356
#define PTRFLG_FORCE 1
357
#define PTRFLG_NON_OWNER 2
358
#define PTRFLG_FREE 4
359
#define PTRDET_UNOWN 0x100
360
 
361
struct ptrace_in {
362
        int pid;
363
        ptrace_addr_data_in addr;
364
        u_int data;
365
        u_int flags;
366
};
367
typedef struct ptrace_in ptrace_in;
368
 
369
struct ptrace_out {
370
        ptrace_addr_data_out addr;
371
        int result;
372
        int errNo;
373
};
374
typedef struct ptrace_out ptrace_out;
375
 
376
struct one_symbol {
377
        char *symbolName;
378
        long symbolValue;
379
};
380
typedef struct one_symbol one_symbol;
381
 
382
typedef struct {
383
        u_int all_symbols_len;
384
        one_symbol *all_symbols_val;
385
} all_symbols;
386
 
387
struct get_global_symbols_out {
388
        all_symbols symbols;
389
};
390
typedef struct get_global_symbols_out get_global_symbols_out;
391
 
392
struct get_text_data_in {
393
        int pid;
394
        char *actorName;
395
};
396
typedef struct get_text_data_in get_text_data_in;
397
 
398
struct get_text_data_out {
399
        int result;
400
        int errNo;
401
        u_long textStart;
402
        u_long textSize;
403
        u_long dataStart;
404
        u_long dataSize;
405
};
406
typedef struct get_text_data_out get_text_data_out;
407
 
408
struct one_signal {
409
        u_int number;
410
        char *name;
411
};
412
typedef struct one_signal one_signal;
413
 
414
typedef struct {
415
        u_int all_signals_len;
416
        one_signal *all_signals_val;
417
} all_signals;
418
 
419
struct get_signal_names_out {
420
        all_signals signals;
421
};
422
typedef struct get_signal_names_out get_signal_names_out;
423
  /* now define the actual calls we support */
424
#define REMDEB_H
425
#endif
426
 
427
#define REMOTEDEB 0x20000fff
428
#define REMOTEVERS 2
429
 
430
#if defined(__STDC__) || defined(__cplusplus)
431
#define OPEN_CONNEX 1
432
extern  open_out * open_connex_2(open_in *, CLIENT *);
433
extern  open_out * open_connex_2_svc(open_in *, struct svc_req *);
434
#define SEND_SIGNAL 2
435
extern  signal_out * send_signal_2(signal_in *, CLIENT *);
436
extern  signal_out * send_signal_2_svc(signal_in *, struct svc_req *);
437
#define CLOSE_CONNEX 10
438
extern  void * close_connex_2(close_in *, CLIENT *);
439
extern  void * close_connex_2_svc(close_in *, struct svc_req *);
440
#define PTRACE 11
441
extern  ptrace_out * ptrace_2(ptrace_in *, CLIENT *);
442
extern  ptrace_out * ptrace_2_svc(ptrace_in *, struct svc_req *);
443
#define WAIT_INFO 13
444
extern  wait_out * wait_info_2(wait_in *, CLIENT *);
445
extern  wait_out * wait_info_2_svc(wait_in *, struct svc_req *);
446
#define GET_SIGNAL_NAMES 17
447
extern  get_signal_names_out * get_signal_names_2(void *, CLIENT *);
448
extern  get_signal_names_out * get_signal_names_2_svc(void *, struct svc_req *);
449
extern int remotedeb_2_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
450
 
451
#else /* K&R C */
452
#define OPEN_CONNEX 1
453
extern  open_out * open_connex_2();
454
extern  open_out * open_connex_2_svc();
455
#define SEND_SIGNAL 2
456
extern  signal_out * send_signal_2();
457
extern  signal_out * send_signal_2_svc();
458
#define CLOSE_CONNEX 10
459
extern  void * close_connex_2();
460
extern  void * close_connex_2_svc();
461
#define PTRACE 11
462
extern  ptrace_out * ptrace_2();
463
extern  ptrace_out * ptrace_2_svc();
464
#define WAIT_INFO 13
465
extern  wait_out * wait_info_2();
466
extern  wait_out * wait_info_2_svc();
467
#define GET_SIGNAL_NAMES 17
468
extern  get_signal_names_out * get_signal_names_2();
469
extern  get_signal_names_out * get_signal_names_2_svc();
470
extern int remotedeb_2_freeresult ();
471
#endif /* K&R C */
472
 
473
/* the xdr functions */
474
 
475
#if defined(__STDC__) || defined(__cplusplus)
476
extern  bool_t xdr_rpc_type (XDR *, rpc_type*);
477
extern  bool_t xdr_UDP_MSG (XDR *, UDP_MSG*);
478
extern  bool_t xdr_ptracereq (XDR *, ptracereq*);
479
extern  bool_t xdr_xdr_regs (XDR *, xdr_regs*);
480
extern  bool_t xdr_xdr_mem (XDR *, xdr_mem*);
481
extern  bool_t xdr_break_type (XDR *, break_type*);
482
extern  bool_t xdr_xdr_break (XDR *, xdr_break*);
483
extern  bool_t xdr_thread_name (XDR *, thread_name*);
484
extern  bool_t xdr_KernThread (XDR *, KernThread*);
485
extern  bool_t xdr_thread_list (XDR *, thread_list*);
486
extern  bool_t xdr_ptrace_addr_data_in (XDR *, ptrace_addr_data_in*);
487
extern  bool_t xdr_ptrace_addr_data_out (XDR *, ptrace_addr_data_out*);
488
extern  bool_t xdr_CHAR_DATA (XDR *, CHAR_DATA*);
489
extern  bool_t xdr_xry_inst (XDR *, xry_inst*);
490
extern  bool_t xdr_instance (XDR *, instance*);
491
extern  bool_t xdr_instance_union (XDR *, instance_union*);
492
extern  bool_t xdr_one_arg (XDR *, one_arg*);
493
extern  bool_t xdr_debug_type (XDR *, debug_type*);
494
extern  bool_t xdr_open_in (XDR *, open_in*);
495
extern  bool_t xdr_open_out (XDR *, open_out*);
496
extern  bool_t xdr_close_control (XDR *, close_control*);
497
extern  bool_t xdr_close_in (XDR *, close_in*);
498
extern  bool_t xdr_signal_in (XDR *, signal_in*);
499
extern  bool_t xdr_signal_out (XDR *, signal_out*);
500
extern  bool_t xdr_stop_code (XDR *, stop_code*);
501
extern  bool_t xdr_wait_in (XDR *, wait_in*);
502
extern  bool_t xdr_wait_out (XDR *, wait_out*);
503
extern  bool_t xdr_ptrace_in (XDR *, ptrace_in*);
504
extern  bool_t xdr_ptrace_out (XDR *, ptrace_out*);
505
extern  bool_t xdr_one_symbol (XDR *, one_symbol*);
506
extern  bool_t xdr_all_symbols (XDR *, all_symbols*);
507
extern  bool_t xdr_get_global_symbols_out (XDR *, get_global_symbols_out*);
508
extern  bool_t xdr_get_text_data_in (XDR *, get_text_data_in*);
509
extern  bool_t xdr_get_text_data_out (XDR *, get_text_data_out*);
510
extern  bool_t xdr_one_signal (XDR *, one_signal*);
511
extern  bool_t xdr_all_signals (XDR *, all_signals*);
512
extern  bool_t xdr_get_signal_names_out (XDR *, get_signal_names_out*);
513
 
514
#else /* K&R C */
515
extern bool_t xdr_rpc_type ();
516
extern bool_t xdr_UDP_MSG ();
517
extern bool_t xdr_ptracereq ();
518
extern bool_t xdr_xdr_regs ();
519
extern bool_t xdr_xdr_mem ();
520
extern bool_t xdr_break_type ();
521
extern bool_t xdr_xdr_break ();
522
extern bool_t xdr_thread_name ();
523
extern bool_t xdr_KernThread ();
524
extern bool_t xdr_thread_list ();
525
extern bool_t xdr_ptrace_addr_data_in ();
526
extern bool_t xdr_ptrace_addr_data_out ();
527
extern bool_t xdr_CHAR_DATA ();
528
extern bool_t xdr_xry_inst ();
529
extern bool_t xdr_instance ();
530
extern bool_t xdr_instance_union ();
531
extern bool_t xdr_one_arg ();
532
extern bool_t xdr_debug_type ();
533
extern bool_t xdr_open_in ();
534
extern bool_t xdr_open_out ();
535
extern bool_t xdr_close_control ();
536
extern bool_t xdr_close_in ();
537
extern bool_t xdr_signal_in ();
538
extern bool_t xdr_signal_out ();
539
extern bool_t xdr_stop_code ();
540
extern bool_t xdr_wait_in ();
541
extern bool_t xdr_wait_out ();
542
extern bool_t xdr_ptrace_in ();
543
extern bool_t xdr_ptrace_out ();
544
extern bool_t xdr_one_symbol ();
545
extern bool_t xdr_all_symbols ();
546
extern bool_t xdr_get_global_symbols_out ();
547
extern bool_t xdr_get_text_data_in ();
548
extern bool_t xdr_get_text_data_out ();
549
extern bool_t xdr_one_signal ();
550
extern bool_t xdr_all_signals ();
551
extern bool_t xdr_get_signal_names_out ();
552
 
553
#endif /* K&R C */
554
 
555
#ifdef __cplusplus
556
}
557
#endif
558
 
559
#endif /* !_REMDEB_H_RPCGEN */

powered by: WebSVN 2.1.0

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