Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
2.1 KiB

  1. /*==========================================================================
  2. *
  3. * Copyright (C) 2001 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: CallStack.h
  6. * Content: Call stack tracking class
  7. *
  8. * History:
  9. * Date By Reason
  10. * ==== == ======
  11. * 08/13/2001 masonb Created
  12. *
  13. ***************************************************************************/
  14. #ifndef __CALLSTACK_H__
  15. #define __CALLSTACK_H__
  16. #ifdef DBG
  17. //**********************************************************************
  18. // Constant definitions
  19. //**********************************************************************
  20. //
  21. // Size of temp buffer to build strings into.
  22. // If the call stack depth is increased, increase the size of the buffer
  23. // to prevent stack corruption with long symbol names.
  24. //
  25. #define CALLSTACK_BUFFER_SIZE 8192
  26. #define CALLSTACK_DEPTH 12
  27. //**********************************************************************
  28. // Macro definitions
  29. //**********************************************************************
  30. //**********************************************************************
  31. // Structure definitions
  32. //**********************************************************************
  33. //**********************************************************************
  34. // Variable definitions
  35. //**********************************************************************
  36. //**********************************************************************
  37. // Function prototypes
  38. //**********************************************************************
  39. //**********************************************************************
  40. // Class prototypes
  41. //**********************************************************************
  42. class CCallStack
  43. {
  44. public:
  45. CCallStack(){}
  46. ~CCallStack(){}
  47. void NoteCurrentCallStack( void );
  48. void GetCallStackString( TCHAR *const pOutputString ) const;
  49. private:
  50. const void* m_CallStack[CALLSTACK_DEPTH];
  51. const void *GetStackTop( void ) const;
  52. const void *GetStackBottom( void ) const;
  53. };
  54. #endif // DBG
  55. #endif // __CALLSTACK_H__