[Lldb-commits] [lldb] r321856 - [ArchSpec] Don't consider Unknown MachO64 as invalid.

Davide Italiano via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 4 18:54:09 PST 2018


@Pavel, is there an easy way of testing this? m_core is a protected
member of ArchSpec so we can't set it willy-nilly, but still I'd like
to have some regression testing for the change. I'll take a look early
tomorrow, but throwing this here in case you have ideas.

Thanks!

--
Davide

On Thu, Jan 4, 2018 at 6:50 PM, Davide Italiano via lldb-commits
<lldb-commits at lists.llvm.org> wrote:
> Author: davide
> Date: Thu Jan  4 18:50:24 2018
> New Revision: 321856
>
> URL: http://llvm.org/viewvc/llvm-project?rev=321856&view=rev
> Log:
> [ArchSpec] Don't consider Unknown MachO64 as invalid.
>
> Even without a proper arch we can access line tables, etc..
>
> <rdar://problem/35778442>
>
> Modified:
>     lldb/trunk/source/Utility/ArchSpec.cpp
>
> Modified: lldb/trunk/source/Utility/ArchSpec.cpp
> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/ArchSpec.cpp?rev=321856&r1=321855&r2=321856&view=diff
> ==============================================================================
> --- lldb/trunk/source/Utility/ArchSpec.cpp (original)
> +++ lldb/trunk/source/Utility/ArchSpec.cpp Thu Jan  4 18:50:24 2018
> @@ -890,7 +890,12 @@ void ArchSpec::MergeFrom(const ArchSpec
>      GetTriple().setOS(other.GetTriple().getOS());
>    if (GetTriple().getArch() == llvm::Triple::UnknownArch) {
>      GetTriple().setArch(other.GetTriple().getArch());
> -    UpdateCore();
> +
> +    // MachO unknown64 isn't really invalid as the debugger can
> +    // still obtain information from the binary, e.g. line tables.
> +    // As such, we don't update the core here.
> +    if (other.GetCore() != eCore_uknownMach64)
> +      UpdateCore();
>    }
>    if (GetTriple().getEnvironment() == llvm::Triple::UnknownEnvironment &&
>        !TripleVendorWasSpecified()) {
>
>
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


More information about the lldb-commits mailing list