Changeset 981b99f in rtems for c/src/librdbg/include


Ignore:
Timestamp:
08/10/99 16:41:44 (24 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
cef2fb5f
Parents:
908436c1
Message:

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),
Location:
c/src/librdbg/include/rdbg
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/librdbg/include/rdbg/i386/rdbg_f.h

    r908436c1 r981b99f  
    66 *
    77 * Synopsis = Machine-dependent header file
     8 *
     9 * $Id$
    810 *
    911 **************************************************************************
     
    1820#define EFLAGS_TF 0x00100
    1921
    20 typedef struct Exception_context_struct {
    21   struct Exception_context_struct *next;
    22   struct Exception_context_struct *previous;
    23   Objects_Id id;
    24   Objects_Id semaphoreId;
    25   CPU_Exception_frame *ctx;
    26 } Exception_context;
     22static inline int isRdbgException(Exception_context *ctx)
     23{
     24  if (
     25      ctx->ctx->idtIndex != I386_EXCEPTION_DEBUG &&
     26      ctx->ctx->idtIndex != I386_EXCEPTION_BREAKPOINT &&
     27      ctx->ctx->idtIndex != I386_EXCEPTION_ENTER_RDBG
     28      ) return 0;
     29  else return 1;
     30}
     31static inline int getExcNum(Exception_context *ctx)
     32{
     33  return ctx->ctx->idtIndex;
     34}
    2735
    28 extern int      PushExceptCtx           (Objects_Id Id,
    29                                          Objects_Id semId,
    30                                          CPU_Exception_frame *ctx);
    31 extern int      PopExceptCtx            (Objects_Id Id);
    32 extern Exception_context *GetExceptCtx  (Objects_Id Id);
    33 extern int      Single_Step             (CPU_Exception_frame* ctx);
    34 extern int      CheckForSingleStep      (CPU_Exception_frame* ctx);
    35 extern void     BreakPointExcHdl        (CPU_Exception_frame *ctx);
    36 extern void     CtxToRegs               (const CPU_Exception_frame*,xdr_regs*);
    37 extern void     RegsToCtx               (const xdr_regs*,CPU_Exception_frame*);
    38 
    39 extern void     enterRdbg               ();
    40 extern void     get_ctx_thread          (Thread_Control *thread,
    41                                          CPU_Exception_frame* ctx);
    42 extern void     set_ctx_thread          (Thread_Control *thread,
    43                                          CPU_Exception_frame* ctx);
    44 
    45 void copyback_data_cache_and_invalidate_instr_cache();
    46 
    47 extern int      ExitForSingleStep;
    48 
     36extern void connect_rdbg_exception();
    4937
    5038#endif
  • c/src/librdbg/include/rdbg/i386/reg.h

    r908436c1 r981b99f  
    1 
     1/*
     2 * Registers Offset in frame definition
     3 *
     4 * $Id$
     5 */
    26
    37#define NBREGS  19
  • c/src/librdbg/include/rdbg/rdbg.h

    r908436c1 r981b99f  
    55 *
    66 * Synopsis  =   rdbg.h
     7 *
     8 * $Id$
    79 *
    810 **************************************************************************
     
    1517#include <sys/socket.h>
    1618#include <netinet/in.h>
    17 #include <rdbg/rdbg_f.h>
    1819#include <stdlib.h>             /* For malloc() and free() prototypes */
    1920#include <bsp.h>               
     21#include <rtems.h>
    2022
    2123#define Malloc(size)            malloc (size)
     
    5052int       svcudp_enablecache    (SVCXPRT *transp, u_long size);
    5153
     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
    5294#endif /* !RDBG_H */
    5395
  • c/src/librdbg/include/rdbg/servrpc.h

    r908436c1 r981b99f  
     1/*
     2 * $Id$
     3 */
    14
    25#ifndef SERVRPC_H
     
    3033extern const char* BmsgNames[]; /* list of BMSG_xxx names */
    3134extern const char* PtraceName(int req);
     35
     36#ifdef i386                     /* low-high machine such as 386 */
     37#define HL_W(w)         (((UINT16)(w)>>8)+((((w)&0xFF)<<8)))
     38#define HL_D(d)         (((UINT32)(d)>>24)+(((d)&0x00FF0000)>>8) \
     39                       +(((d)&0xFF00)<<8)+(((d)&0xFF)<<24))
     40#else
     41#define HL_W(w)         w
     42#define HL_D(d)         d
     43#endif
    3244
    3345# define DPRINTF(a)     (rdb_debug ? printk ("%d >>> ", getId()), printk a : 0)
Note: See TracChangeset for help on using the changeset viewer.