dbgLib.h
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:5k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* dbgLib.h - header file for dbgLib.c */
  2. /* Copyright 1984-1998 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 02b,15aug97,cym  added SIMNT support.
  7. 02c,30apr98,dbt  removed unused DBG_TT.
  8. 02b,12jan98,dbt  modified for new debugger scheme.
  9. 02b,28nov96,cdp  added ARM support.
  10. 02a,26may94,yao  added PPC support.
  11. 01t,19mar95,dvs  removed #ifdef TRON - tron no longer supported.
  12. 01s,15dec93,hdn  added support for I80X86.
  13. 01r,02dec93,pad  Added Am29k family support.
  14. 01q,11aug93,gae  vxsim hppa.
  15. 01p,20jun93,gae  vxsim.
  16. 01r,22feb94,smb  changed typedef EVENT_TYPE to event_t (SPR #3064)
  17. 01q,14jan94,c_s  changed protoype of e ().
  18. 01p,10dec93,smb  added instrumentation for eventpoints
  19. 01o,13nov92,dnw  removed DBG_INFO typedef to taskLib.h (SPR #1768)
  20. 01n,22sep92,rrr  added support for c++
  21. 01m,25aug92,yao  added function prototypes for dbgBreakNotifyInstall(),
  22.  dbgStepQuiet(), bdTask().
  23. 01l,29jul92,wmd  place #pragma aligns around DBG_INFO for the i960.
  24. 01k,10jul92,yao  renamed DBG_STATE to DBG_INFO.  removed dbgMode, pDbgSave,
  25.  BOOLS resumeTask, sstepTask, sstepQuite, pInterruptBreak.
  26.  added dbgState to DBG_INFO.  added DBG_TASK_RESUME,
  27.  DBG_TASK_S_STEP, DBG_TASK_QUIET.  added dbgBrkExists ().
  28.  added BRK_SINGLE_STEP.  renamed BRK_SO to BRK_STEP_OVER.
  29. 01j,06jul92,yao  removed dbgLockCnt in DBG_STATE.
  30. 01i,04jul92,jcf  cleaned up.
  31. 01h,12mar92,yao  moved TRON related stuff to dbgTRONLib.h. added macros
  32.  LST_FIRST, LST_NEXT, INST_CMP.  added data structure HWBP,
  33.  BRKENTRY, DBG_STATE.  added ANSI prototype for architecture
  34.  interface routines.
  35. 01j,26may92,rrr  the tree shuffle
  36. 01i,23apr92,wmd  moved include of dbg960Lib.h after defines of structures.
  37. 01g,09jan92,jwt  converted CPU==SPARC to CPU_FAMILY==SPARC.
  38. 01f,16dec91,hdn  changed a type of bp->code, from INSTR to int, for G100.
  39. 01e,04oct91,rrr  passed through the ansification filter
  40.   -fixed #else and #endif
  41.   -changed VOID to void
  42.   -changed ASMLANGUAGE to _ASMLANGUAGE
  43.   -changed copyright notice
  44. 01d,11sep91,hdn  added things for redesigned dbgLib.c for TRON.
  45. 01c,10jun91,del  added pragma for gnu960 alignment.
  46. 01b,24mar91,del  added things for redesigned dbgLib.c only available on
  47.  i960ca.
  48. 01a,05oct90,shl created.
  49. */
  50. #ifndef __INCdbgLibh
  51. #define __INCdbgLibh
  52. #ifdef __cplusplus
  53. extern "C" {
  54. #endif
  55. #include "regs.h"
  56. #include "esf.h"
  57. #if  CPU_FAMILY == SIMNT
  58. #include "arch/simnt/dbgSimntLib.h"
  59. #endif  /* CPU_FAMILY == SIMNT*/
  60. #ifndef _ASMLANGUAGE
  61. #include "lstLib.h"
  62. #include "private/eventP.h"
  63. #include "wdb/wdbDbgLib.h"
  64. /* Macro's are used by routines executing at interrupt level (task switch),
  65.  * so that fatal breakpoints are avoided.
  66.  */
  67. #define INST_CMP(addr,inst,mask)  ((*(addr) & (mask)) == (inst))
  68. #define ALL 0 /* breakpoint applies to all tasks */
  69. #define LAST 0 /* continue applies to task that last broke */
  70. #define MAX_ARGS 8 /* max args to task level call */
  71. #ifndef DBG_CRET
  72. #define DBG_CRET TRUE /* default to support cret */
  73. #endif /* DBG_CRET */
  74. #ifndef DBG_INST_ALIGN
  75. #define DBG_INST_ALIGN 4 /* default to long word alignment */
  76. #endif
  77. /* function declarations */
  78. #if defined(__STDC__) || defined(__cplusplus)
  79. extern STATUS  c (int taskNameOrId, INSTR * addr, INSTR * addr1);
  80. extern STATUS  s (int taskNameOrId, INSTR * addr, INSTR * addr1);
  81. extern void  dbgHelp (void);
  82. extern STATUS  dbgInit (void);
  83. extern STATUS  b (INSTR * addr, int taskNameOrId, int count, BOOL quiet);
  84. extern STATUS  e (INSTR * addr, event_t eventId, int taskNameOrId,
  85. FUNCPTR evtRtn, int arg);
  86. #if DBG_HARDWARE_BP
  87. extern STATUS bh (INSTR * addr, int access, int task, int count, BOOL quiet);
  88. #endif /* DBG_HARDWARE_BP */
  89. extern STATUS  bd (INSTR * addr, int taskNameOrId);
  90. extern STATUS  bdall (int taskNameOrId);
  91. extern STATUS  cret (int taskNameOrId);
  92. extern STATUS  so (int taskNameOrId);
  93. extern void  l (INSTR * addr, int count);
  94. extern STATUS  tt (int taskNameOrId);
  95. extern void  dbgPrintCall (INSTR * callAdrs, int funcAdrs, int nargs,
  96.       UINT32 * pArgs);
  97. extern BOOL dbgBrkExists (INSTR * addr, int task);
  98. extern void dbgBreakNotifyInstall (FUNCPTR breakpointRtn);
  99. extern STATUS dbgStepQuiet (int task);
  100. extern STATUS bdTask (int task);
  101. #else
  102. extern void  dbgHelp ();
  103. extern STATUS  dbgInit ();
  104. extern STATUS  b ();
  105. extern STATUS  e ();
  106. #if DBG_HARDWARE_BP
  107. extern STATUS  bh ();
  108. #endif /* DBG_HARDWARE_BP */
  109. extern STATUS  bd ();
  110. extern STATUS  bdall ();
  111. extern STATUS  c ();
  112. extern STATUS  cret ();
  113. extern STATUS  s ();
  114. extern STATUS  so ();
  115. extern void  l ();
  116. extern STATUS  tt ();
  117. extern void  dbgPrintCall ();
  118. extern BOOL dbgBrkExists ();
  119. extern void dbgBreakNotifyInstall ();
  120. extern STATUS dbgStepQuiet ();
  121. extern STATUS bdTask ();
  122. #endif /* __STDC__ */
  123. #endif /* _ASMLANGUAGE */
  124. #ifdef __cplusplus
  125. }
  126. #endif
  127. #endif /* __INCdbgLibh */