Cleanup commented code in symbolreader.cpp
authorIgor Kulaychuk <i.kulaychuk@samsung.com>
Sun, 16 Jul 2017 02:49:03 +0000 (05:49 +0300)
committerIgor Kulaychuk <i.kulaychuk@samsung.com>
Mon, 13 Nov 2017 19:22:40 +0000 (22:22 +0300)
src/debug/netcoredbg/symbolreader.cpp

index a47a98f..e5f46b3 100644 (file)
@@ -106,19 +106,10 @@ HRESULT SymbolReader::PrepareSymbolReader()
     WCHAR wszCoreClrPath[MAX_LONGPATH];
     MultiByteToWideChar(CP_UTF8, 0, coreClrPath.c_str(), coreClrPath.size() + 1, wszCoreClrPath, MAX_LONGPATH);
 
-    std::string clrDir = coreClrPath.substr(0, coreClrPath.rfind('/'));
+    std::string clrDir = coreClrPath.substr(0, coreClrPath.rfind(DIRECTORY_SEPARATOR_STR_A));
 
     HRESULT Status;
 
-    //coreClrPath = g_ExtServices->GetCoreClrDirectory();
-    // if (!GetAbsolutePath(coreClrPath, absolutePath))
-    // {
-    //     //ExtErr("Error: Failed to get coreclr absolute path\n");
-    //     return E_FAIL;
-    // }
-    // coreClrPath.append(DIRECTORY_SEPARATOR_STR_A);
-    // coreClrPath.append(MAIN_CLR_DLL_NAME_A);
-
     HMODULE coreclrLib = LoadLibraryW(wszCoreClrPath);
     if (coreclrLib == nullptr)
     {
@@ -153,7 +144,7 @@ HRESULT SymbolReader::PrepareSymbolReader()
         return E_FAIL;
     }
 
-    std::size_t dirSepIndex = exe.rfind('/');
+    std::size_t dirSepIndex = exe.rfind(DIRECTORY_SEPARATOR_STR_A);
     if (dirSepIndex == std::string::npos)
         return E_FAIL;
 
@@ -170,13 +161,6 @@ HRESULT SymbolReader::PrepareSymbolReader()
                                     // AppDomainCompatSwitch
                                     "UseLatestBehaviorWhenTFMNotSpecified"};
 
-    // std::string entryPointExecutablePath;
-    // if (!GetEntrypointExecutableAbsolutePath(entryPointExecutablePath))
-    // {
-    //     //ExtErr("Could not get full path to current executable");
-    //     return E_FAIL;
-    // }
-
     Status = initializeCoreCLR(exe.c_str(), "debugger",
         sizeof(propertyKeys) / sizeof(propertyKeys[0]), propertyKeys, propertyValues, &hostHandle, &domainId);