Thank you Zachary, it worked perfectly. For the archives: davide@Davides-Mac-Pro ~/w/l/l/t/lldb> git svn dcommit --interactive Committing to https://llvm.org/svn/llvm-project/lldb/trunk ... commit 510dcf75e49fcd39940504fef44aedd7c29b1cdf Author: Davide Italiano <ditali...@apple.com> Date: Fri Jan 5 09:59:53 2018 -0800
[ArchSpec] Add a unittest to complement the change in r321856. <rdar://problem/35778442> Commit this patch to SVN? ([y]es (default)|[n]o|[q]uit|[a]ll): y Authentication realm: <https://llvm.org:443> LLVM Subversion repository Password for 'davide': M unittests/Utility/ArchSpecTest.cpp Committed r321879 M unittests/Utility/ArchSpecTest.cpp r321879 = 09a4cfbcc3cb01c95fcbfcd19ad74d19e78bcccd (refs/remotes/origin/master) On Thu, Jan 4, 2018 at 7:45 PM, Zachary Turner <ztur...@google.com> wrote: > Write a unit test and make a class that inherits from it so it can access > the protected member > > On Thu, Jan 4, 2018 at 6:54 PM Davide Italiano via lldb-commits > <lldb-commits@lists.llvm.org> wrote: >> >> @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@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@lists.llvm.org >> > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits >> _______________________________________________ >> lldb-commits mailing list >> lldb-commits@lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits