source: rtems/c/src/librdbg/src/i386/any/remdeb.h @ 4c3ab846

4.104.114.84.95
Last change on this file since 4c3ab846 was 4c3ab846, checked in by Joel Sherrill <joel.sherrill@…>, on 01/13/00 at 21:07:22

Patch rtems-rc-20000104-17.diff from Ralf Corsepius <corsepiu@…>
that addresses the librdbg/rpcgen related problems:

Changes:

  • All rpcgen generated files are now kept inside of the source tree
  • Fix librdbg/configure to correctly detect presence of rpcgen and awk
  • Use rpcgen -m to generated remdeb_svc.c
  • Remove msgout/_msgout from awk.svc
  • minor cleanups to librdbg/configure.in

ATTENTION --- IMPORTANT:

  • With keeping rpc-generated files pre-build inside of the source tree, you as the packager of RTEMS have to ensure that timestamps are correctly set up: The generated files must not be older than the *.x files.
  • This is extraordinarily important when
    • putting the package on read-only media
    • after checking out from CVS
    • after modifications to the *.x files
  • If one of the *.x files is modified you have to either
    • build for i386/pc386 and powerpc/mcp750
    • or to invoke the same rpcgen calls as the librdbg/src/<cpu>/<bsp>/Makefile.am do manually before checking-in the files to CVS.

Proposal:

We could add something to bootstrap for touching the rpcgen-generated
sources and/or to manually regenerate them.

NOTE FROM JOEL:

Ralf proposed modifying bootstrap to handle rpcgen. I think this
is the best solution as it is something already done in the
snapshot procedure.

  • Property mode set to 100644
File size: 13.4 KB
Line 
1/*
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
13extern "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
21enum rpc_type {
22        SUNRPC = 0,
23        BADRPCTYPE = 25,
24};
25typedef enum rpc_type rpc_type;
26#define NET_SAFE 1400
27
28struct UDP_MSG {
29        u_char type;
30        u_char msg_num;
31        u_short spec;
32        long pid;
33        u_long context;
34};
35typedef struct UDP_MSG UDP_MSG;
36/*
37 * Sun request values for the remote ptrace system call
38 */
39
40
41enum 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};
94typedef enum ptracereq ptracereq;
95
96struct xdr_regs {
97        u_int tabreg[19];
98};
99typedef 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
144struct xdr_mem {
145        u_long addr;
146        u_int dataNb;
147        u_char data[MEM_DATA_MAX];
148};
149typedef struct xdr_mem xdr_mem;
150
151enum 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};
162typedef enum break_type break_type;
163#define MAX_THRD_BRK 4
164
165struct 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};
176typedef struct xdr_break xdr_break;
177#define UTHREAD_MAX 64
178#define THREADNAMEMAX 16
179
180typedef char *thread_name;
181
182struct KernThread {
183        u_int threadLi;
184};
185typedef struct KernThread KernThread;
186typedef KernThread *ptThreadList;
187
188struct thread_list {
189        u_int nbThread;
190        ptThreadList threads;
191};
192typedef struct thread_list thread_list;
193
194struct 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};
208typedef struct ptrace_addr_data_in ptrace_addr_data_in;
209
210struct 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};
225typedef struct ptrace_addr_data_out ptrace_addr_data_out;
226
227typedef 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
237struct 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};
245typedef struct xry_inst xry_inst;
246
247struct instance {
248        struct xry_inst instances[XRY_MAX_INSTANCES];
249        u_char buffer[XRY_MAX_INST_BUFF];
250};
251typedef struct instance instance;
252
253struct instance_union {
254        bool_t instances;
255        union {
256                instance inst;
257                char *buffer;
258        } instance_union_u;
259};
260typedef struct instance_union instance_union;
261
262typedef char *one_arg;
263#define XRY_MAX_OBJ_NAME 32
264  /* now open_connex() routine which establishes a connection to server */
265
266enum debug_type {
267        DEBTYP_PROCESS = 0,
268        DEBTYP_C_ACTOR = 1,
269        DEBTYP_KERNEL = 2,
270        DEBTYP_OTHER = 3,
271};
272typedef enum debug_type debug_type;
273#define DEBUGGER_IS_GDB 0x2    /* */
274
275struct 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};
282typedef struct open_in open_in;
283
284struct 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};
292typedef struct open_out open_out;
293  /* now close_connex() routine which detaches from server */
294
295enum close_control {
296        CLOSE_IGNORE = 0,
297        CLOSE_KILL = 1,
298        CLOSE_DETACH = 2,
299};
300typedef enum close_control close_control;
301
302struct close_in {
303        close_control control;
304};
305typedef struct close_in close_in;
306  /* now send_signal() routine which sends signals to processes like kill(2) */
307
308struct signal_in {
309        int pid;
310        int sig;
311};
312typedef struct signal_in signal_in;
313
314struct signal_out {
315        int kill_return;
316        int errNo;
317};
318typedef 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
322enum 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};
335typedef enum stop_code stop_code;
336
337struct wait_in {
338        int pid;
339};
340typedef struct wait_in wait_in;
341
342struct 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};
353typedef 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
361struct ptrace_in {
362        int pid;
363        ptrace_addr_data_in addr;
364        u_int data;
365        u_int flags;
366};
367typedef struct ptrace_in ptrace_in;
368
369struct ptrace_out {
370        ptrace_addr_data_out addr;
371        int result;
372        int errNo;
373};
374typedef struct ptrace_out ptrace_out;
375
376struct one_symbol {
377        char *symbolName;
378        long symbolValue;
379};
380typedef struct one_symbol one_symbol;
381
382typedef struct {
383        u_int all_symbols_len;
384        one_symbol *all_symbols_val;
385} all_symbols;
386
387struct get_global_symbols_out {
388        all_symbols symbols;
389};
390typedef struct get_global_symbols_out get_global_symbols_out;
391
392struct get_text_data_in {
393        int pid;
394        char *actorName;
395};
396typedef struct get_text_data_in get_text_data_in;
397
398struct 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};
406typedef struct get_text_data_out get_text_data_out;
407
408struct one_signal {
409        u_int number;
410        char *name;
411};
412typedef struct one_signal one_signal;
413
414typedef struct {
415        u_int all_signals_len;
416        one_signal *all_signals_val;
417} all_signals;
418
419struct get_signal_names_out {
420        all_signals signals;
421};
422typedef 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
432extern  open_out * open_connex_2(open_in *, CLIENT *);
433extern  open_out * open_connex_2_svc(open_in *, struct svc_req *);
434#define SEND_SIGNAL 2
435extern  signal_out * send_signal_2(signal_in *, CLIENT *);
436extern  signal_out * send_signal_2_svc(signal_in *, struct svc_req *);
437#define CLOSE_CONNEX 10
438extern  void * close_connex_2(close_in *, CLIENT *);
439extern  void * close_connex_2_svc(close_in *, struct svc_req *);
440#define PTRACE 11
441extern  ptrace_out * ptrace_2(ptrace_in *, CLIENT *);
442extern  ptrace_out * ptrace_2_svc(ptrace_in *, struct svc_req *);
443#define WAIT_INFO 13
444extern  wait_out * wait_info_2(wait_in *, CLIENT *);
445extern  wait_out * wait_info_2_svc(wait_in *, struct svc_req *);
446#define GET_SIGNAL_NAMES 17
447extern  get_signal_names_out * get_signal_names_2(void *, CLIENT *);
448extern  get_signal_names_out * get_signal_names_2_svc(void *, struct svc_req *);
449extern int remotedeb_2_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
450
451#else /* K&R C */
452#define OPEN_CONNEX 1
453extern  open_out * open_connex_2();
454extern  open_out * open_connex_2_svc();
455#define SEND_SIGNAL 2
456extern  signal_out * send_signal_2();
457extern  signal_out * send_signal_2_svc();
458#define CLOSE_CONNEX 10
459extern  void * close_connex_2();
460extern  void * close_connex_2_svc();
461#define PTRACE 11
462extern  ptrace_out * ptrace_2();
463extern  ptrace_out * ptrace_2_svc();
464#define WAIT_INFO 13
465extern  wait_out * wait_info_2();
466extern  wait_out * wait_info_2_svc();
467#define GET_SIGNAL_NAMES 17
468extern  get_signal_names_out * get_signal_names_2();
469extern  get_signal_names_out * get_signal_names_2_svc();
470extern int remotedeb_2_freeresult ();
471#endif /* K&R C */
472
473/* the xdr functions */
474
475#if defined(__STDC__) || defined(__cplusplus)
476extern  bool_t xdr_rpc_type (XDR *, rpc_type*);
477extern  bool_t xdr_UDP_MSG (XDR *, UDP_MSG*);
478extern  bool_t xdr_ptracereq (XDR *, ptracereq*);
479extern  bool_t xdr_xdr_regs (XDR *, xdr_regs*);
480extern  bool_t xdr_xdr_mem (XDR *, xdr_mem*);
481extern  bool_t xdr_break_type (XDR *, break_type*);
482extern  bool_t xdr_xdr_break (XDR *, xdr_break*);
483extern  bool_t xdr_thread_name (XDR *, thread_name*);
484extern  bool_t xdr_KernThread (XDR *, KernThread*);
485extern  bool_t xdr_thread_list (XDR *, thread_list*);
486extern  bool_t xdr_ptrace_addr_data_in (XDR *, ptrace_addr_data_in*);
487extern  bool_t xdr_ptrace_addr_data_out (XDR *, ptrace_addr_data_out*);
488extern  bool_t xdr_CHAR_DATA (XDR *, CHAR_DATA*);
489extern  bool_t xdr_xry_inst (XDR *, xry_inst*);
490extern  bool_t xdr_instance (XDR *, instance*);
491extern  bool_t xdr_instance_union (XDR *, instance_union*);
492extern  bool_t xdr_one_arg (XDR *, one_arg*);
493extern  bool_t xdr_debug_type (XDR *, debug_type*);
494extern  bool_t xdr_open_in (XDR *, open_in*);
495extern  bool_t xdr_open_out (XDR *, open_out*);
496extern  bool_t xdr_close_control (XDR *, close_control*);
497extern  bool_t xdr_close_in (XDR *, close_in*);
498extern  bool_t xdr_signal_in (XDR *, signal_in*);
499extern  bool_t xdr_signal_out (XDR *, signal_out*);
500extern  bool_t xdr_stop_code (XDR *, stop_code*);
501extern  bool_t xdr_wait_in (XDR *, wait_in*);
502extern  bool_t xdr_wait_out (XDR *, wait_out*);
503extern  bool_t xdr_ptrace_in (XDR *, ptrace_in*);
504extern  bool_t xdr_ptrace_out (XDR *, ptrace_out*);
505extern  bool_t xdr_one_symbol (XDR *, one_symbol*);
506extern  bool_t xdr_all_symbols (XDR *, all_symbols*);
507extern  bool_t xdr_get_global_symbols_out (XDR *, get_global_symbols_out*);
508extern  bool_t xdr_get_text_data_in (XDR *, get_text_data_in*);
509extern  bool_t xdr_get_text_data_out (XDR *, get_text_data_out*);
510extern  bool_t xdr_one_signal (XDR *, one_signal*);
511extern  bool_t xdr_all_signals (XDR *, all_signals*);
512extern  bool_t xdr_get_signal_names_out (XDR *, get_signal_names_out*);
513
514#else /* K&R C */
515extern bool_t xdr_rpc_type ();
516extern bool_t xdr_UDP_MSG ();
517extern bool_t xdr_ptracereq ();
518extern bool_t xdr_xdr_regs ();
519extern bool_t xdr_xdr_mem ();
520extern bool_t xdr_break_type ();
521extern bool_t xdr_xdr_break ();
522extern bool_t xdr_thread_name ();
523extern bool_t xdr_KernThread ();
524extern bool_t xdr_thread_list ();
525extern bool_t xdr_ptrace_addr_data_in ();
526extern bool_t xdr_ptrace_addr_data_out ();
527extern bool_t xdr_CHAR_DATA ();
528extern bool_t xdr_xry_inst ();
529extern bool_t xdr_instance ();
530extern bool_t xdr_instance_union ();
531extern bool_t xdr_one_arg ();
532extern bool_t xdr_debug_type ();
533extern bool_t xdr_open_in ();
534extern bool_t xdr_open_out ();
535extern bool_t xdr_close_control ();
536extern bool_t xdr_close_in ();
537extern bool_t xdr_signal_in ();
538extern bool_t xdr_signal_out ();
539extern bool_t xdr_stop_code ();
540extern bool_t xdr_wait_in ();
541extern bool_t xdr_wait_out ();
542extern bool_t xdr_ptrace_in ();
543extern bool_t xdr_ptrace_out ();
544extern bool_t xdr_one_symbol ();
545extern bool_t xdr_all_symbols ();
546extern bool_t xdr_get_global_symbols_out ();
547extern bool_t xdr_get_text_data_in ();
548extern bool_t xdr_get_text_data_out ();
549extern bool_t xdr_one_signal ();
550extern bool_t xdr_all_signals ();
551extern 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 */
Note: See TracBrowser for help on using the repository browser.