[Lldb-commits] [lldb] r211026 - Move x86-specific struct user code for Linux ProcessMonitor behind #define guards.
Todd Fiala
todd.fiala at gmail.com
Mon Jun 16 07:49:29 PDT 2014
Author: tfiala
Date: Mon Jun 16 09:49:28 2014
New Revision: 211026
URL: http://llvm.org/viewvc/llvm-project?rev=211026&view=rev
Log:
Move x86-specific struct user code for Linux ProcessMonitor behind #define guards.
See http://reviews.llvm.org/D4092 for details.
Change by Paul Osmialowski. (Minor tweaks to the comment by Todd.)
Modified:
lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp
Modified: lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp?rev=211026&r1=211025&r2=211026&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp Mon Jun 16 09:49:28 2014
@@ -744,6 +744,9 @@ ReadThreadPointerOperation::Execute(Proc
const ArchSpec& arch = monitor->GetProcess().GetTarget().GetArchitecture();
switch(arch.GetMachine())
{
+#if defined(__i386__) || defined(__x86_64__)
+ // Note that struct user below has a field named i387 which is x86-specific.
+ // Therefore, this case should be compiled only for x86-based systems.
case llvm::Triple::x86:
{
// Find the GS register location for our host architecture.
@@ -770,6 +773,7 @@ ReadThreadPointerOperation::Execute(Proc
*m_addr = tmp[1];
break;
}
+#endif
case llvm::Triple::x86_64:
// Read the FS register base.
m_result = (PTRACE(PTRACE_ARCH_PRCTL, m_tid, m_addr, (void *)ARCH_GET_FS, 0) == 0);
More information about the lldb-commits
mailing list