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

4.104.114.84.95
Last change on this file since 4f021c0 was 981b99f, checked in by Joel Sherrill <joel.sherrill@…>, on 08/10/99 at 16:41:44

Patch from Eric Valette <valette@…> and Emmanuel Raguet
<raguet@…>:

  • the dec21140 driver code has been hardened (various bug fixed) Emmanuel,
  • bug in the mcp750 init code have been fixed (interrupt stack/initial stack initialization), BSS correctly cleared (Eric V)
  • remote debugging over TCP/IP is nearly complete (berakpoints, backtrace, variables,...) (Eric V),
  • exception handling code has also been improved in order to fully support RDBG requirements (Eric V),
  • 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 int      ExitForSingleStep;
85
86extern rtems_id serializeSemId;
87extern rtems_id wakeupEventSemId;
88extern volatile unsigned int NbSerializedCtx;
89
90void copyback_data_cache_and_invalidate_instr_cache(unsigned char* addr, int size);
91
92#include <rdbg/rdbg_f.h>
93
94#endif /* !RDBG_H */
95
Note: See TracBrowser for help on using the repository browser.