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.

66 lines
1.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. #include <dbghelp.h>
  3. #include <dbgeng.h>
  4. #include "mdmpRipper.h"
  5. #include "vgui_controls/MessageMap.h"
  6. #include "vgui_controls/MenuBar.h"
  7. #include "vgui_controls/Menu.h"
  8. #include "tier1/KeyValues.h"
  9. #include "vgui/ISurface.h"
  10. #include "vgui_controls/Frame.h"
  11. #include "CMiniDumpObject.h"
  12. #include "CDbgOutput.h"
  13. #ifndef MDMODULEPANEL_H
  14. #define MDMODULEPANEL_H
  15. #ifdef _WIN32
  16. #pragma once
  17. #endif
  18. using namespace vgui;
  19. class CMDModulePanel : public vgui::EditablePanel
  20. {
  21. DECLARE_CLASS_SIMPLE( CMDModulePanel, vgui::EditablePanel );
  22. public:
  23. CMDModulePanel( vgui::Panel *pParent, const char *pName );
  24. ~CMDModulePanel( );
  25. virtual void OnCommand( const char *pCommand );
  26. virtual void Close();
  27. void OnKeyCodeTyped( KeyCode code );
  28. virtual void Create( const char *filename );
  29. virtual void Create( CUtlVector<CMiniDumpObject *> *ptr );
  30. void UpdateKnownDB( char *type );
  31. void ModuleLookUp();
  32. static DWORD WINAPI StaticAnalyzeThread( LPVOID lParam );
  33. private:
  34. MESSAGE_FUNC_PARAMS( OnCompare, "compare", data );
  35. MESSAGE_FUNC_INT_CHARPTR( OnDbgOutput, "DebugOutput", iMask, pszDebugText );
  36. void LoadKnownModules();
  37. void InitializeDebugEngine( void );
  38. void ReleaseDebugEngine( void );
  39. void AnalyzeDumpFile( const char *pszDumpFile );
  40. DWORD AnalyzeThread( void );
  41. vgui::ListPanel *m_pTokenList;
  42. vgui::RichText *m_pAnalyzeText;
  43. CUtlVector<CMiniDumpObject *> m_MiniDumpList;
  44. CUtlVector<module> m_knownModuleList;
  45. HANDLE m_hThread;
  46. IDebugClient *m_pDbgClient;
  47. IDebugControl *m_pDbgControl;
  48. IDebugSymbols2 *m_pDbgSymbols;
  49. CDbgOutput m_cDbgOutput;
  50. };
  51. #endif // MDMODULEPANEL_H