[Lldb-commits] [PATCH] lldb: To allow cross-compilation of Linux/ProcessMonitor.cpp, hide PC-related stuff behind #ifdef's
Paul Osmialowski
newchief at king.net.pl
Wed Jun 11 13:11:05 PDT 2014
Hi Todd,
I'm cross-compiling on desktop Linux (x86_64) for Linaro Linux
(FoundationV8 AArch64 simulator) using Linaro's toolchain and its sysroot.
On Tue, 10 Jun 2014, Todd Fiala wrote:
> Hey Paul,
> Am I understanding you correctly that you are trying to cross compile this for Linux on a non-Linux box?
>
> -Todd
>
>
> On Tue, Jun 10, 2014 at 12:51 PM, Paul Osmialowski <pawelo at king.net.pl> wrote:
> 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);
>
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
>
>
>
>
> --
> Todd Fiala |
> Software Engineer |
> tfiala at google.com |
> 650-943-3180
>
>
More information about the lldb-commits
mailing list