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

  1. /*
  2. **  Sherlock - Copyright 1992, 1993, 1994
  3. **    Harfmann Software
  4. **    Compuserve: 73147,213
  5. **    All rights reserved
  6. */
  7. /*
  8. ** Define the structures used.
  9. */
  10. struct _debugInfo {
  11.     PID         pid;
  12.     ULONG       type;
  13.     ULONG       session;
  14. };
  15.  
  16. /*
  17. ** Define the globals used by the debugger.
  18. */
  19. int            FlipScreen;     /* Whether to flip the screen   */
  20. struct _debugInfo   debugInfo;        /* Global debugger buffer        */
  21. DebugBuffer        debugBuffer;    /* Buffer for executions        */
  22. FILE           *logFile;        /* Log file for output        */
  23.  
  24. /*
  25. ** Define the functions used by the debugger.
  26. */
  27. void StartProgram(int argc,                 /* Argument count           */
  28.                   char *argv[],             /* Argument values          */
  29.                   int iarg);                /* Index to program name    */
  30.  
  31. /*
  32. ** Dispatch a command.
  33. */
  34. int _System DispatchCommand(int command);
  35.  
  36. /*
  37. ** General purpose dump routines.
  38. */
  39. #define TOADDR_CODE  1
  40. #define TOADDR_DATA  2
  41. #define TOADDR_STACK 3
  42. ULONG StrToAddr(char *str, int type);
  43. ULONG Linearize(ULONG offset, USHORT segment);
  44. void hexdump(unsigned char *data, int count, char *buff);
  45. void DumpStack(int threadID);
  46.  
  47. #define MAX_FUNCNAME    256
  48.