<div dir="ltr">We need changes in every ABI plugin because same thing happens there also. However, I wanted to fix MacOSX i386 ABI Plugin first. Thats why I submitted fix for this Plugin as of now.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 5, 2015 at 6:00 PM, Ed Maste <span dir="ltr"><<a href="mailto:emaste@freebsd.org" target="_blank">emaste@freebsd.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 5 June 2015 at 10:42,  <<a href="mailto:abhishek.a.aggarwal@intel.com">abhishek.a.aggarwal@intel.com</a>> wrote:<br>
> From: Abhishek Aggarwal <<a href="mailto:abhishek.a.aggarwal@intel.com">abhishek.a.aggarwal@intel.com</a>><br>
><br>
>    - In ABIMacOSX_i386.cpp:<br>
>         -- Earlier, only Triple:Arch was used to choose ABI<br>
>         -- Now, Triple:OS is also used along with Triple:Arch<br>
><br>
>    - Resolves PR-23718<br>
><br>
> Change-Id: Id8b1d86dda763241f9e594a1c71252555939af1e<br>
> Signed-off-by: Abhishek Aggarwal <<a href="mailto:abhishek.a.aggarwal@intel.com">abhishek.a.aggarwal@intel.com</a>><br>
> ---<br>
>  source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp | 3 ++-<br>
>  1 file changed, 2 insertions(+), 1 deletion(-)<br>
><br>
> diff --git a/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp b/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp<br>
> index 0853fe2..7639e95 100644<br>
> --- a/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp<br>
> +++ b/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp<br>
> @@ -236,7 +236,8 @@ ABISP<br>
>  ABIMacOSX_i386::CreateInstance (const ArchSpec &arch)<br>
>  {<br>
>      static ABISP g_abi_sp;<br>
> -     if (arch.GetTriple().getArch() == llvm::Triple::x86)<br>
> +     if ((arch.GetTriple().getArch() == llvm::Triple::x86) &&<br>
> +          arch.GetTriple().isMacOSX())<br>
>       {<br>
>          if (!g_abi_sp)<br>
>              g_abi_sp.reset (new ABIMacOSX_i386);<br>
<br>
</span>I believe a fix like this is necessary, although I think we should<br>
also go through the other ABI plugins and make sure all of these are<br>
consistent/correct.<br>
<br>
For example, the arm64 ABI plugins use the vendor type instead of the OS:<br>
<br>
    const llvm::Triple::ArchType arch_type = arch.GetTriple().getArch();<br>
    const llvm::Triple::VendorType vendor_type = arch.GetTriple().getVendor();<br>
<br>
    if (vendor_type == llvm::Triple::Apple)<br>
    {<br>
            if (arch_type == llvm::Triple::aarch64)<br>
        {<br>
            if (!g_abi_sp)<br>
                g_abi_sp.reset (new ABIMacOSX_arm64);<br>
            return g_abi_sp;<br>
        }<br>
    }<br>
<br>
Perhaps isOSDarwin is actually what we want in all of these cases?<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
lldb-commits mailing list<br>
<a href="mailto:lldb-commits@cs.uiuc.edu">lldb-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits</a><br>
</div></div></blockquote></div><br></div>