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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [c/] [src/] [librdbg/] [src/] [i386/] [any/] [remdeb.h] - 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
#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
 
232
typedef char *one_arg;
233
 /* now open_connex() routine which establishes a connection to server */
234
 
235
enum debug_type {
236
        DEBTYP_PROCESS = 0,
237
        DEBTYP_C_ACTOR = 1,
238
        DEBTYP_KERNEL = 2,
239
        DEBTYP_OTHER = 3,
240
};
241
typedef enum debug_type debug_type;
242
#define DEBUGGER_IS_GDB 0x2 /* */
243
 
244
struct open_in {
245
        u_char back_port[16];
246
        u_short debug_type;
247
        u_short flags;
248
        u_char destination[16];
249
        one_arg user_name;
250
};
251
typedef struct open_in open_in;
252
 
253
struct open_out {
254
        u_long port;
255
        u_int pad[4];
256
        u_int fp;
257
        u_char cmd_table_num;
258
        u_char cmd_table_vers;
259
        u_short server_vers;
260
};
261
typedef struct open_out open_out;
262
 /* now close_connex() routine which detaches from server */
263
 
264
enum close_control {
265
        CLOSE_IGNORE = 0,
266
        CLOSE_KILL = 1,
267
        CLOSE_DETACH = 2,
268
};
269
typedef enum close_control close_control;
270
 
271
struct close_in {
272
        close_control control;
273
};
274
typedef struct close_in close_in;
275
 /* now send_signal() routine which sends signals to processes like kill(2) */
276
 
277
struct signal_in {
278
        int pid;
279
        int sig;
280
};
281
typedef struct signal_in signal_in;
282
 
283
struct signal_out {
284
        int kill_return;
285
        int errNo;
286
};
287
typedef struct signal_out signal_out;
288
 /* now wait_info() routine which returns results of polling the wait status
289
        of a process/actor. It may return 0 if running, else pid or -1 */
290
 
291
enum stop_code {
292
        STOP_ERROR = 0,
293
        STOP_NONE = 1,
294
        STOP_UNKNOWN = 2,
295
        STOP_BREAK = 3,
296
        STOP_STEP = 4,
297
        STOP_SIGNAL = 5,
298
        STOP_TERM_EXIT = 6,
299
        STOP_TERM_SIG = 7,
300
        STOP_DETACHED = 8,
301
        STOP_KILLED = 9,
302
        STOP_SPAWN_FAILED = 10,
303
};
304
typedef enum stop_code stop_code;
305
 
306
struct wait_in {
307
        int pid;
308
};
309
typedef struct wait_in wait_in;
310
 
311
struct wait_out {
312
        int wait_return;
313
        int errNo;
314
        int status;
315
        stop_code reason;
316
        int handle;
317
        u_long PC;
318
        u_long SP;
319
        u_long FP;
320
        u_long thread;
321
};
322
typedef struct wait_out wait_out;
323
 /* now ptrace() routine. This matches the Sun UNIX ptrace as well as
324
        some additions */
325
#define PTRFLG_FORCE 1
326
#define PTRFLG_NON_OWNER 2
327
#define PTRFLG_FREE 4
328
#define PTRDET_UNOWN 0x100
329
 
330
struct ptrace_in {
331
        int pid;
332
        ptrace_addr_data_in addr;
333
        u_int data;
334
        u_int flags;
335
};
336
typedef struct ptrace_in ptrace_in;
337
 
338
struct ptrace_out {
339
        ptrace_addr_data_out addr;
340
        int result;
341
        int errNo;
342
};
343
typedef struct ptrace_out ptrace_out;
344
 
345
struct one_symbol {
346
        char *symbolName;
347
        long symbolValue;
348
};
349
typedef struct one_symbol one_symbol;
350
 
351
typedef struct {
352
        u_int all_symbols_len;
353
        one_symbol *all_symbols_val;
354
} all_symbols;
355
 
356
struct get_global_symbols_out {
357
        all_symbols symbols;
358
};
359
typedef struct get_global_symbols_out get_global_symbols_out;
360
 
361
struct get_text_data_in {
362
        int pid;
363
        char *actorName;
364
};
365
typedef struct get_text_data_in get_text_data_in;
366
 
367
struct get_text_data_out {
368
        int result;
369
        int errNo;
370
        u_long textStart;
371
        u_long textSize;
372
        u_long dataStart;
373
        u_long dataSize;
374
};
375
typedef struct get_text_data_out get_text_data_out;
376
 
377
struct one_signal {
378
        u_int number;
379
        char *name;
380
};
381
typedef struct one_signal one_signal;
382
 
383
typedef struct {
384
        u_int all_signals_len;
385
        one_signal *all_signals_val;
386
} all_signals;
387
 
388
struct get_signal_names_out {
389
        all_signals signals;
390
};
391
typedef struct get_signal_names_out get_signal_names_out;
392
 /* now define the actual calls we support */
393
#define REMDEB_H
394
#endif
395
 
396
#define REMOTEDEB 0x20000fff
397
#define REMOTEVERS 2
398
 
399
#if defined(__STDC__) || defined(__cplusplus)
400
#define OPEN_CONNEX 1
401
extern  open_out * open_connex_2(open_in *, CLIENT *);
402
extern  open_out * open_connex_2_svc(open_in *, struct svc_req *);
403
#define SEND_SIGNAL 2
404
extern  signal_out * send_signal_2(signal_in *, CLIENT *);
405
extern  signal_out * send_signal_2_svc(signal_in *, struct svc_req *);
406
#define CLOSE_CONNEX 10
407
extern  void * close_connex_2(close_in *, CLIENT *);
408
extern  void * close_connex_2_svc(close_in *, struct svc_req *);
409
#define PTRACE 11
410
extern  ptrace_out * ptrace_2(ptrace_in *, CLIENT *);
411
extern  ptrace_out * ptrace_2_svc(ptrace_in *, struct svc_req *);
412
#define WAIT_INFO 13
413
extern  wait_out * wait_info_2(wait_in *, CLIENT *);
414
extern  wait_out * wait_info_2_svc(wait_in *, struct svc_req *);
415
#define GET_SIGNAL_NAMES 17
416
extern  get_signal_names_out * get_signal_names_2(void *, CLIENT *);
417
extern  get_signal_names_out * get_signal_names_2_svc(void *, struct svc_req *);
418
extern int remotedeb_2_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
419
 
420
#else /* K&R C */
421
#define OPEN_CONNEX 1
422
extern  open_out * open_connex_2();
423
extern  open_out * open_connex_2_svc();
424
#define SEND_SIGNAL 2
425
extern  signal_out * send_signal_2();
426
extern  signal_out * send_signal_2_svc();
427
#define CLOSE_CONNEX 10
428
extern  void * close_connex_2();
429
extern  void * close_connex_2_svc();
430
#define PTRACE 11
431
extern  ptrace_out * ptrace_2();
432
extern  ptrace_out * ptrace_2_svc();
433
#define WAIT_INFO 13
434
extern  wait_out * wait_info_2();
435
extern  wait_out * wait_info_2_svc();
436
#define GET_SIGNAL_NAMES 17
437
extern  get_signal_names_out * get_signal_names_2();
438
extern  get_signal_names_out * get_signal_names_2_svc();
439
extern int remotedeb_2_freeresult ();
440
#endif /* K&R C */
441
 
442
/* the xdr functions */
443
 
444
#if defined(__STDC__) || defined(__cplusplus)
445
extern  bool_t xdr_rpc_type (XDR *, rpc_type*);
446
extern  bool_t xdr_UDP_MSG (XDR *, UDP_MSG*);
447
extern  bool_t xdr_ptracereq (XDR *, ptracereq*);
448
extern  bool_t xdr_xdr_regs (XDR *, xdr_regs*);
449
extern  bool_t xdr_xdr_mem (XDR *, xdr_mem*);
450
extern  bool_t xdr_break_type (XDR *, break_type*);
451
extern  bool_t xdr_xdr_break (XDR *, xdr_break*);
452
extern  bool_t xdr_thread_name (XDR *, thread_name*);
453
extern  bool_t xdr_KernThread (XDR *, KernThread*);
454
extern  bool_t xdr_thread_list (XDR *, thread_list*);
455
extern  bool_t xdr_ptrace_addr_data_in (XDR *, ptrace_addr_data_in*);
456
extern  bool_t xdr_ptrace_addr_data_out (XDR *, ptrace_addr_data_out*);
457
extern  bool_t xdr_CHAR_DATA (XDR *, CHAR_DATA*);
458
extern  bool_t xdr_one_arg (XDR *, one_arg*);
459
extern  bool_t xdr_debug_type (XDR *, debug_type*);
460
extern  bool_t xdr_open_in (XDR *, open_in*);
461
extern  bool_t xdr_open_out (XDR *, open_out*);
462
extern  bool_t xdr_close_control (XDR *, close_control*);
463
extern  bool_t xdr_close_in (XDR *, close_in*);
464
extern  bool_t xdr_signal_in (XDR *, signal_in*);
465
extern  bool_t xdr_signal_out (XDR *, signal_out*);
466
extern  bool_t xdr_stop_code (XDR *, stop_code*);
467
extern  bool_t xdr_wait_in (XDR *, wait_in*);
468
extern  bool_t xdr_wait_out (XDR *, wait_out*);
469
extern  bool_t xdr_ptrace_in (XDR *, ptrace_in*);
470
extern  bool_t xdr_ptrace_out (XDR *, ptrace_out*);
471
extern  bool_t xdr_one_symbol (XDR *, one_symbol*);
472
extern  bool_t xdr_all_symbols (XDR *, all_symbols*);
473
extern  bool_t xdr_get_global_symbols_out (XDR *, get_global_symbols_out*);
474
extern  bool_t xdr_get_text_data_in (XDR *, get_text_data_in*);
475
extern  bool_t xdr_get_text_data_out (XDR *, get_text_data_out*);
476
extern  bool_t xdr_one_signal (XDR *, one_signal*);
477
extern  bool_t xdr_all_signals (XDR *, all_signals*);
478
extern  bool_t xdr_get_signal_names_out (XDR *, get_signal_names_out*);
479
 
480
#else /* K&R C */
481
extern bool_t xdr_rpc_type ();
482
extern bool_t xdr_UDP_MSG ();
483
extern bool_t xdr_ptracereq ();
484
extern bool_t xdr_xdr_regs ();
485
extern bool_t xdr_xdr_mem ();
486
extern bool_t xdr_break_type ();
487
extern bool_t xdr_xdr_break ();
488
extern bool_t xdr_thread_name ();
489
extern bool_t xdr_KernThread ();
490
extern bool_t xdr_thread_list ();
491
extern bool_t xdr_ptrace_addr_data_in ();
492
extern bool_t xdr_ptrace_addr_data_out ();
493
extern bool_t xdr_CHAR_DATA ();
494
extern bool_t xdr_one_arg ();
495
extern bool_t xdr_debug_type ();
496
extern bool_t xdr_open_in ();
497
extern bool_t xdr_open_out ();
498
extern bool_t xdr_close_control ();
499
extern bool_t xdr_close_in ();
500
extern bool_t xdr_signal_in ();
501
extern bool_t xdr_signal_out ();
502
extern bool_t xdr_stop_code ();
503
extern bool_t xdr_wait_in ();
504
extern bool_t xdr_wait_out ();
505
extern bool_t xdr_ptrace_in ();
506
extern bool_t xdr_ptrace_out ();
507
extern bool_t xdr_one_symbol ();
508
extern bool_t xdr_all_symbols ();
509
extern bool_t xdr_get_global_symbols_out ();
510
extern bool_t xdr_get_text_data_in ();
511
extern bool_t xdr_get_text_data_out ();
512
extern bool_t xdr_one_signal ();
513
extern bool_t xdr_all_signals ();
514
extern bool_t xdr_get_signal_names_out ();
515
 
516
#endif /* K&R C */
517
 
518
#ifdef __cplusplus
519
}
520
#endif
521
 
522
#endif /* !_REMDEB_H_RPCGEN */

powered by: WebSVN 2.1.0

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