summaryrefslogtreecommitdiff
path: root/src/ToolBox/SOS
diff options
context:
space:
mode:
authorMike McLaughlin <mikem@microsoft.com>2015-02-20 14:13:03 -0800
committerMike McLaughlin <mikem@microsoft.com>2015-02-20 14:13:03 -0800
commit67d2897c6e923bccc56956f63e9bda8576d1982f (patch)
tree38b05086c19ae0647692f450381a83632c9033ed /src/ToolBox/SOS
parent44d3087a4d91473a9b5ed0975eff5891ac3b9976 (diff)
downloadcoreclr-67d2897c6e923bccc56956f63e9bda8576d1982f.tar.gz
coreclr-67d2897c6e923bccc56956f63e9bda8576d1982f.tar.bz2
coreclr-67d2897c6e923bccc56956f63e9bda8576d1982f.zip
Review feedback. Fixed the sos plugin make file to use the LLDB_INCLUDE_DIR and LLDB_LIB_DIR environment variables if set. Otherwise, it assumes the lldb-3.5-dev package is installed.
Diffstat (limited to 'src/ToolBox/SOS')
-rw-r--r--src/ToolBox/SOS/Strike/strike.cpp1
-rw-r--r--src/ToolBox/SOS/Strike/util.cpp7
-rw-r--r--src/ToolBox/SOS/lldbplugin/CMakeLists.txt16
-rw-r--r--src/ToolBox/SOS/lldbplugin/soscommand.cpp3
4 files changed, 19 insertions, 8 deletions
diff --git a/src/ToolBox/SOS/Strike/strike.cpp b/src/ToolBox/SOS/Strike/strike.cpp
index 848031c722..98a902ee33 100644
--- a/src/ToolBox/SOS/Strike/strike.cpp
+++ b/src/ToolBox/SOS/Strike/strike.cpp
@@ -280,6 +280,7 @@ DECLARE_API(IP2MD)
return Status;
}
+ // TODO - mikem 2/20/14 - temporary until the rest of the DAC is working.
ExtOut("Test output for IP2MD %16x\n", IP);
return Status;
diff --git a/src/ToolBox/SOS/Strike/util.cpp b/src/ToolBox/SOS/Strike/util.cpp
index 146656fe9f..ea8d3324ec 100644
--- a/src/ToolBox/SOS/Strike/util.cpp
+++ b/src/ToolBox/SOS/Strike/util.cpp
@@ -4135,9 +4135,7 @@ void ResetGlobals(void)
// but should be reset because the next execution of an SOS command could be on
// another managed process. Reset them to a default state here, as this command
// is called on every SOS entry point.
-
- // BUGBUG mikem TEMP
- //g_sos->GetUsefulGlobals(&g_special_usefulGlobals);
+ g_sos->GetUsefulGlobals(&g_special_usefulGlobals);
#ifndef FEATURE_PAL
g_special_mtCache.Clear();
#endif
@@ -4167,7 +4165,8 @@ HRESULT LoadClrDebugDll(void)
}
if (g_clrData == NULL)
{
- HMODULE hdac = LoadLibraryA("/ssd/coreclr/binaries/Product/amd64/debug/" MAKEDLLNAME_A("mscordaccore"));
+ // Assumes that LD_LIBRARY_PATH (or DYLD_LIBRARY_PATH on OSx) is set to runtime binaries path
+ HMODULE hdac = LoadLibraryA(MAKEDLLNAME_A("mscordaccore"));
if (hdac == NULL)
{
return E_FAIL;
diff --git a/src/ToolBox/SOS/lldbplugin/CMakeLists.txt b/src/ToolBox/SOS/lldbplugin/CMakeLists.txt
index 4405c40ae1..98295ec4d8 100644
--- a/src/ToolBox/SOS/lldbplugin/CMakeLists.txt
+++ b/src/ToolBox/SOS/lldbplugin/CMakeLists.txt
@@ -2,9 +2,19 @@ project(sosplugin)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
-set(LLVM_DIR "/usr/lib/llvm-3.5")
-set(LLDB_INCLUDE_DIR "${LLVM_DIR}/include")
-set(LLDB_LIB_DIR "${LLVM_DIR}/lib")
+if((NOT $ENV{LLDB_INCLUDE_DIR} STREQUAL "") AND (NOT $ENV{LLDB_LIB_DIR} STREQUAL ""))
+ # The OSx build depends on the environment variables LLDB_INCLUDE_DIR and LLDB_LIB_DIR being set
+ set(LLDB_INCLUDE_DIR "$ENV{LLDB_INCLUDE_DIR}")
+ set(LLDB_LIB_DIR "$ENV{LLDB_LIB_DIR}")
+else()
+ # The Linux build depends on the lldb-3.5-dev package
+ set(LLVM_DIR "/usr/lib/llvm-3.5")
+ set(LLDB_INCLUDE_DIR "${LLVM_DIR}/include")
+ set(LLDB_LIB_DIR "${LLVM_DIR}/lib")
+endif()
+
+message(LLDB_INCLUDE_DIR=${LLDB_INCLUDE_DIR})
+message(LLDB_LIB_DIR=${LLDB_LIB_DIR})
add_compile_options(-Wno-delete-non-virtual-dtor)
diff --git a/src/ToolBox/SOS/lldbplugin/soscommand.cpp b/src/ToolBox/SOS/lldbplugin/soscommand.cpp
index 91e13a926c..d2f5ce58e1 100644
--- a/src/ToolBox/SOS/lldbplugin/soscommand.cpp
+++ b/src/ToolBox/SOS/lldbplugin/soscommand.cpp
@@ -30,7 +30,8 @@ public:
if (m_sosHandle == NULL)
{
- const char* sosLibrary = "/ssd/coreclr/binaries/Product/amd64/debug/" MAKEDLLNAME_A("sos");
+ // Assumes that LD_LIBRARY_PATH (or DYLD_LIBRARY_PATH on OSx) is set to runtime binaries path
+ const char* sosLibrary = MAKEDLLNAME_A("sos");
m_sosHandle = dlopen(sosLibrary, RTLD_LAZY);
if (m_sosHandle == NULL)
{