Move JMC related methods into Modules class
authorIgor Kulaychuk <i.kulaychuk@samsung.com>
Mon, 22 Jan 2018 06:31:20 +0000 (09:31 +0300)
committerIgor Kulaychuk <i.kulaychuk@samsung.com>
Mon, 22 Jan 2018 06:31:20 +0000 (09:31 +0300)
src/debug/netcoredbg/jmc.cpp
src/debug/netcoredbg/modules.cpp
src/debug/netcoredbg/modules.h

index f370d9a053787ae8564d3fd7c8168b49985e4743..31ea73639826e59eb21a30c33bd8d0a3823d7637 100644 (file)
@@ -13,6 +13,7 @@
 #include "typeprinter.h"
 #include "platform.h"
 #include "symbolreader.h"
+#include "modules.h"
 
 static const char *g_nonUserCode = "System.Diagnostics.DebuggerNonUserCodeAttribute..ctor";
 static const char *g_stepThrough = "System.Diagnostics.DebuggerStepThroughAttribute..ctor";
@@ -70,7 +71,7 @@ static const std::unordered_set<std::string> g_operatorMethodNames
     "op_DivisionAssignment"            // /=
 };
 
-bool ShouldLoadSymbolsForModule(const std::string &moduleName)
+bool Modules::ShouldLoadSymbolsForModule(const std::string &moduleName)
 {
     std::string name = GetFileName(moduleName);
     if (name.find("System.") == 0 || name.find("SOS.") == 0)
@@ -212,7 +213,7 @@ static HRESULT GetNonJMCClassesAndMethods(ICorDebugModule *pModule, SymbolReader
     return S_OK;
 }
 
-HRESULT SetJMCFromAttributes(ICorDebugModule *pModule, SymbolReader *symbolReader)
+HRESULT Modules::SetJMCFromAttributes(ICorDebugModule *pModule, SymbolReader *symbolReader)
 {
     std::vector<mdToken> excludeTokens;
 
index 7419cdafe098281251e2a8e0c90d3220077c199c..6afe6dfb798ab962a5b055b002f191fb201f9170 100644 (file)
@@ -16,9 +16,6 @@
 #include "platform.h"
 #include "modules.h"
 
-// JMC
-bool ShouldLoadSymbolsForModule(const std::string &moduleName);
-HRESULT SetJMCFromAttributes(ICorDebugModule *pModule, SymbolReader *symbolReader);
 
 void Modules::CleanupAllModules()
 {
index ac35bee5f1726113867dc25b64e2c3bb28290a08..b8e1188afa58105ec6e78ba15ff77cee7fdb4423 100644 (file)
@@ -27,6 +27,9 @@ class Modules
 
     std::string GetModuleFileName(ICorDebugModule *pModule);
 
+    static bool ShouldLoadSymbolsForModule(const std::string &moduleName);
+    static HRESULT SetJMCFromAttributes(ICorDebugModule *pModule, SymbolReader *symbolReader);
+
 public:
 
     struct SequencePoint {