home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / sherlock.zip / CV32 / CV32.H < prev    next >
C/C++ Source or Header  |  1994-06-29  |  2KB  |  86 lines

  1. /*
  2. **  Sherlock - Copyright 1992, 1993, 1994
  3. **    Harfmann Software
  4. **    Compuserve: 73147,213
  5. **    All rights reserved
  6. */
  7. /*
  8. ** Code view interface functions to extract symbolic information
  9. ** given a state to extract information from.
  10. */
  11. #pragma pack(1)
  12. typedef struct _CVObject {
  13.     struct _CVObject   *next;
  14.     ULONG               base;
  15.     ULONG               length;
  16. } CVObject;
  17.  
  18. typedef struct {
  19.     USHORT  segment;
  20.     USHORT  count;
  21.     char    *fileName;
  22.     LineOffsetEntry32 *lineData;
  23. } CVLineData;
  24.  
  25. typedef struct _CVPublic32 {
  26.     struct _CVPublic32 *next;
  27.     PublicsDataEntry32  data;
  28. } CVPublic32;
  29.  
  30. typedef struct _CVModule {
  31.     struct _CVModule   *next;
  32.     ModulesDataEntry32 *module;
  33.     CVPublic32         *public;
  34.     char               *type;
  35.     char               *symbols;
  36.     USHORT              typeSize;
  37.     USHORT              symbolSize;
  38.     CVLineData         *lineData;
  39.     CVLineData         *lineSegData;
  40. } CVModule;
  41.  
  42. typedef struct {
  43.     char        tag[4];
  44.     ULONG       dirOffset;
  45.     char       *compactedData;
  46.     USHORT      compactedSize;
  47.     char      **libraries;
  48.     CVModule   *moduleData;
  49. } CVAuxData;
  50.  
  51. typedef struct {
  52.     CVModule   *module;
  53.     USHORT    typeIndex;
  54.     SHORT    registerNum;
  55. } CVTypeData;
  56. #pragma pack()
  57.  
  58. UCHAR *FindType(CVTypeData *cvType, USHORT targetIndex);
  59. int CVGetBaseTypeSize(USHORT targetIndex);
  60. int elementSize(State *state);
  61. USHORT GetType(UCHAR *types);
  62. int CVGetValue(DebugModule *module, State *state);
  63. int CVGetRegisterValue(DebugModule *module, State *state);
  64. int CVGetNumber(UCHAR *types, ULONG *num);
  65.  
  66. int _System CVFindSource(DebugModule *module, ULONG eipOffset,
  67.             char *funcName, char *sourceName, ULONG *lineNum);
  68. ULONG _System CVFindSourceLine(DebugModule *module, int line, char *fileName);
  69. ULONG _System CVFindFuncAddr(DebugModule *module, char *funcName);
  70. int _System CVGetName(DebugModule *module, State *state, State *state2);
  71. int _System CVGetArray(DebugModule *module, State *state, State *state2);
  72. int _System CVGetNumMembers(DebugModule *module, State *state);
  73. int _System CVGetMemberIndex(DebugModule *module,
  74.     State *state, int memberIndex, char *name);
  75. int _System CVGetMember(DebugModule *module, State *state, State *state2);
  76.  
  77. /*
  78. ** Manifest constants.
  79. */
  80. #define BYTE_INDEX_IN_LVAL 0x100
  81.  
  82. /*
  83. ** Global variables.
  84. */
  85. DebugBuffer *debugBuffer;
  86.