source: rtems/c/src/librdbg/include/rdbg/rdbg.h @ d91087e

4.104.114.84.95
Last change on this file since d91087e was d91087e, checked in by Joel Sherrill <joel.sherrill@…>, on 09/21/01 at 17:51:44

2001-09-14 Eric Norum <eric.norum@…>

  • include/rdbg/rdbg.h, src/ptrace.c: Modifications to make gcc 3.x happy.
  • Property mode set to 100644
File size: 2.8 KB
Line 
1/*
2 **************************************************************************
3 *
4 * Component =   RDBG
5 *
6 * Synopsis  =   rdbg.h
7 *
8 * $Id$
9 *
10 **************************************************************************
11 */
12
13#ifndef RDBG_H
14#define RDBG_H
15
16#include <rpc/rpc.h>
17#include <sys/socket.h>
18#include <netinet/in.h>
19#include <stdlib.h>             /* For malloc() and free() prototypes */
20#include <bsp.h>               
21#include <rtems.h>
22
23#define Malloc(size)            malloc (size)
24#define Free(block)             free (block)
25#define Realloc(block,size)     realloc (block, size)
26#define StrDup(str)             strdup(str)
27
28#define LIST_PID        16      /* dynamic list of processes/tasks */
29#define LIST_PID_DEB    17      /* list of processes under debug now */
30#define LIST_PID_THREAD 18      /* list of threads for specific process */
31#define LIST_CONN       19      /* dynamic list of connections */
32
33    /* RTEMS internals */
34extern void     remotedeb_2     (struct svc_req* rqstp, SVCXPRT* transp);
35extern void     setErrno        (int error);
36extern int      getErrno        ();
37extern int      ptrace          (int request, int pid, char* addr,
38                                 int data, char* addr2);
39
40extern int                      TSP_RETRIES;
41extern volatile int             ExitForSingleStep;
42extern volatile int             justSaveContext;
43extern volatile Objects_Id      currentTargetThread;
44extern volatile int             CannotRestart;
45extern volatile int             TotalReboot;
46
47    /* Missing RPC prototypes */
48SVCXPRT*  svcudp_create         (int fd);
49void      svc_processrequest    (SVCXPRT* xprt,
50                                 u_long prog, u_long vers,
51                                 void (*dispatch)());
52int       svcudp_enablecache    (SVCXPRT *transp, u_long size);
53
54typedef struct Exception_context_struct {
55  struct Exception_context_struct *next;
56  struct Exception_context_struct *previous;
57  Objects_Id id;
58  Objects_Id semaphoreId;
59  CPU_Exception_frame *ctx;
60} Exception_context;
61
62struct          xdr_regs;
63
64extern int      PushExceptCtx           (Objects_Id Id,
65                                         Objects_Id semId,
66                                         CPU_Exception_frame *ctx);
67extern int      PopExceptCtx            (Objects_Id Id);
68extern Exception_context *GetExceptCtx  (Objects_Id Id);
69extern int      Single_Step             (CPU_Exception_frame* ctx);
70extern int      CheckForSingleStep      (CPU_Exception_frame* ctx);
71extern void     BreakPointExcHdl        (CPU_Exception_frame *ctx);
72extern void     CtxToRegs               (const CPU_Exception_frame*,struct xdr_regs*);
73extern void     RegsToCtx               (const struct xdr_regs*,CPU_Exception_frame*);
74
75extern void     enterRdbg               ();
76extern void     get_ctx_thread          (Thread_Control *thread,
77                                         CPU_Exception_frame* ctx);
78extern void     set_ctx_thread          (Thread_Control *thread,
79                                         CPU_Exception_frame* ctx);
80extern int      PushSavedExceptCtx      ( Objects_Id Id,
81                                          CPU_Exception_frame *ctx );
82extern int      ExcepToSig              (Exception_context *ctx);
83
84extern rtems_id serializeSemId;
85extern rtems_id wakeupEventSemId;
86extern volatile unsigned int NbSerializedCtx;
87
88void copyback_data_cache_and_invalidate_instr_cache(unsigned char* addr, int size);
89
90#include <rdbg/rdbg_f.h>
91
92#endif /* !RDBG_H */
93
Note: See TracBrowser for help on using the repository browser.