summaryrefslogtreecommitdiff
path: root/src/ToolBox/SOS/lldbplugin
diff options
context:
space:
mode:
Diffstat (limited to 'src/ToolBox/SOS/lldbplugin')
-rw-r--r--src/ToolBox/SOS/lldbplugin/CMakeLists.txt7
-rw-r--r--src/ToolBox/SOS/lldbplugin/services.cpp2
2 files changed, 9 insertions, 0 deletions
diff --git a/src/ToolBox/SOS/lldbplugin/CMakeLists.txt b/src/ToolBox/SOS/lldbplugin/CMakeLists.txt
index 9f90a54056..7f1fa7704f 100644
--- a/src/ToolBox/SOS/lldbplugin/CMakeLists.txt
+++ b/src/ToolBox/SOS/lldbplugin/CMakeLists.txt
@@ -21,6 +21,10 @@ if(CLR_CMAKE_PLATFORM_ARCH_AMD64)
add_definitions(-DDBG_TARGET_AMD64=1)
add_definitions(-DDBG_TARGET_WIN64=1)
add_definitions(-DBIT64)
+elseif(CLR_CMAKE_PLATFORM_ARCH_I386)
+ add_definitions(-D_TARGET_X86_=1)
+ add_definitions(-DDBG_TARGET_32BIT=1)
+ add_definitions(-DDBG_TARGET_X86=1)
elseif(CLR_CMAKE_PLATFORM_ARCH_ARM)
add_definitions(-D_TARGET_ARM_=1)
add_definitions(-DDBG_TARGET_32BIT=1)
@@ -33,6 +37,9 @@ endif()
set(ENABLE_LLDBPLUGIN ${CLR_CMAKE_PLATFORM_UNIX} CACHE BOOL "Enable building the SOS plugin for LLDB.")
set(REQUIRE_LLDBPLUGIN ${CLR_CMAKE_PLATFORM_LINUX} CACHE BOOL "Require building the SOS plugin for LLDB.")
+if(SKIP_LLDBPLUGIN)
+ SET(REQUIRE_LLDBPLUGIN false)
+endif()
set(LLVM_HOST_DIR "$ENV{LLVM_HOME}")
set(WITH_LLDB_LIBS "${LLVM_HOST_DIR}/lib" CACHE PATH "Path to LLDB libraries")
set(WITH_LLDB_INCLUDES "${LLVM_HOST_DIR}/include" CACHE PATH "Path to LLDB headers")
diff --git a/src/ToolBox/SOS/lldbplugin/services.cpp b/src/ToolBox/SOS/lldbplugin/services.cpp
index f6b42139c4..d2d2cf9f8e 100644
--- a/src/ToolBox/SOS/lldbplugin/services.cpp
+++ b/src/ToolBox/SOS/lldbplugin/services.cpp
@@ -167,6 +167,8 @@ LLDBServices::VirtualUnwind(
#ifdef DBG_TARGET_AMD64
DWORD64 spToFind = dtcontext->Rsp;
+#elif DBG_TARGET_X86
+ DWORD spToFind = dtcontext->Esp;
#elif DBG_TARGET_ARM
DWORD spToFind = dtcontext->Sp;
#endif