Team Fortress 2 Source Code as on 22/4/2020
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.

62 lines
2.3 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //////////////////////////////////////////////////////////////////////////////////////
  3. //
  4. // Written by Zoltan Csizmadia, [email protected]
  5. // For companies(Austin,TX): If you would like to get my resume, send an email.
  6. //
  7. // The source is free, but if you want to use it, mention my name and e-mail address
  8. //
  9. // History:
  10. // 1.0 Initial version Zoltan Csizmadia
  11. //
  12. //////////////////////////////////////////////////////////////////////////////////////
  13. //
  14. // ExtendedTrace.h
  15. //
  16. #ifndef EXTENDEDTRACE_H_INCLUDED
  17. #define EXTENDEDTRACE_H_INCLUDED
  18. #if defined(_DEBUG) && defined(WIN32)
  19. #pragma comment( lib, "imagehlp.lib" )
  20. #if defined(_AFX) || defined(_AFXDLL)
  21. #define TRACEF TRACE
  22. #else
  23. #define TRACEF OutputDebugStringFormat
  24. void OutputDebugStringFormat( PRINTF_FORMAT_STRING LPCTSTR, ... );
  25. #endif
  26. #define EXTENDEDTRACEINITIALIZE( IniSymbolPath ) InitSymInfo( IniSymbolPath )
  27. #define EXTENDEDTRACEUNINITIALIZE() UninitSymInfo()
  28. #define SRCLINKTRACECUSTOM( Msg, File, Line) SrcLinkTrace( Msg, File, Line )
  29. #define SRCLINKTRACE( Msg ) SrcLinkTrace( Msg, __FILE__, __LINE__ )
  30. #define FNPARAMTRACE() FunctionParameterInfo()
  31. #define STACKTRACEMSG( Msg ) StackTrace( Msg )
  32. #define STACKTRACE() StackTrace( GetCurrentThread(), _T("") )
  33. #define THREADSTACKTRACEMSG( hThread, Msg ) StackTrace( hThread, Msg )
  34. #define THREADSTACKTRACE( hThread ) StackTrace( hThread, _T("") )
  35. BOOL InitSymInfo( PCSTR );
  36. BOOL UninitSymInfo();
  37. void SrcLinkTrace( LPCTSTR, LPCTSTR, ULONG );
  38. void StackTrace( HANDLE, LPCTSTR );
  39. void FunctionParameterInfo();
  40. #else
  41. #define EXTENDEDTRACEINITIALIZE( IniSymbolPath ) ((void)0)
  42. #define EXTENDEDTRACEUNINITIALIZE() ((void)0)
  43. #define TRACEF ((void)0)
  44. #define SRCLINKTRACECUSTOM( Msg, File, Line) ((void)0)
  45. #define SRCLINKTRACE( Msg ) ((void)0)
  46. #define FNPARAMTRACE() ((void)0)
  47. #define STACKTRACEMSG( Msg ) ((void)0)
  48. #define STACKTRACE() ((void)0)
  49. #define THREADSTACKTRACEMSG( hThread, Msg ) ((void)0)
  50. #define THREADSTACKTRACE( hThread ) ((void)0)
  51. #endif
  52. #endif