[Lldb-commits] [PATCH] lldb: To allow cross-compilation of Linux/ProcessMonitor.cpp, hide PC-related stuff behind #ifdef's
Paul Osmialowski
pawelo at king.net.pl
Tue Jun 10 12:51:08 PDT 2014
To allow cross-compilation of Linux/ProcessMonitor.cpp, hide PC-related stuff behind #ifdef's. Note that struct user used in affected code has a field named i387 which is x86-specific, therefore it should be compiled only for PC.
http://reviews.llvm.org/D4092
Files:
source/Plugins/Process/Linux/ProcessMonitor.cpp
Index: source/Plugins/Process/Linux/ProcessMonitor.cpp
===================================================================
--- source/Plugins/Process/Linux/ProcessMonitor.cpp
+++ source/Plugins/Process/Linux/ProcessMonitor.cpp
@@ -764,6 +764,9 @@
const ArchSpec& arch = monitor->GetProcess().GetTarget().GetArchitecture();
switch(arch.GetMachine())
{
+#if defined(__i386__) || defined(__x86_64__)
+ // note that struct user used below has field named i387 which is x86-specific
+ // therefore case below should be compiled only for PC
case llvm::Triple::x86:
{
// Find the GS register location for our host architecture.
@@ -790,6 +793,7 @@
*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);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4092.10296.patch
Type: text/x-patch
Size: 903 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20140610/6a6af613/attachment.bin>
More information about the lldb-commits
mailing list