[Lldb-commits] [lldb] r343368 - [SBAPI/Target] Expose SetStatistics(bool enable)/GetStatistics().
Author: davide Date: Fri Sep 28 16:27:54 2018 New Revision: 343368 URL: http://llvm.org/viewvc/llvm-project?rev=343368&view=rev Log: [SBAPI/Target] Expose SetStatistics(bool enable)/GetStatistics(). Modified: lldb/trunk/include/lldb/API/SBTarget.h lldb/trunk/packages/Python/lldbsuite/test/functionalities/stats_api/TestStatisticsAPI.py lldb/trunk/scripts/interface/SBTarget.i lldb/trunk/source/API/SBTarget.cpp Modified: lldb/trunk/include/lldb/API/SBTarget.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBTarget.h?rev=343368&r1=343367&r2=343368&view=diff == --- lldb/trunk/include/lldb/API/SBTarget.h (original) +++ lldb/trunk/include/lldb/API/SBTarget.h Fri Sep 28 16:27:54 2018 @@ -75,6 +75,31 @@ public: lldb::SBProcess GetProcess(); + //-- + /// Sets whether we should collect statistics on lldb or not. + /// + /// @param[in] v + /// A boolean to control the collection. + /// @return + /// void + //-- + void SetCollectingStats(bool v); + + //-- + /// Returns whether statistics collection are enabled. + /// + /// @return + /// true if statistics are currently being collected, false + /// otherwise. + //-- + bool GetCollectingStats(); + + //-- + /// Returns a dump of the collected statistics. + /// + /// @return + /// A SBStructuredData with the statistics collected. + //-- lldb::SBStructuredData GetStatistics(); //-- Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/stats_api/TestStatisticsAPI.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/stats_api/TestStatisticsAPI.py?rev=343368&r1=343367&r2=343368&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/stats_api/TestStatisticsAPI.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/stats_api/TestStatisticsAPI.py Fri Sep 28 16:27:54 2018 @@ -17,6 +17,15 @@ class TestStatsAPI(TestBase): self.build() exe = self.getBuildArtifact("a.out") target = self.dbg.CreateTarget(exe) + +# Test enabling/disabling stats +self.assertFalse(target.GetCollectingStats()) +target.SetCollectingStats(True) +self.assertTrue(target.GetCollectingStats()) +target.SetCollectingStats(False) +self.assertFalse(target.GetCollectingStats()) + +# Test the function to get the statistics in JSON'ish. stats = target.GetStatistics() stream = lldb.SBStream() res = stats.GetAsJSON(stream) Modified: lldb/trunk/scripts/interface/SBTarget.i URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBTarget.i?rev=343368&r1=343367&r2=343368&view=diff == --- lldb/trunk/scripts/interface/SBTarget.i (original) +++ lldb/trunk/scripts/interface/SBTarget.i Fri Sep 28 16:27:54 2018 @@ -1019,6 +1019,10 @@ public: void SetLaunchInfo (const lldb::SBLaunchInfo &launch_info); +void SetCollectingStats(bool v); + +bool GetCollectingStats(); + lldb::SBStructuredData GetStatistics(); bool Modified: lldb/trunk/source/API/SBTarget.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTarget.cpp?rev=343368&r1=343367&r2=343368&view=diff == --- lldb/trunk/source/API/SBTarget.cpp (original) +++ lldb/trunk/source/API/SBTarget.cpp Fri Sep 28 16:27:54 2018 @@ -202,6 +202,21 @@ SBStructuredData SBTarget::GetStatistics return data; } +void SBTarget::SetCollectingStats(bool v) { + TargetSP target_sp(GetSP()); + if (!target_sp) +return; + return target_sp->SetCollectingStats(v); +} + +bool SBTarget::GetCollectingStats() { + TargetSP target_sp(GetSP()); + if (!target_sp) +return false; + return target_sp->GetCollectingStats(); +} + + SBProcess SBTarget::LoadCore(const char *core_file) { lldb::SBError error; // Ignored return LoadCore(core_file, error); ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r344154 - Create a SymbolFile plugin for cross-platform PDB access.
On Wed, Oct 10, 2018 at 9:40 AM Zachary Turner via lldb-commits wrote: > > Author: zturner > Date: Wed Oct 10 09:39:07 2018 > New Revision: 344154 > > URL: http://llvm.org/viewvc/llvm-project?rev=344154&view=rev > Log: > Create a SymbolFile plugin for cross-platform PDB access. > Hey Zach, I'm afraid this broke the MacOS Cmake bots (see, e.g. http://lab.llvm.org:8080/green/view/LLDB/job/lldb-cmake/11020/) May I ask you to take a look? The failure pattern looks like: FAIL: lldb :: SymbolFile/NativePDB/disassembly.cpp (48 of 1357) clang-8: warning: '/Users/davide/work/llvm-project-20170507/lldb/lit/SymbolFile/NativePDB/disassembly.cpp' treated as the '/U' option [-Wslash-u-filename] clang-8: note: Use '--' to treat subsequent arguments as filenames clang-8: error: no input files So it's hopefully something relatively straightforward to fix. Please let me know if you need other informations. Thanks, -- Davide ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r344154 - Create a SymbolFile plugin for cross-platform PDB access.
Great, thanks for the update. I'll wait then. There's also an assertion failure in DebugInfo/MSF, which was, incidentally, caused by another test we added yesterday. I think it might be related (be in your area). Thanks, -- Davide On Thu, Oct 11, 2018 at 9:47 AM Zachary Turner wrote: > > I'm working on a fix for this and several other issues right now. For this > one I think we just need to add -- on the command line. > > On Thu, Oct 11, 2018 at 9:36 AM Davide Italiano wrote: >> >> On Wed, Oct 10, 2018 at 9:40 AM Zachary Turner via lldb-commits >> wrote: >> > >> > Author: zturner >> > Date: Wed Oct 10 09:39:07 2018 >> > New Revision: 344154 >> > >> > URL: http://llvm.org/viewvc/llvm-project?rev=344154&view=rev >> > Log: >> > Create a SymbolFile plugin for cross-platform PDB access. >> > >> >> Hey Zach, I'm afraid this broke the MacOS Cmake bots (see, e.g. >> http://lab.llvm.org:8080/green/view/LLDB/job/lldb-cmake/11020/) >> >> May I ask you to take a look? >> >> The failure pattern looks like: >> >> >> FAIL: lldb :: SymbolFile/NativePDB/disassembly.cpp (48 of 1357) >> >> clang-8: warning: >> '/Users/davide/work/llvm-project-20170507/lldb/lit/SymbolFile/NativePDB/disassembly.cpp' >> treated as the '/U' option [-Wslash-u-filename] >> >> clang-8: note: Use '--' to treat subsequent arguments as filenames >> >> clang-8: error: no input files >> >> >> So it's hopefully something relatively straightforward to fix. Please >> let me know if you need other informations. >> >> Thanks, >> >> -- >> Davide ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r344279 - Revert SymbolFileNativePDB plugin.
thanks. On Thu, Oct 11, 2018 at 11:47 AM Zachary Turner via lldb-commits wrote: > > Author: zturner > Date: Thu Oct 11 11:45:44 2018 > New Revision: 344279 > > URL: http://llvm.org/viewvc/llvm-project?rev=344279&view=rev > Log: > Revert SymbolFileNativePDB plugin. > > This was originally causing some test failures on non-Windows > platforms, which required fixes in the compiler and linker. After > those fixes, however, other tests started failing. Reverting > temporarily until I can address everything. > > Removed: > lldb/trunk/lit/SymbolFile/NativePDB/ > lldb/trunk/source/Plugins/SymbolFile/NativePDB/ > Modified: > lldb/trunk/include/lldb/Utility/LLDBAssert.h > lldb/trunk/lit/lit.cfg > lldb/trunk/source/Plugins/SymbolFile/CMakeLists.txt > lldb/trunk/source/Plugins/SymbolFile/PDB/CMakeLists.txt > lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp > > Modified: lldb/trunk/include/lldb/Utility/LLDBAssert.h > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/LLDBAssert.h?rev=344279&r1=344278&r2=344279&view=diff > == > --- lldb/trunk/include/lldb/Utility/LLDBAssert.h (original) > +++ lldb/trunk/include/lldb/Utility/LLDBAssert.h Thu Oct 11 11:45:44 2018 > @@ -14,8 +14,7 @@ > #define lldbassert(x) assert(x) > #else > #define lldbassert(x) > \ > - lldb_private::lldb_assert(static_cast(x), #x, __FUNCTION__, > __FILE__, \ > -__LINE__) > + lldb_private::lldb_assert(x, #x, __FUNCTION__, __FILE__, __LINE__) > #endif > > namespace lldb_private { > > Modified: lldb/trunk/lit/lit.cfg > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/lit.cfg?rev=344279&r1=344278&r2=344279&view=diff > == > --- lldb/trunk/lit/lit.cfg (original) > +++ lldb/trunk/lit/lit.cfg Thu Oct 11 11:45:44 2018 > @@ -64,8 +64,6 @@ lldb = "%s -S %s/lit-lldb-init" % (lit.u > config.test_source_root) > > lldbmi = lit.util.which('lldb-mi', lldb_tools_dir) > -if lldbmi: > -config.available_features.add('lldb-mi') > > if not os.path.exists(config.cc): > config.cc = lit.util.which(config.cc, config.environment['PATH']) > @@ -92,8 +90,7 @@ if platform.system() in ['OpenBSD']: > config.substitutions.append(('%cc', config.cc)) > config.substitutions.append(('%cxx', config.cxx)) > > -if lldbmi: > - config.substitutions.append(('%lldbmi', lldbmi + " --synchronous")) > +config.substitutions.append(('%lldbmi', lldbmi + " --synchronous")) > config.substitutions.append(('%lldb', lldb)) > > if debugserver is not None: > > Modified: lldb/trunk/source/Plugins/SymbolFile/CMakeLists.txt > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/CMakeLists.txt?rev=344279&r1=344278&r2=344279&view=diff > == > --- lldb/trunk/source/Plugins/SymbolFile/CMakeLists.txt (original) > +++ lldb/trunk/source/Plugins/SymbolFile/CMakeLists.txt Thu Oct 11 11:45:44 > 2018 > @@ -1,4 +1,3 @@ > add_subdirectory(DWARF) > add_subdirectory(Symtab) > -add_subdirectory(NativePDB) > add_subdirectory(PDB) > > Modified: lldb/trunk/source/Plugins/SymbolFile/PDB/CMakeLists.txt > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/PDB/CMakeLists.txt?rev=344279&r1=344278&r2=344279&view=diff > == > --- lldb/trunk/source/Plugins/SymbolFile/PDB/CMakeLists.txt (original) > +++ lldb/trunk/source/Plugins/SymbolFile/PDB/CMakeLists.txt Thu Oct 11 > 11:45:44 2018 > @@ -9,7 +9,6 @@ add_lldb_library(lldbPluginSymbolFilePDB > lldbCore > lldbSymbol > lldbUtility > - lldbPluginSymbolFileNativePDB >LINK_COMPONENTS > DebugInfoPDB > Support > > Modified: lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp?rev=344279&r1=344278&r2=344279&view=diff > == > --- lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp (original) > +++ lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp Thu Oct 11 > 11:45:44 2018 > @@ -46,7 +46,6 @@ > #include "llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h" > > #include "Plugins/Language/CPlusPlus/CPlusPlusLanguage.h" // For > IsCPPMangledName > -#include "Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h" > #include "Plugins/SymbolFile/PDB/PDBASTParser.h" > #include "Plugins/SymbolFile/PDB/PDBLocationToDWARFExpression.h" > > @@ -75,31 +74,14 @@ bool ShouldAddLine(uint32_t requested_li > } > } // namespace > > -static bool ShouldUseNativeReader() { > -#if !defined(_WIN32) > - return true; > -#endif
[Lldb-commits] [lldb] r344982 - [ValueObject] Stop assuming types are non-zero sized.
Author: davide Date: Mon Oct 22 17:31:46 2018 New Revision: 344982 URL: http://llvm.org/viewvc/llvm-project?rev=344982&view=rev Log: [ValueObject] Stop assuming types are non-zero sized. Some backends might violate this assumption. No test case upstream unfortunately as this is not the case with C++, but I'm going to add a test in swift language support. Modified: lldb/trunk/source/Core/ValueObjectConstResultImpl.cpp Modified: lldb/trunk/source/Core/ValueObjectConstResultImpl.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectConstResultImpl.cpp?rev=344982&r1=344981&r2=344982&view=diff == --- lldb/trunk/source/Core/ValueObjectConstResultImpl.cpp (original) +++ lldb/trunk/source/Core/ValueObjectConstResultImpl.cpp Mon Oct 22 17:31:46 2018 @@ -77,7 +77,13 @@ ValueObject *ValueObjectConstResultImpl: ignore_array_bounds, child_name_str, child_byte_size, child_byte_offset, child_bitfield_bit_size, child_bitfield_bit_offset, child_is_base_class, child_is_deref_of_parent, m_impl_backend, language_flags); - if (child_compiler_type && child_byte_size) { + + // One might think we should check that the size of the children + // is always strictly positive, hence we could avoid creating a + // ValueObject if that's not the case, but it turns out there + // are languages out there which allow zero-size types with + // children (e.g. Swift). + if (child_compiler_type) { if (synthetic_index) child_byte_offset += child_byte_size * synthetic_index; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r344982 - [ValueObject] Stop assuming types are non-zero sized.
This is a little different. It's not an empty structural type, it's a children with zero size, that has an implicit representation (swift uses tagged bits to represent cases in an enumeration, hence IRGen says the size of the type is zero). I don't think there's any equivalent of this in C++, but I might be wrong, so I'll give this a try, but no promises I'll succeed. -- Davide On Tue, Oct 23, 2018 at 2:21 AM Raphael Isemann via lldb-commits wrote: > > You maybe able to add a test for that in C++: Clang types can have 0 > size, the padding from 0 to 1 happens in the CodeGen IIRC. See also > this bug: https://bugs.llvm.org/show_bug.cgi?id=31612 > > - Raphael > Am Di., 23. Okt. 2018 um 02:33 Uhr schrieb Davide Italiano via > lldb-commits : > > > > Author: davide > > Date: Mon Oct 22 17:31:46 2018 > > New Revision: 344982 > > > > URL: http://llvm.org/viewvc/llvm-project?rev=344982&view=rev > > Log: > > [ValueObject] Stop assuming types are non-zero sized. > > > > Some backends might violate this assumption. No test case > > upstream unfortunately as this is not the case with C++, > > but I'm going to add a test in swift language support. > > > > > > > > Modified: > > lldb/trunk/source/Core/ValueObjectConstResultImpl.cpp > > > > Modified: lldb/trunk/source/Core/ValueObjectConstResultImpl.cpp > > URL: > > http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectConstResultImpl.cpp?rev=344982&r1=344981&r2=344982&view=diff > > == > > --- lldb/trunk/source/Core/ValueObjectConstResultImpl.cpp (original) > > +++ lldb/trunk/source/Core/ValueObjectConstResultImpl.cpp Mon Oct 22 > > 17:31:46 2018 > > @@ -77,7 +77,13 @@ ValueObject *ValueObjectConstResultImpl: > >ignore_array_bounds, child_name_str, child_byte_size, > > child_byte_offset, > >child_bitfield_bit_size, child_bitfield_bit_offset, > > child_is_base_class, > >child_is_deref_of_parent, m_impl_backend, language_flags); > > - if (child_compiler_type && child_byte_size) { > > + > > + // One might think we should check that the size of the children > > + // is always strictly positive, hence we could avoid creating a > > + // ValueObject if that's not the case, but it turns out there > > + // are languages out there which allow zero-size types with > > + // children (e.g. Swift). > > + if (child_compiler_type) { > > if (synthetic_index) > >child_byte_offset += child_byte_size * synthetic_index; > > > > > > > > ___ > > 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
Re: [Lldb-commits] [lldb] r345350 - Remove test that checks auto-completion for settings set.
Thanks for fixing the bots! On Thu, Oct 25, 2018 at 5:41 PM Jonas Devlieghere via lldb-commits wrote: > > Author: jdevlieghere > Date: Thu Oct 25 17:39:27 2018 > New Revision: 345350 > > URL: http://llvm.org/viewvc/llvm-project?rev=345350&view=rev > Log: > Remove test that checks auto-completion for settings set. > > With the new `-f` option for `settings set`, `-` (dash) no longer > auto-complete to `-g`. > > Modified: > > lldb/trunk/packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py > > Modified: > lldb/trunk/packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py?rev=345350&r1=345349&r2=345350&view=diff > == > --- > lldb/trunk/packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py > (original) > +++ > lldb/trunk/packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py > Thu Oct 25 17:39:27 2018 > @@ -175,11 +175,6 @@ class CommandLineCompletionTestCase(Test > self.complete_from_to('settings set thread-f', 'settings set > thread-format') > > @skipIfFreeBSD # timing out on the FreeBSD buildbot > -def test_settings_s_dash(self): > -"""Test that 'settings set -' completes to 'settings set -g'.""" > -self.complete_from_to('settings set -', 'settings set -g') > - > -@skipIfFreeBSD # timing out on the FreeBSD buildbot > def test_settings_clear_th(self): > """Test that 'settings clear thread-f' completes to 'settings clear > thread-format'.""" > self.complete_from_to( > > > ___ > 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] [lldb] r345668 - [testsuite] Skip an already failing test on MacOS.
Author: davide Date: Tue Oct 30 15:49:22 2018 New Revision: 345668 URL: http://llvm.org/viewvc/llvm-project?rev=345668&view=rev Log: [testsuite] Skip an already failing test on MacOS. Due to some libcxx changes to inlining, this now also crashes, so it gets reported as "failure" by the bot. This commit doesn't really change the status quo, just placates the bots. Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/stl/TestSTL.py Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/stl/TestSTL.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/stl/TestSTL.py?rev=345668&r1=345667&r2=345668&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/stl/TestSTL.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/stl/TestSTL.py Tue Oct 30 15:49:22 2018 @@ -26,6 +26,7 @@ class STLTestCase(TestBase): self.line = line_number( self.source, '// Set break point at this line.') +@skipIf @expectedFailureAll(bugnumber="llvm.org/PR36713") def test(self): """Test some expressions involving STL data types.""" ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r346045 - Revert "[Symbol] Search symbols with name and type in a symbol file"
Author: davide Date: Fri Nov 2 14:59:14 2018 New Revision: 346045 URL: http://llvm.org/viewvc/llvm-project?rev=346045&view=rev Log: Revert "[Symbol] Search symbols with name and type in a symbol file" It broke MacOS buildbots. Modified: lldb/trunk/include/lldb/Symbol/SymbolFile.h lldb/trunk/include/lldb/Symbol/SymbolVendor.h lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h lldb/trunk/source/Symbol/SymbolVendor.cpp lldb/trunk/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp Modified: lldb/trunk/include/lldb/Symbol/SymbolFile.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/SymbolFile.h?rev=346045&r1=346044&r2=346045&view=diff == --- lldb/trunk/include/lldb/Symbol/SymbolFile.h (original) +++ lldb/trunk/include/lldb/Symbol/SymbolFile.h Fri Nov 2 14:59:14 2018 @@ -214,8 +214,6 @@ public: return {}; } - virtual void AddSymbols(Symtab &symtab) {} - //-- /// Notify the SymbolFile that the file addresses in the Sections /// for this module have been changed. Modified: lldb/trunk/include/lldb/Symbol/SymbolVendor.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/SymbolVendor.h?rev=346045&r1=346044&r2=346045&view=diff == --- lldb/trunk/include/lldb/Symbol/SymbolVendor.h (original) +++ lldb/trunk/include/lldb/Symbol/SymbolVendor.h Fri Nov 2 14:59:14 2018 @@ -165,8 +165,6 @@ protected: // file) std::unique_ptr m_sym_file_ap; // A single symbol file. Subclasses // can add more of these if needed. - Symtab *m_symtab; // Save a symtab once to not pass it through `AddSymbols` of -// the symbol file each time when it is needed private: //-- Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp?rev=346045&r1=346044&r2=346045&view=diff == --- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (original) +++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Fri Nov 2 14:59:14 2018 @@ -2876,6 +2876,8 @@ Symtab *ObjectFileELF::GetSymtab() { // do the section lookup next time. if (m_symtab_ap == nullptr) m_symtab_ap.reset(new Symtab(this)); + +m_symtab_ap->CalculateSymbolSizes(); } return m_symtab_ap.get(); Modified: lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp?rev=346045&r1=346044&r2=346045&view=diff == --- lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp (original) +++ lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp Fri Nov 2 14:59:14 2018 @@ -124,6 +124,7 @@ Symtab *ObjectFileJIT::GetSymtab() { if (delegate_sp) delegate_sp->PopulateSymtab(this, *m_symtab_ap); // TODO: get symbols from delegate + m_symtab_ap->Finalize(); } } return m_symtab_ap.get(); Modified: lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp?rev=346045&r1=346044&r2=346045&view=diff == --- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp (original) +++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp Fri Nov 2 14:59:14 2018 @@ -1315,6 +1315,7 @@ Symtab *ObjectFileMachO::GetSymtab() { std::lock_guard symtab_guard( m_symtab_ap->GetMutex()); ParseSymtab(); + m_symtab_ap->Finalize(); } } return m_symtab_ap.get(); @@ -4806,6 +4807,16 @@ size_t ObjectFileMachO::ParseSymtab() { } } +//StreamFile s(stdout, false); +//s.Printf ("Symbol table before CalculateSymbolSizes():\n"); +//symtab->Dump(&s, NULL, eSortOrderNone); +// Set symbol byte sizes correctly since mach-o nlist entries don't have +// sizes +symtab->CalculateSymbolSizes(); + +//s.Printf ("Symbol table after CalculateSymbolSizes():\n"); +//symtab->Dump(&s, NULL, eS
Re: [Lldb-commits] [lldb] r346149 - Add a target modules dump ast command.
On Mon, Nov 5, 2018 at 9:42 AM Zachary Turner via lldb-commits wrote: > > Author: zturner > Date: Mon Nov 5 09:40:28 2018 > New Revision: 346149 > > URL: http://llvm.org/viewvc/llvm-project?rev=346149&view=rev > Log: > Add a target modules dump ast command. > > This is useful for investigating the clang ast as you reconstruct > it via by parsing debug info. It can also be used to write tests > against. > Zachary, this broke one of our bots http://lab.llvm.org:8080/green/view/LLDB/job/lldb-cmake-clang-6.0.1/1275/ Can you please take a look? Thanks, -- Davide ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r346186 - [TestVLA] Fix a python decorator.
Author: davide Date: Mon Nov 5 16:18:17 2018 New Revision: 346186 URL: http://llvm.org/viewvc/llvm-project?rev=346186&view=rev Log: [TestVLA] Fix a python decorator. Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/vla/TestVLA.py Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/vla/TestVLA.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/vla/TestVLA.py?rev=346186&r1=346185&r2=346186&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/lang/c/vla/TestVLA.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/vla/TestVLA.py Mon Nov 5 16:18:17 2018 @@ -1,5 +1,6 @@ import lldb from lldbsuite.test.lldbtest import * +from lldbsuite.test import decorators import lldbsuite.test.lldbutil as lldbutil @@ -7,7 +8,7 @@ class TestVLA(TestBase): mydir = TestBase.compute_mydir(__file__) -@skipIf(compiler="clang", compiler_version=['<', '8.0']) +@decorators.skipIf(compiler="clang", compiler_version=['<', '8.0']) def test_vla(self): self.build() _, process, _, _ = lldbutil.run_to_source_breakpoint( ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r346186 - [TestVLA] Fix a python decorator.
@Adrian, this should be fairly straightforward, but a post-commit review is always appreciated. On Mon, Nov 5, 2018 at 4:20 PM Davide Italiano via lldb-commits wrote: > > Author: davide > Date: Mon Nov 5 16:18:17 2018 > New Revision: 346186 > > URL: http://llvm.org/viewvc/llvm-project?rev=346186&view=rev > Log: > [TestVLA] Fix a python decorator. > > Modified: > lldb/trunk/packages/Python/lldbsuite/test/lang/c/vla/TestVLA.py > > Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/vla/TestVLA.py > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/vla/TestVLA.py?rev=346186&r1=346185&r2=346186&view=diff > == > --- lldb/trunk/packages/Python/lldbsuite/test/lang/c/vla/TestVLA.py (original) > +++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/vla/TestVLA.py Mon Nov > 5 16:18:17 2018 > @@ -1,5 +1,6 @@ > import lldb > from lldbsuite.test.lldbtest import * > +from lldbsuite.test import decorators > import lldbsuite.test.lldbutil as lldbutil > > > @@ -7,7 +8,7 @@ class TestVLA(TestBase): > > mydir = TestBase.compute_mydir(__file__) > > -@skipIf(compiler="clang", compiler_version=['<', '8.0']) > +@decorators.skipIf(compiler="clang", compiler_version=['<', '8.0']) > def test_vla(self): > self.build() > _, process, _, _ = lldbutil.run_to_source_breakpoint( > > > ___ > 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] [lldb] r346244 - [ObjectFileELF] Fix misaligned read/writes caught by UBSan.
Author: davide Date: Tue Nov 6 09:11:34 2018 New Revision: 346244 URL: http://llvm.org/viewvc/llvm-project?rev=346244&view=rev Log: [ObjectFileELF] Fix misaligned read/writes caught by UBSan. Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp lldb/trunk/unittests/ObjectFile/ELF/TestObjectFileELF.cpp Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp?rev=346244&r1=346243&r2=346244&view=diff == --- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (original) +++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Tue Nov 6 09:11:34 2018 @@ -2712,7 +2712,8 @@ unsigned ObjectFileELF::ApplyRelocations uint64_t *dst = reinterpret_cast( data_buffer_sp->GetBytes() + rel_section->GetFileOffset() + ELFRelocation::RelocOffset64(rel)); - *dst = value + ELFRelocation::RelocAddend64(rel); + uint64_t val_offset = value + ELFRelocation::RelocAddend64(rel); + memcpy(dst, &val_offset, sizeof(uint64_t)); } break; } @@ -2738,7 +2739,7 @@ unsigned ObjectFileELF::ApplyRelocations uint32_t *dst = reinterpret_cast( data_buffer_sp->GetBytes() + rel_section->GetFileOffset() + ELFRelocation::RelocOffset32(rel)); - *dst = truncated_addr; + memcpy(dst, &truncated_addr, sizeof(uint32_t)); } break; } Modified: lldb/trunk/unittests/ObjectFile/ELF/TestObjectFileELF.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/ObjectFile/ELF/TestObjectFileELF.cpp?rev=346244&r1=346243&r2=346244&view=diff == --- lldb/trunk/unittests/ObjectFile/ELF/TestObjectFileELF.cpp (original) +++ lldb/trunk/unittests/ObjectFile/ELF/TestObjectFileELF.cpp Tue Nov 6 09:11:34 2018 @@ -143,10 +143,17 @@ TEST_F(ObjectFileELFTest, GetModuleSpeci EXPECT_EQ(Spec.GetUUID(), Uuid); } -#define CHECK_ABS32(offset, addend) \ - ASSERT_EQ((uint32_t)addend, *(uint32_t *)(bytes + offset)) -#define CHECK_ABS64(offset, addend) \ - ASSERT_EQ((uint64_t)addend, *(uint64_t *)(bytes + offset)) +static void CHECK_ABS32(uint8_t *bytes, uint32_t offset, uint32_t addend) { + uint32_t res; + memcpy(&res, (uint32_t *)(bytes + offset), sizeof(uint32_t)); + ASSERT_EQ(addend, res); +} + +static void CHECK_ABS64(uint8_t *bytes, uint64_t offset, uint64_t addend) { + uint64_t res; + memcpy(&res, (uint64_t *)(bytes + offset), sizeof(uint64_t)); + ASSERT_EQ(addend, res); +} TEST_F(ObjectFileELFTest, TestAARCH64Relocations) { std::string yaml = GetInputFilePath("debug-info-relocations.pcm.yaml"); @@ -193,13 +200,13 @@ TEST_F(ObjectFileELFTest, TestAARCH64Rel // .rela.debug_info contains 9 relocations: // 7 R_AARCH64_ABS32 - 2 R_AARCH64_ABS64 // None have a value. Four have addends. - CHECK_ABS32(0x6, 0); - CHECK_ABS32(0xC, 0); - CHECK_ABS32(0x12, 45); - CHECK_ABS32(0x16, 0); - CHECK_ABS32(0x1A, 55); - CHECK_ABS64(0x1E, 0); - CHECK_ABS64(0x2B, 0); - CHECK_ABS32(0x39, 73); - CHECK_ABS32(0x44, 75); + CHECK_ABS32(bytes, 0x6, 0); + CHECK_ABS32(bytes, 0xC, 0); + CHECK_ABS32(bytes, 0x12, 45); + CHECK_ABS32(bytes, 0x16, 0); + CHECK_ABS32(bytes, 0x1A, 55); + CHECK_ABS64(bytes, 0x1E, 0); + CHECK_ABS64(bytes, 0x2B, 0); + CHECK_ABS32(bytes, 0x39, 73); + CHECK_ABS32(bytes, 0x44, 75); } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r346247 - [ObjectFile] Prefer reinterpret_cast<>
Author: davide Date: Tue Nov 6 09:42:14 2018 New Revision: 346247 URL: http://llvm.org/viewvc/llvm-project?rev=346247&view=rev Log: [ObjectFile] Prefer reinterpret_cast<> Modified: lldb/trunk/unittests/ObjectFile/ELF/TestObjectFileELF.cpp Modified: lldb/trunk/unittests/ObjectFile/ELF/TestObjectFileELF.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/ObjectFile/ELF/TestObjectFileELF.cpp?rev=346247&r1=346246&r2=346247&view=diff == --- lldb/trunk/unittests/ObjectFile/ELF/TestObjectFileELF.cpp (original) +++ lldb/trunk/unittests/ObjectFile/ELF/TestObjectFileELF.cpp Tue Nov 6 09:42:14 2018 @@ -145,13 +145,13 @@ TEST_F(ObjectFileELFTest, GetModuleSpeci static void CHECK_ABS32(uint8_t *bytes, uint32_t offset, uint32_t addend) { uint32_t res; - memcpy(&res, (uint32_t *)(bytes + offset), sizeof(uint32_t)); + memcpy(&res, reinterpret_cast(bytes + offset), sizeof(uint32_t)); ASSERT_EQ(addend, res); } static void CHECK_ABS64(uint8_t *bytes, uint64_t offset, uint64_t addend) { uint64_t res; - memcpy(&res, (uint64_t *)(bytes + offset), sizeof(uint64_t)); + memcpy(&res, reinterpret_cast(bytes + offset), sizeof(uint64_t)); ASSERT_EQ(addend, res); } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r346278 - Add MSVCUndecoratedNameParser.cpp.
Thank you Jason! -- Davide On Tue, Nov 6, 2018 at 3:03 PM Jason Molenda via lldb-commits wrote: > > Author: jmolenda > Date: Tue Nov 6 15:01:42 2018 > New Revision: 346278 > > URL: http://llvm.org/viewvc/llvm-project?rev=346278&view=rev > Log: > Add MSVCUndecoratedNameParser.cpp. > > Modified: > lldb/trunk/lldb.xcodeproj/project.pbxproj > > Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=346278&r1=346277&r2=346278&view=diff > == > --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original) > +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Tue Nov 6 15:01:42 2018 > @@ -476,6 +476,7 @@ > 266942451A6DC2AC0063BE93 /* MIUtilString.cpp in Sources */ = > {isa = PBXBuildFile; fileRef = 266941EE1A6DC2AC0063BE93 /* MIUtilString.cpp > */; }; > 2669424A1A6DC2AC0063BE93 /* MIUtilThreadBaseStd.cpp in > Sources */ = {isa = PBXBuildFile; fileRef = 266941F81A6DC2AC0063BE93 /* > MIUtilThreadBaseStd.cpp */; }; > 2669424B1A6DC2AC0063BE93 /* MIUtilVariant.cpp in Sources */ = > {isa = PBXBuildFile; fileRef = 266941FA1A6DC2AC0063BE93 /* MIUtilVariant.cpp > */; }; > + AF395C03219254F300894EC3 /* MSVCUndecoratedNameParser.cpp in > Sources */ = {isa = PBXBuildFile; fileRef = AF395C01219254F200894EC3 /* > MSVCUndecoratedNameParser.cpp */; }; > D67521381EA17C4200439694 /* MainLoop.cpp in Sources */ = {isa > = PBXBuildFile; fileRef = D67521351EA17C3900439694 /* MainLoop.cpp */; }; > 9A20573A1F3B8E7E00F6C293 /* MainLoopTest.cpp in Sources */ = > {isa = PBXBuildFile; fileRef = 9A2057301F3B8E7600F6C293 /* MainLoopTest.cpp > */; }; > 8C3BD9961EF45DA50016C343 /* MainThreadCheckerRuntime.cpp in > Sources */ = {isa = PBXBuildFile; fileRef = 8C3BD9951EF45D9B0016C343 /* > MainThreadCheckerRuntime.cpp */; }; > @@ -2191,6 +2192,8 @@ > 266941F91A6DC2AC0063BE93 /* MIUtilThreadBaseStd.h */ = {isa = > PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name > = MIUtilThreadBaseStd.h; path = "tools/lldb-mi/MIUtilThreadBaseStd.h"; > sourceTree = SOURCE_ROOT; }; > 266941FA1A6DC2AC0063BE93 /* MIUtilVariant.cpp */ = {isa = > PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; > name = MIUtilVariant.cpp; path = "tools/lldb-mi/MIUtilVariant.cpp"; > sourceTree = SOURCE_ROOT; }; > 266941FB1A6DC2AC0063BE93 /* MIUtilVariant.h */ = {isa = > PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name > = MIUtilVariant.h; path = "tools/lldb-mi/MIUtilVariant.h"; sourceTree = > SOURCE_ROOT; }; > + AF395C01219254F200894EC3 /* MSVCUndecoratedNameParser.cpp */ > = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = > sourcecode.cpp.cpp; name = MSVCUndecoratedNameParser.cpp; path = > Language/CPlusPlus/MSVCUndecoratedNameParser.cpp; sourceTree = ""; }; > + AF395C00219254F200894EC3 /* MSVCUndecoratedNameParser.h */ = > {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = > sourcecode.c.h; name = MSVCUndecoratedNameParser.h; path = > Language/CPlusPlus/MSVCUndecoratedNameParser.h; sourceTree = ""; }; > D67521351EA17C3900439694 /* MainLoop.cpp */ = {isa = > PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; > path = MainLoop.cpp; sourceTree = ""; }; > 9A2057301F3B8E7600F6C293 /* MainLoopTest.cpp */ = {isa = > PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; > path = MainLoopTest.cpp; sourceTree = ""; }; > 8C3BD9951EF45D9B0016C343 /* MainThreadCheckerRuntime.cpp */ = > {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = > MainThreadCheckerRuntime.cpp; sourceTree = ""; }; > @@ -6460,6 +6463,8 @@ > 94B6385B1B8FB174004FE1E4 /* > CPlusPlusLanguage.cpp */, > 49F811F01E931B1500F4E163 /* > CPlusPlusNameParser.h */, > 49F811EF1E931B1500F4E163 /* > CPlusPlusNameParser.cpp */, > + AF395C01219254F200894EC3 /* > MSVCUndecoratedNameParser.cpp */, > + AF395C00219254F200894EC3 /* > MSVCUndecoratedNameParser.h */, > ); > name = CPlusPlus; > sourceTree = ""; > @@ -7734,6 +7739,7 @@ > 23F4034D1926E0F60046DC9B /* > NativeRegisterContextRegisterInfo.cpp in Sources */, > 964463EC1A330C0500154ED8 /* > CompactUnwindInfo.cpp in Sources */, > 94B638531B8F8E6C004FE1E4 /* Language.cpp in > Sources */, > + AF395C03219254F300894EC3 /* > MSVCUndecoratedNamePars
Re: [Lldb-commits] [lldb] r346430 - Fix bug in PE/COFF plugin and ValueObjectVariable.
Zach, either this or your previous commit broke MacOS. Can you please take a look? Feel free to ping me (here or on IRC) if you need any help. http://green.lab.llvm.org/green/job/lldb-cmake/12343/ -- Davide On Thu, Nov 8, 2018 at 10:52 AM Zachary Turner via lldb-commits wrote: > > Author: zturner > Date: Thu Nov 8 10:50:31 2018 > New Revision: 346430 > > URL: http://llvm.org/viewvc/llvm-project?rev=346430&view=rev > Log: > Fix bug in PE/COFF plugin and ValueObjectVariable. > > There are two bugs here. The first is that MSVC and clang-cl > emit their bss section under the name '.data' instead of '.bss' > but with the size and file offset set to 0. ObjectFilePECOFF > didn't handle this, and would only recognize a section as bss > if it was actually called '.bss'. The effect of this is that > if we tried to print the value of a variable that lived in BSS > we would fail. > > The second bug is that ValueObjectVariable was only returning > the forward type, which is insufficient to print the value of an > enum. So we bump this up to the layout type. > > Differential Revision: https://reviews.llvm.org/D54241 > > Added: > lldb/trunk/lit/SymbolFile/NativePDB/Inputs/globals-bss.lldbinit > lldb/trunk/lit/SymbolFile/NativePDB/globals-bss.cpp > Modified: > lldb/trunk/lit/SymbolFile/NativePDB/ast-reconstruction.cpp > lldb/trunk/source/Core/ValueObjectVariable.cpp > lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp > > Added: lldb/trunk/lit/SymbolFile/NativePDB/Inputs/globals-bss.lldbinit > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/SymbolFile/NativePDB/Inputs/globals-bss.lldbinit?rev=346430&view=auto > == > --- lldb/trunk/lit/SymbolFile/NativePDB/Inputs/globals-bss.lldbinit (added) > +++ lldb/trunk/lit/SymbolFile/NativePDB/Inputs/globals-bss.lldbinit Thu Nov > 8 10:50:31 2018 > @@ -0,0 +1,3 @@ > +target variable GlobalVariable > + > +quit > > Modified: lldb/trunk/lit/SymbolFile/NativePDB/ast-reconstruction.cpp > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/SymbolFile/NativePDB/ast-reconstruction.cpp?rev=346430&r1=346429&r2=346430&view=diff > == > --- lldb/trunk/lit/SymbolFile/NativePDB/ast-reconstruction.cpp (original) > +++ lldb/trunk/lit/SymbolFile/NativePDB/ast-reconstruction.cpp Thu Nov 8 > 10:50:31 2018 > @@ -89,22 +89,23 @@ Anonymous>::D AnonABCVoidD; > // CHECK: (TrivialC) TC = {} > // CHECK: (TrivialS) TS = {} > // CHECK: (TrivialU) TU = {} > -// CHECK: (TrivialE) TE = > -// CHECK: (A::B::C) ABCInt = (ABCMember = failed>) > -// CHECK: (A::B::C) ABCFloat = (ABCMember = failed>) > -// CHECK: (A::B::C) ABCVoid = (ABCSpecializationMember = from {{.*}} failed>) > +// CHECK: (TrivialE) TE = TE_A > +// CHECK: (A::B::C) ABCInt = (ABCMember = 0) > +// CHECK: (A::B::C) ABCFloat = (ABCMember = 0) > +// CHECK: (A::B::C) ABCVoid = (ABCSpecializationMember = > 0x) > // CHECK: (A::C<0>) AC0 = {} > // CHECK: (A::C<-1>) ACNeg1 = {} > -// CHECK: (A::C<0>::D) AC0D = (ACDMember = , > CPtr = ) > -// CHECK: (A::C<-1>::D) ACNeg1D = (ACDMember = failed>, CPtr = ) > +// CHECK: (A::C<0>::D) AC0D = (ACDMember = 0, CPtr = 0x) > +// CHECK: (A::C<-1>::D) ACNeg1D = (ACDMember = 0, CPtr = 0x) > // CHECK: (A::D) AD = {} > -// CHECK: (A::D::E) ADE = (ADDMember = ) > +// CHECK: (A::D::E) ADE = (ADDMember = 0) > // CHECK: Dumping clang ast for 1 modules. > // CHECK: TranslationUnitDecl {{.*}} > // CHECK: |-CXXRecordDecl {{.*}} class TrivialC definition > // CHECK: |-CXXRecordDecl {{.*}} struct TrivialS definition > // CHECK: |-CXXRecordDecl {{.*}} union TrivialU definition > // CHECK: |-EnumDecl {{.*}} TrivialE > +// CHECK: | `-EnumConstantDecl {{.*}} TE_A 'int' > // CHECK: |-NamespaceDecl {{.*}} A > // CHECK: | |-NamespaceDecl {{.*}} B > // CHECK: | | |-CXXRecordDecl {{.*}} struct C definition > > Added: lldb/trunk/lit/SymbolFile/NativePDB/globals-bss.cpp > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/SymbolFile/NativePDB/globals-bss.cpp?rev=346430&view=auto > == > --- lldb/trunk/lit/SymbolFile/NativePDB/globals-bss.cpp (added) > +++ lldb/trunk/lit/SymbolFile/NativePDB/globals-bss.cpp Thu Nov 8 10:50:31 > 2018 > @@ -0,0 +1,35 @@ > +// clang-format off > +// REQUIRES: lld > + > +// Make sure we can read variables from BSS > +// RUN: clang-cl /Z7 /GS- /GR- /c /Fo%t.obj -- %s > +// RUN: lld-link /DEBUG /nodefaultlib /entry:main /OUT:%t.exe /PDB:%t.pdb -- > %t.obj > +// RUN: llvm-readobj -s %t.exe | FileCheck --check-prefix=BSS %s > +// RUN: env LLDB_USE_NATIVE_PDB_READER=1 lldb -f %t.exe -s \ > +// RUN: %p/Inputs/globals-bss.lldbinit 2>&1 | FileCheck %s > + > +int GlobalVariable = 0; > + > +int main(int argc, char **argv) { > + return 0; > +} > + > +// BSS:
Re: [Lldb-commits] [lldb] r346430 - Fix bug in PE/COFF plugin and ValueObjectVariable.
On Thu, Nov 8, 2018 at 12:59 PM Zachary Turner wrote: > > I’m ooo for at least 2 hours. Is it a test failure or a compilation failure? FAIL: test_with_run_command_gmodules (TestTypeCompletion.TypeCompletionTestCase) Check that types only get completed when necessary. -- Traceback (most recent call last): File "/Users/davide/work/llvm-project-20170507/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 1744, in test_method return attrvalue(self) File "/Users/davide/work/llvm-project-20170507/lldb/packages/Python/lldbsuite/test/decorators.py", line 113, in wrapper func(*args, **kwargs) File "/Users/davide/work/llvm-project-20170507/lldb/packages/Python/lldbsuite/test/functionalities/type_completion/TestTypeCompletion.py", line 55, in test_with_run_command 'vector complete but it should not be') AssertionError: True is not False : vector complete but it should not be Do you want me to revert this in the meanwhile? --Davide ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r346430 - Fix bug in PE/COFF plugin and ValueObjectVariable.
Cool. I see several tests failing (so there might be multiple issues). Failing Tests (9): LLDB :: tools/lldb-mi/symbol/symbol-list-lines.test lldb-Suite :: functionalities/breakpoint/scripted_bkpt/TestScriptedResolver.py lldb-Suite :: functionalities/type_completion/TestTypeCompletion.py lldb-Suite :: lang/objc/hidden-ivars/TestHiddenIvars.py lldb-Suite :: lang/objc/ivar-IMP/TestObjCiVarIMP.py lldb-Suite :: lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py lldb-Suite :: macosx/add-dsym/TestAddDsymMidExecutionCommand.py lldb-Suite :: macosx/find-dsym/bundle-with-dot-in-filename/TestBundleWithDotInFilename.py lldb-Suite :: macosx/find-dsym/deep-bundle/TestDeepBundle.py Expected Passes: 1325 Unsupported Tests : 43 Unexpected Failures: 9 I guess a bisect and revert is in order here. -- Davide On Thu, Nov 8, 2018 at 1:27 PM Zachary Turner wrote: > > Go ahead and revert to green until i get back > On Thu, Nov 8, 2018 at 1:17 PM Zachary Turner wrote: >> >> +greg. >> >> Greg, is the test wrong here or the patch? If it’s the test let’s just fix >> the test, otherwise we can revert the patch until we figure it out. >> >> It seems related to my change to use the layout type instead of the forward >> type. >> >> On Thu, Nov 8, 2018 at 1:03 PM Davide Italiano wrote: >>> >>> On Thu, Nov 8, 2018 at 12:59 PM Zachary Turner wrote: >>> > >>> > I’m ooo for at least 2 hours. Is it a test failure or a compilation >>> > failure? >>> >>> >>> FAIL: test_with_run_command_gmodules >>> (TestTypeCompletion.TypeCompletionTestCase) >>> >>>Check that types only get completed when necessary. >>> -- >>> Traceback (most recent call last): >>> File >>> "/Users/davide/work/llvm-project-20170507/lldb/packages/Python/lldbsuite/test/lldbtest.py", >>> line 1744, in test_method >>> return attrvalue(self) >>> File >>> "/Users/davide/work/llvm-project-20170507/lldb/packages/Python/lldbsuite/test/decorators.py", >>> line 113, in wrapper >>> func(*args, **kwargs) >>> File >>> "/Users/davide/work/llvm-project-20170507/lldb/packages/Python/lldbsuite/test/functionalities/type_completion/TestTypeCompletion.py", >>> line 55, in test_with_run_command 'vector complete but it should >>> not be') >>> AssertionError: True is not False : vector complete but it should not be >>> >>> >>> Do you want me to revert this in the meanwhile? >>> >>> --Davide ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r346444 - Revert "Fix bug in PE/COFF plugin and ValueObjectVariable."
Author: davide Date: Thu Nov 8 14:47:40 2018 New Revision: 346444 URL: http://llvm.org/viewvc/llvm-project?rev=346444&view=rev Log: Revert "Fix bug in PE/COFF plugin and ValueObjectVariable." It breaks some tests on MacOS. Removed: lldb/trunk/lit/SymbolFile/NativePDB/Inputs/globals-bss.lldbinit lldb/trunk/lit/SymbolFile/NativePDB/globals-bss.cpp Modified: lldb/trunk/lit/SymbolFile/NativePDB/ast-reconstruction.cpp lldb/trunk/source/Core/ValueObjectVariable.cpp lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp Removed: lldb/trunk/lit/SymbolFile/NativePDB/Inputs/globals-bss.lldbinit URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/SymbolFile/NativePDB/Inputs/globals-bss.lldbinit?rev=346443&view=auto == --- lldb/trunk/lit/SymbolFile/NativePDB/Inputs/globals-bss.lldbinit (original) +++ lldb/trunk/lit/SymbolFile/NativePDB/Inputs/globals-bss.lldbinit (removed) @@ -1,3 +0,0 @@ -target variable GlobalVariable - -quit Modified: lldb/trunk/lit/SymbolFile/NativePDB/ast-reconstruction.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/SymbolFile/NativePDB/ast-reconstruction.cpp?rev=346444&r1=346443&r2=346444&view=diff == --- lldb/trunk/lit/SymbolFile/NativePDB/ast-reconstruction.cpp (original) +++ lldb/trunk/lit/SymbolFile/NativePDB/ast-reconstruction.cpp Thu Nov 8 14:47:40 2018 @@ -89,23 +89,22 @@ Anonymous>::D AnonABCVoidD; // CHECK: (TrivialC) TC = {} // CHECK: (TrivialS) TS = {} // CHECK: (TrivialU) TU = {} -// CHECK: (TrivialE) TE = TE_A -// CHECK: (A::B::C) ABCInt = (ABCMember = 0) -// CHECK: (A::B::C) ABCFloat = (ABCMember = 0) -// CHECK: (A::B::C) ABCVoid = (ABCSpecializationMember = 0x) +// CHECK: (TrivialE) TE = +// CHECK: (A::B::C) ABCInt = (ABCMember = ) +// CHECK: (A::B::C) ABCFloat = (ABCMember = ) +// CHECK: (A::B::C) ABCVoid = (ABCSpecializationMember = ) // CHECK: (A::C<0>) AC0 = {} // CHECK: (A::C<-1>) ACNeg1 = {} -// CHECK: (A::C<0>::D) AC0D = (ACDMember = 0, CPtr = 0x) -// CHECK: (A::C<-1>::D) ACNeg1D = (ACDMember = 0, CPtr = 0x) +// CHECK: (A::C<0>::D) AC0D = (ACDMember = , CPtr = ) +// CHECK: (A::C<-1>::D) ACNeg1D = (ACDMember = , CPtr = ) // CHECK: (A::D) AD = {} -// CHECK: (A::D::E) ADE = (ADDMember = 0) +// CHECK: (A::D::E) ADE = (ADDMember = ) // CHECK: Dumping clang ast for 1 modules. // CHECK: TranslationUnitDecl {{.*}} // CHECK: |-CXXRecordDecl {{.*}} class TrivialC definition // CHECK: |-CXXRecordDecl {{.*}} struct TrivialS definition // CHECK: |-CXXRecordDecl {{.*}} union TrivialU definition // CHECK: |-EnumDecl {{.*}} TrivialE -// CHECK: | `-EnumConstantDecl {{.*}} TE_A 'int' // CHECK: |-NamespaceDecl {{.*}} A // CHECK: | |-NamespaceDecl {{.*}} B // CHECK: | | |-CXXRecordDecl {{.*}} struct C definition Removed: lldb/trunk/lit/SymbolFile/NativePDB/globals-bss.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/SymbolFile/NativePDB/globals-bss.cpp?rev=346443&view=auto == --- lldb/trunk/lit/SymbolFile/NativePDB/globals-bss.cpp (original) +++ lldb/trunk/lit/SymbolFile/NativePDB/globals-bss.cpp (removed) @@ -1,35 +0,0 @@ -// clang-format off -// REQUIRES: lld - -// Make sure we can read variables from BSS -// RUN: clang-cl /Z7 /GS- /GR- /c /Fo%t.obj -- %s -// RUN: lld-link /DEBUG /nodefaultlib /entry:main /OUT:%t.exe /PDB:%t.pdb -- %t.obj -// RUN: llvm-readobj -s %t.exe | FileCheck --check-prefix=BSS %s -// RUN: env LLDB_USE_NATIVE_PDB_READER=1 lldb -f %t.exe -s \ -// RUN: %p/Inputs/globals-bss.lldbinit 2>&1 | FileCheck %s - -int GlobalVariable = 0; - -int main(int argc, char **argv) { - return 0; -} - -// BSS: Section { -// BSS: Number: 3 -// BSS: Name: .data -// BSS-NEXT:VirtualSize: 0x4 -// BSS-NEXT:VirtualAddress: -// BSS-NEXT:RawDataSize: 0 -// BSS-NEXT:PointerToRawData: 0x0 -// BSS-NEXT:PointerToRelocations: 0x0 -// BSS-NEXT:PointerToLineNumbers: 0x0 -// BSS-NEXT:RelocationCount: 0 -// BSS-NEXT:LineNumberCount: 0 -// BSS-NEXT:Characteristics [ (0xC040) -// BSS-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA (0x40) -// BSS-NEXT: IMAGE_SCN_MEM_READ (0x4000) -// BSS-NEXT: IMAGE_SCN_MEM_WRITE (0x8000) -// BSS-NEXT:] -// BSS-NEXT: } - -// CHECK: (int) GlobalVariable = 0 Modified: lldb/trunk/source/Core/ValueObjectVariable.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectVariable.cpp?rev=346444&r1=346443&r2=346444&view=diff == --- lldb/trunk/source/Core/ValueObjectVariable.cpp (original) +++ lldb/trunk/source/Core/ValueObjectVariable.cpp Thu Nov 8 14:47:40 2018 @@ -66,16 +66,9 @@ ValueObjectVariable::~ValueObjectVariabl CompilerType ValueObj
Re: [Lldb-commits] [lldb] r346502 - revert rL346478
On Fri, Nov 9, 2018 at 7:20 AM Kadir Cetinkaya via lldb-commits wrote: > > Author: kadircet > Date: Fri Nov 9 07:18:02 2018 > New Revision: 346502 > > URL: http://llvm.org/viewvc/llvm-project?rev=346502&view=rev > Log: > revert rL346478 > This message isn't explaining why you reverted. Ca you please elaborate? -- Davide ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r346502 - revert rL346478
OK, thanks. Please add an explanation next time you revert something. Best, -- Davide On Fri, Nov 9, 2018 at 8:10 AM Kadir Çetinkaya wrote: > > It was reverted in base repo, https://reviews.llvm.org/rL346500 > > On Fri, Nov 9, 2018 at 5:09 PM Davide Italiano wrote: >> >> On Fri, Nov 9, 2018 at 7:20 AM Kadir Cetinkaya via lldb-commits >> wrote: >> > >> > Author: kadircet >> > Date: Fri Nov 9 07:18:02 2018 >> > New Revision: 346502 >> > >> > URL: http://llvm.org/viewvc/llvm-project?rev=346502&view=rev >> > Log: >> > revert rL346478 >> > >> >> This message isn't explaining why you reverted. Ca you please elaborate? >> >> -- >> Davide ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r346694 - Revert "Extract construction of DataBufferLLVM into FileSystem"
Author: davide Date: Mon Nov 12 11:08:19 2018 New Revision: 346694 URL: http://llvm.org/viewvc/llvm-project?rev=346694&view=rev Log: Revert "Extract construction of DataBufferLLVM into FileSystem" It broke the lldb sanitizer bots. Modified: lldb/trunk/include/lldb/Host/FileSystem.h lldb/trunk/include/lldb/Utility/DataBufferLLVM.h lldb/trunk/source/API/SBSection.cpp lldb/trunk/source/Commands/CommandObjectMemory.cpp lldb/trunk/source/Core/SourceManager.cpp lldb/trunk/source/Host/common/FileSystem.cpp lldb/trunk/source/Host/common/Host.cpp lldb/trunk/source/Host/linux/Host.cpp lldb/trunk/source/Interpreter/OptionValueFileSpec.cpp lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.cpp lldb/trunk/source/Symbol/ObjectFile.cpp lldb/trunk/source/Utility/DataBufferLLVM.cpp lldb/trunk/unittests/Process/minidump/MinidumpParserTest.cpp Modified: lldb/trunk/include/lldb/Host/FileSystem.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/FileSystem.h?rev=346694&r1=346693&r2=346694&view=diff == --- lldb/trunk/include/lldb/Host/FileSystem.h (original) +++ lldb/trunk/include/lldb/Host/FileSystem.h Mon Nov 12 11:08:19 2018 @@ -11,7 +11,6 @@ #define liblldb_Host_FileSystem_h #include "lldb/Host/File.h" -#include "lldb/Utility/DataBufferLLVM.h" #include "lldb/Utility/FileSpec.h" #include "lldb/Utility/Status.h" @@ -95,12 +94,6 @@ public: bool IsDirectory(const llvm::Twine &path) const; /// @} - /// Returns whether the given path is local to the file system. - /// @{ - bool IsLocal(const FileSpec &file_spec) const; - bool IsLocal(const llvm::Twine &path) const; - /// @} - /// Make the given file path absolute. /// @{ std::error_code MakeAbsolute(llvm::SmallVectorImpl &path) const; @@ -113,16 +106,6 @@ public: void Resolve(FileSpec &file_spec); /// @} - Create memory buffer from path. - /// @{ - std::shared_ptr CreateDataBuffer(const llvm::Twine &path, - uint64_t size = 0, - uint64_t offset = 0); - std::shared_ptr CreateDataBuffer(const FileSpec &file_spec, - uint64_t size = 0, - uint64_t offset = 0); - /// @} - /// Call into the Host to see if it can help find the file. bool ResolveExecutableLocation(FileSpec &file_spec); Modified: lldb/trunk/include/lldb/Utility/DataBufferLLVM.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/DataBufferLLVM.h?rev=346694&r1=346693&r2=346694&view=diff == --- lldb/trunk/include/lldb/Utility/DataBufferLLVM.h (original) +++ lldb/trunk/include/lldb/Utility/DataBufferLLVM.h Mon Nov 12 11:08:19 2018 @@ -23,11 +23,16 @@ class Twine; namespace lldb_private { -class FileSystem; class DataBufferLLVM : public DataBuffer { public: ~DataBufferLLVM(); + static std::shared_ptr + CreateSliceFromPath(const llvm::Twine &Path, uint64_t Size, uint64_t Offset); + + static std::shared_ptr + CreateFromPath(const llvm::Twine &Path); + uint8_t *GetBytes() override; const uint8_t *GetBytes() const override; lldb::offset_t GetByteSize() const override; @@ -35,7 +40,6 @@ public: char *GetChars() { return reinterpret_cast(GetBytes()); } private: - friend FileSystem; /// Construct a DataBufferLLVM from \p Buffer. \p Buffer must be a valid /// pointer. explicit DataBufferLLVM(std::unique_ptr Buffer); Modified: lldb/trunk/source/API/SBSection.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBSection.cpp?rev=346694&r1=346693&r2=346694&view=diff == --- lldb/trunk/source/API/SBSection.cpp (original) +++ lldb/trunk/source/API/SBSection.cpp Mon Nov 12 11:08:19 2018 @@ -14,6 +14,7 @@ #include "lldb/Core/Section.h" #include "lldb/Symbol/ObjectFile.h" #include "lldb/Utility/DataBuffer.h" +#include "lldb/Utility/DataBufferLLVM.h" #include "lldb/Utility/DataExtractor.h" #include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" @@ -165,7 +166,7 @@ SBData SBSection::GetSectionData(uint64_ else file_size = 0; } - auto data_buffer_sp = FileSystem::Instance().CreateDataBuffer( + auto data_buffer_sp = DataBufferLLVM::CreateSliceFromPath(
[Lldb-commits] [lldb] r346783 - [Cocoa] Implement formatter for the new NSDate representation.
Author: davide Date: Tue Nov 13 11:43:43 2018 New Revision: 346783 URL: http://llvm.org/viewvc/llvm-project?rev=346783&view=rev Log: [Cocoa] Implement formatter for the new NSDate representation. Modified: lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp Modified: lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp?rev=346783&r1=346782&r2=346783&view=diff == --- lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp (original) +++ lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp Tue Nov 13 11:43:43 2018 @@ -742,6 +742,60 @@ bool lldb_private::formatters::NSURLSumm return false; } +/// Bias value for tagged pointer exponents. +/// Recommended values: +/// 0x3e3: encodes all dates between distantPast and distantFuture +/// except for the range within about 1e-28 second of the reference date. +/// 0x3ef: encodes all dates for a few million years beyond distantPast and +/// distantFuture, except within about 1e-25 second of the reference date. +const int TAGGED_DATE_EXPONENT_BIAS = 0x3ef; + +typedef union { + struct { +uint64_t fraction:52; // unsigned +uint64_t exponent:11; // signed +uint64_t sign:1; + }; + uint64_t i; + double d; +} DoubleBits; +typedef union { + struct { +uint64_t fraction:52; // unsigned +uint64_t exponent:7; // signed +uint64_t sign:1; +uint64_t unused:4; // placeholder for pointer tag bits + }; + uint64_t i; +} TaggedDoubleBits; + +static uint64_t decodeExponent(uint64_t exp) { + int64_t exp7 = exp; + // Tagged exponent field is 7-bit signed. Sign-extend the value to 64 bits + // before performing arithmetic. + int64_t exp11 = ((exp7 << 57) >> 57) + TAGGED_DATE_EXPONENT_BIAS; + return exp11; +} + +static uint64_t decodeTaggedTimeInterval(uint64_t encodedTimeInterval) { + if (encodedTimeInterval == 0) +return 0.0; + if (encodedTimeInterval == std::numeric_limits::max()) +return -0.0; + + TaggedDoubleBits encodedBits = { .i = encodedTimeInterval }; + DoubleBits decodedBits; + + // Sign and fraction are represented exactly. + // Exponent is encoded. + assert(encodedBits.unused == 0); + decodedBits.sign = encodedBits.sign; + decodedBits.fraction = encodedBits.fraction; + decodedBits.exponent = decodeExponent(encodedBits.exponent); + + return decodedBits.d; +} + bool lldb_private::formatters::NSDateSummaryProvider( ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) { ProcessSP process_sp = valobj.GetProcessSP(); @@ -781,9 +835,9 @@ bool lldb_private::formatters::NSDateSum if (class_name.IsEmpty()) return false; + uint64_t info_bits = 0, value_bits = 0; if ((class_name == g_NSDate) || (class_name == g___NSDate) || (class_name == g___NSTaggedDate)) { -uint64_t info_bits = 0, value_bits = 0; if (descriptor->GetTaggedPointerInfo(&info_bits, &value_bits)) { date_value_bits = ((value_bits << 8) | (info_bits << 4)); memcpy(&date_value, &date_value_bits, sizeof(date_value_bits)); @@ -813,6 +867,14 @@ bool lldb_private::formatters::NSDateSum stream.Printf("0001-12-30 00:00:00 +"); return true; } + + // Accomodate for the __NSTaggedDate format introduced in Foundation 1600. + if (class_name == g___NSTaggedDate) { +auto *runtime = llvm::dyn_cast_or_null(process_sp->GetObjCLanguageRuntime()); +if (runtime && runtime->GetFoundationVersion() >= 1600) + date_value = decodeTaggedTimeInterval(value_bits << 4); + } + // this snippet of code assumes that time_t == seconds since Jan-1-1970 this // is generally true and POSIXly happy, but might break if a library vendor // decides to get creative ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r346812 - Fix a bug in the parsing of the LC_BUILD_VERSION Mach-O load command.
Thanks! On Tue, Nov 13, 2018 at 3:17 PM Adrian Prantl via lldb-commits wrote: > > Author: adrian > Date: Tue Nov 13 15:14:37 2018 > New Revision: 346812 > > URL: http://llvm.org/viewvc/llvm-project?rev=346812&view=rev > Log: > Fix a bug in the parsing of the LC_BUILD_VERSION Mach-O load command. > > LC_BUILD_VERSION records are of variable length. The original code > would use uninitialized memory when the size of a record was exactly 24. > > rdar://problem/46032185 > > Added: > lldb/trunk/lit/Modules/lc_build_version_notools.yaml > - copied, changed from r346787, > lldb/trunk/lit/Modules/lc_build_version.yaml > Modified: > lldb/trunk/lit/Modules/lc_build_version.yaml > lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp > > Modified: lldb/trunk/lit/Modules/lc_build_version.yaml > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/Modules/lc_build_version.yaml?rev=346812&r1=346811&r2=346812&view=diff > == > --- lldb/trunk/lit/Modules/lc_build_version.yaml (original) > +++ lldb/trunk/lit/Modules/lc_build_version.yaml Tue Nov 13 15:14:37 2018 > @@ -1,6 +1,6 @@ > # RUN: yaml2obj %s > %t.out > # RUN: lldb-test symbols %t.out | FileCheck %s > -# REQUIRES: darwin > +# REQUIRES: system-darwin > # Test that the deployment target is parsed from the load commands. > # CHECK: x86_64-apple-macosx10.14.0 > --- !mach-o > > Copied: lldb/trunk/lit/Modules/lc_build_version_notools.yaml (from r346787, > lldb/trunk/lit/Modules/lc_build_version.yaml) > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/Modules/lc_build_version_notools.yaml?p2=lldb/trunk/lit/Modules/lc_build_version_notools.yaml&p1=lldb/trunk/lit/Modules/lc_build_version.yaml&r1=346787&r2=346812&rev=346812&view=diff > == > --- lldb/trunk/lit/Modules/lc_build_version.yaml (original) > +++ lldb/trunk/lit/Modules/lc_build_version_notools.yaml Tue Nov 13 15:14:37 > 2018 > @@ -1,6 +1,6 @@ > # RUN: yaml2obj %s > %t.out > # RUN: lldb-test symbols %t.out | FileCheck %s > -# REQUIRES: darwin > +# REQUIRES: system-darwin > # Test that the deployment target is parsed from the load commands. > # CHECK: x86_64-apple-macosx10.14.0 > --- !mach-o > @@ -10,7 +10,7 @@ FileHeader: >cpusubtype: 0x8003 >filetype:0x0002 >ncmds: 14 > - sizeofcmds: 744 > + sizeofcmds: 738 >flags: 0x00200085 >reserved:0x > LoadCommands: > @@ -119,14 +119,11 @@ LoadCommands: > cmdsize: 24 > uuid:8F41E140-23B9-3720-AC28-4E7AF9D159BA >- cmd: LC_BUILD_VERSION > -cmdsize: 32 > +cmdsize: 24 > platform:1 > minos: 658944 > sdk: 658944 > -ntools: 1 > -Tools: > - - tool:3 > -version: 26738944 > +ntools: 0 >- cmd: LC_SOURCE_VERSION > cmdsize: 16 > version: 0 > > Modified: lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp?rev=346812&r1=346811&r2=346812&view=diff > == > --- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp (original) > +++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp Tue Nov > 13 15:14:37 2018 > @@ -5027,24 +5027,28 @@ bool ObjectFileMachO::GetArchitecture(co > const lldb::offset_t cmd_offset = offset; > if (data.GetU32(&offset, &load_cmd, 2) == NULL) >break; > - > -if (load_cmd.cmd == llvm::MachO::LC_BUILD_VERSION) { > - struct build_version_command build_version; > - if (load_cmd.cmdsize != sizeof(build_version)) > +do { > + if (load_cmd.cmd == llvm::MachO::LC_BUILD_VERSION) { > +struct build_version_command build_version; > +if (load_cmd.cmdsize < sizeof(build_version)) { > + // Malformed load command. > + break; > +} > if (data.ExtractBytes(cmd_offset, sizeof(build_version), >data.GetByteOrder(), &build_version) == 0) > - continue; > - MinOS min_os(build_version.minos); > - OSEnv os_env(build_version.platform); > - if (os_env.os_type.empty()) > -continue; > - os << os_env.os_type << min_os.major_version << '.' > - << min_os.minor_version << '.' << min_os.patch_version; > - triple.setOSName(os.str()); > - if (!os_env.environment.empty()) > -triple.setEnvironmentName(os_env.environment); > - return true; > -} > + break; > +MinOS mi
Re: [Lldb-commits] [lldb] r346783 - [Cocoa] Implement formatter for the new NSDate representation.
Sorry Zach, I was sick for the past few days. I'll look into this one now. -- Davide On Wed, Nov 14, 2018 at 9:16 AM Zachary Turner wrote: > > > > On Tue, Nov 13, 2018 at 11:46 AM Davide Italiano via lldb-commits > wrote: >> >> Author: davide >> Date: Tue Nov 13 11:43:43 2018 >> New Revision: 346783 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=346783&view=rev >> Log: >> [Cocoa] Implement formatter for the new NSDate representation. >> >> >> >> Modified: >> lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp >> >> Modified: lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp >> URL: >> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp?rev=346783&r1=346782&r2=346783&view=diff >> == >> --- lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp (original) >> +++ lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp Tue Nov 13 11:43:43 >> 2018 >> @@ -742,6 +742,60 @@ bool lldb_private::formatters::NSURLSumm >>return false; >> } >> >> +/// Bias value for tagged pointer exponents. >> +/// Recommended values: >> +/// 0x3e3: encodes all dates between distantPast and distantFuture >> +/// except for the range within about 1e-28 second of the reference date. >> +/// 0x3ef: encodes all dates for a few million years beyond distantPast and >> +/// distantFuture, except within about 1e-25 second of the reference date. >> +const int TAGGED_DATE_EXPONENT_BIAS = 0x3ef; >> + >> +typedef union { >> + struct { >> +uint64_t fraction:52; // unsigned >> +uint64_t exponent:11; // signed >> +uint64_t sign:1; >> + }; >> + uint64_t i; >> + double d; >> +} DoubleBits; >> +typedef union { >> + struct { >> +uint64_t fraction:52; // unsigned >> +uint64_t exponent:7; // signed >> +uint64_t sign:1; >> +uint64_t unused:4; // placeholder for pointer tag bits >> + }; > > MSVC gives: > > warning C4201: nonstandard extension used: nameless struct/union > >> >> + uint64_t i; >> +} TaggedDoubleBits; >> + >> +static uint64_t decodeExponent(uint64_t exp) { >> + int64_t exp7 = exp; >> + // Tagged exponent field is 7-bit signed. Sign-extend the value to 64 bits >> + // before performing arithmetic. >> + int64_t exp11 = ((exp7 << 57) >> 57) + TAGGED_DATE_EXPONENT_BIAS; >> + return exp11; >> +} > > this should probably be: > > return llvm::SignExtend64<7>(exp) + TAGGED_DATE_EXPONENT_BIAS; > >> >> + >> +static uint64_t decodeTaggedTimeInterval(uint64_t encodedTimeInterval) { >> + if (encodedTimeInterval == 0) >> +return 0.0; >> + if (encodedTimeInterval == std::numeric_limits::max()) >> +return -0.0; >> + >> + TaggedDoubleBits encodedBits = { .i = encodedTimeInterval }; > > Designated initializers are C++20 which are not allowed in LLVM. -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r347084 - [SymbolFile] Remove unused function. NFCI.
Author: davide Date: Fri Nov 16 11:48:23 2018 New Revision: 347084 URL: http://llvm.org/viewvc/llvm-project?rev=347084&view=rev Log: [SymbolFile] Remove unused function. NFCI. Modified: lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp Modified: lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp?rev=347084&r1=347083&r2=347084&view=diff == --- lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp (original) +++ lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp Fri Nov 16 11:48:23 2018 @@ -433,24 +433,6 @@ static bool IsClassRecord(TypeLeafKind k } } -static PDB_SymType GetPdbSymType(TpiStream &tpi, TypeIndex ti) { - if (ti.isSimple()) { -if (ti.getSimpleMode() == SimpleTypeMode::Direct) - return PDB_SymType::BuiltinType; -return PDB_SymType::PointerType; - } - - CVType cvt = tpi.getType(ti); - TypeLeafKind kind = cvt.kind(); - if (kind != LF_MODIFIER) -return CVTypeToPDBType(kind); - - // If this is an LF_MODIFIER, look through it to get the kind that it - // modifies. Note that it's not possible to have an LF_MODIFIER that - // modifies another LF_MODIFIER, although this would handle that anyway. - return GetPdbSymType(tpi, LookThroughModifierRecord(cvt)); -} - static bool IsCVarArgsFunction(llvm::ArrayRef args) { if (args.empty()) return false; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r347087 - [Cocoa] Prefer llvm::SignExtend64. Pointed out by zturner.
Author: davide Date: Fri Nov 16 11:53:00 2018 New Revision: 347087 URL: http://llvm.org/viewvc/llvm-project?rev=347087&view=rev Log: [Cocoa] Prefer llvm::SignExtend64. Pointed out by zturner. Modified: lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp Modified: lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp?rev=347087&r1=347086&r2=347087&view=diff == --- lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp (original) +++ lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp Fri Nov 16 11:53:00 2018 @@ -773,8 +773,7 @@ static uint64_t decodeExponent(uint64_t int64_t exp7 = exp; // Tagged exponent field is 7-bit signed. Sign-extend the value to 64 bits // before performing arithmetic. - int64_t exp11 = ((exp7 << 57) >> 57) + TAGGED_DATE_EXPONENT_BIAS; - return exp11; + return llvm::SignExtend64<7>(exp) + TAGGED_DATE_EXPONENT_BIAS; } static uint64_t decodeTaggedTimeInterval(uint64_t encodedTimeInterval) { ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r346783 - [Cocoa] Implement formatter for the new NSDate representation.
I saw you partially fixed this. I addressed the remaining problem in: Davides-Mac-Pro:lldb davide$ git llvm push Pushing 1 commit: b6fd30d9119 [Cocoa] Prefer llvm::SignExtend64. Pointed out by zturner. Sendinglldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp Transmitting file data .done Committing transaction... Committed revision 347087. Committed b6fd30d9119 to svn. -- Davide On Fri, Nov 16, 2018 at 10:09 AM Davide Italiano wrote: > > Sorry Zach, I was sick for the past few days. I'll look into this one now. > > -- > Davide > On Wed, Nov 14, 2018 at 9:16 AM Zachary Turner wrote: > > > > > > > > On Tue, Nov 13, 2018 at 11:46 AM Davide Italiano via lldb-commits > > wrote: > >> > >> Author: davide > >> Date: Tue Nov 13 11:43:43 2018 > >> New Revision: 346783 > >> > >> URL: http://llvm.org/viewvc/llvm-project?rev=346783&view=rev > >> Log: > >> [Cocoa] Implement formatter for the new NSDate representation. > >> > >> > >> > >> Modified: > >> lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp > >> > >> Modified: lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp > >> URL: > >> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp?rev=346783&r1=346782&r2=346783&view=diff > >> == > >> --- lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp (original) > >> +++ lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp Tue Nov 13 11:43:43 > >> 2018 > >> @@ -742,6 +742,60 @@ bool lldb_private::formatters::NSURLSumm > >>return false; > >> } > >> > >> +/// Bias value for tagged pointer exponents. > >> +/// Recommended values: > >> +/// 0x3e3: encodes all dates between distantPast and distantFuture > >> +/// except for the range within about 1e-28 second of the reference > >> date. > >> +/// 0x3ef: encodes all dates for a few million years beyond distantPast > >> and > >> +/// distantFuture, except within about 1e-25 second of the reference > >> date. > >> +const int TAGGED_DATE_EXPONENT_BIAS = 0x3ef; > >> + > >> +typedef union { > >> + struct { > >> +uint64_t fraction:52; // unsigned > >> +uint64_t exponent:11; // signed > >> +uint64_t sign:1; > >> + }; > >> + uint64_t i; > >> + double d; > >> +} DoubleBits; > >> +typedef union { > >> + struct { > >> +uint64_t fraction:52; // unsigned > >> +uint64_t exponent:7; // signed > >> +uint64_t sign:1; > >> +uint64_t unused:4; // placeholder for pointer tag bits > >> + }; > > > > MSVC gives: > > > > warning C4201: nonstandard extension used: nameless struct/union > > > >> > >> + uint64_t i; > >> +} TaggedDoubleBits; > >> + > >> +static uint64_t decodeExponent(uint64_t exp) { > >> + int64_t exp7 = exp; > >> + // Tagged exponent field is 7-bit signed. Sign-extend the value to 64 > >> bits > >> + // before performing arithmetic. > >> + int64_t exp11 = ((exp7 << 57) >> 57) + TAGGED_DATE_EXPONENT_BIAS; > >> + return exp11; > >> +} > > > > this should probably be: > > > > return llvm::SignExtend64<7>(exp) + TAGGED_DATE_EXPONENT_BIAS; > > > >> > >> + > >> +static uint64_t decodeTaggedTimeInterval(uint64_t encodedTimeInterval) { > >> + if (encodedTimeInterval == 0) > >> +return 0.0; > >> + if (encodedTimeInterval == std::numeric_limits::max()) > >> +return -0.0; > >> + > >> + TaggedDoubleBits encodedBits = { .i = encodedTimeInterval }; > > > > Designated initializers are C++20 which are not allowed in LLVM. > > > > -- > Davide > > "There are no solved problems; there are only problems that are more > or less solved" -- Henri Poincare -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r347578 - [Cmake] Add missing dependency to `count`.
Author: davide Date: Mon Nov 26 09:30:28 2018 New Revision: 347578 URL: http://llvm.org/viewvc/llvm-project?rev=347578&view=rev Log: [Cmake] Add missing dependency to `count`. Modified: lldb/trunk/lit/CMakeLists.txt Modified: lldb/trunk/lit/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/CMakeLists.txt?rev=347578&r1=347577&r2=347578&view=diff == --- lldb/trunk/lit/CMakeLists.txt (original) +++ lldb/trunk/lit/CMakeLists.txt Mon Nov 26 09:30:28 2018 @@ -22,6 +22,7 @@ string(REPLACE ${CMAKE_CFG_INTDIR} ${LLV string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLDB_DOTEST_ARGS "${LLDB_DOTEST_ARGS}") list(APPEND LLDB_TEST_DEPS + count LLDBUnitTests dsymutil llc ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r347579 - [lit] Fully qualify lit_config to avoid runtime crashes.
Author: davide Date: Mon Nov 26 09:39:20 2018 New Revision: 347579 URL: http://llvm.org/viewvc/llvm-project?rev=347579&view=rev Log: [lit] Fully qualify lit_config to avoid runtime crashes. Modified: lldb/trunk/lit/helper/toolchain.py Modified: lldb/trunk/lit/helper/toolchain.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/helper/toolchain.py?rev=347579&r1=347578&r2=347579&view=diff == --- lldb/trunk/lit/helper/toolchain.py (original) +++ lldb/trunk/lit/helper/toolchain.py Mon Nov 26 09:39:20 2018 @@ -76,7 +76,7 @@ def use_support_substitutions(config): res = -1 if res == 0 and out: sdk_path = lit.util.to_string(out) -lit_config.note('using SDKROOT: %r' % sdk_path) +llvm_config.lit_config.note('using SDKROOT: %r' % sdk_path) flags = ['-isysroot', sdk_path] elif platform.system() in ['OpenBSD', 'Linux']: flags = ['-pthread'] ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r347305 - [CMake] Streamline code signing for debugserver and pass entitlements to extended llvm_codesign
On Tue, Nov 20, 2018 at 6:13 AM Stefan Granitz via lldb-commits wrote: > > Author: stefan.graenitz > Date: Tue Nov 20 06:10:33 2018 > New Revision: 347305 > > URL: http://llvm.org/viewvc/llvm-project?rev=347305&view=rev > Log: > [CMake] Streamline code signing for debugserver and pass entitlements to > extended llvm_codesign > This broke the lldb-server tests, at least on MacOS. Example: ERROR: test_written_M_content_reads_back_correctly_debugserver (TestLldbGdbServer.LldbGdbServerTestCase) -- Traceback (most recent call last): File "/Users/davide/work/llvm-project-20170507/lldb/packages/Python/lldbsuite/test/decorators.py", line 143, in wrapper func(*args, **kwargs) File "/Users/davide/work/llvm-project-20170507/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py", line 1389, in test_written_M_content_reads_back_correctly_debugserver self.written_M_content_reads_back_correctly() File "/Users/davide/work/llvm-project-20170507/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py", line 1333, in written_M_content_reads_back_correctly "print-message:"]) File "/Users/davide/work/llvm-project-20170507/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py", line 568, in prep_debug_monitor_and_inferior server = self.connect_to_debug_monitor(attach_pid=attach_pid) File "/Users/davide/work/llvm-project-20170507/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py", line 403, in connect_to_debug_monitor server = self.launch_debug_monitor(attach_pid=attach_pid) File "/Users/davide/work/llvm-project-20170507/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py", line 389, in launch_debug_monitor install_remote=False) File "/Users/davide/work/llvm-project-20170507/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 890, in spawnSubprocess proc.launch(executable, args) File "/Users/davide/work/llvm-project-20170507/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 323, in launch stdin=PIPE) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__ errread, errwrite) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory Config=x86_64-/Users/davide/work/llvm-project-20170507/build-rel/bin/clang-8 -- Ran 65 tests in 29.425s I'm going to revert this for now. In order to reproduce, just run `ninja check-lldb`. I believe you didn't hit this because there were other three issues piling up, but don't hesitate to ping me in case you can't repro this locally. ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r347619 - Revert "[CMake] Streamline code signing for debugserver and pass entitlements to extended llvm_codesign"
Author: davide Date: Mon Nov 26 16:25:49 2018 New Revision: 347619 URL: http://llvm.org/viewvc/llvm-project?rev=347619&view=rev Log: Revert "[CMake] Streamline code signing for debugserver and pass entitlements to extended llvm_codesign" It breaks the lldb cmake bots. Modified: lldb/trunk/CMakeLists.txt lldb/trunk/cmake/modules/AddLLDB.cmake lldb/trunk/test/CMakeLists.txt lldb/trunk/tools/debugserver/CMakeLists.txt lldb/trunk/tools/debugserver/source/CMakeLists.txt lldb/trunk/unittests/tools/CMakeLists.txt Modified: lldb/trunk/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/CMakeLists.txt?rev=347619&r1=347618&r2=347619&view=diff == --- lldb/trunk/CMakeLists.txt (original) +++ lldb/trunk/CMakeLists.txt Mon Nov 26 16:25:49 2018 @@ -11,12 +11,6 @@ include(LLDBStandalone) include(LLDBConfig) include(AddLLDB) -option(LLDB_USE_ENTITLEMENTS "When codesigning, use entitlements if available" ON) -if(LLDB_CODESIGN_IDENTITY) - # In the future we may use LLVM_CODESIGNING_IDENTITY directly. - set(LLVM_CODESIGNING_IDENTITY ${LLDB_CODESIGN_IDENTITY}) -endif() - # Define the LLDB_CONFIGURATION_xxx matching the build type if( uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" ) add_definitions( -DLLDB_CONFIGURATION_DEBUG ) Modified: lldb/trunk/cmake/modules/AddLLDB.cmake URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/AddLLDB.cmake?rev=347619&r1=347618&r2=347619&view=diff == --- lldb/trunk/cmake/modules/AddLLDB.cmake (original) +++ lldb/trunk/cmake/modules/AddLLDB.cmake Mon Nov 26 16:25:49 2018 @@ -100,13 +100,13 @@ endfunction(add_lldb_library) function(add_lldb_executable name) cmake_parse_arguments(ARG "INCLUDE_IN_SUITE;GENERATE_INSTALL" -"ENTITLEMENTS" +"" "LINK_LIBS;LINK_COMPONENTS" ${ARGN} ) list(APPEND LLVM_LINK_COMPONENTS ${ARG_LINK_COMPONENTS}) - add_llvm_executable(${name} ${ARG_UNPARSED_ARGUMENTS} ENTITLEMENTS ${ARG_ENTITLEMENTS}) + add_llvm_executable(${name} ${ARG_UNPARSED_ARGUMENTS}) target_link_libraries(${name} PRIVATE ${ARG_LINK_LIBS}) set_target_properties(${name} PROPERTIES Modified: lldb/trunk/test/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/CMakeLists.txt?rev=347619&r1=347618&r2=347619&view=diff == --- lldb/trunk/test/CMakeLists.txt (original) +++ lldb/trunk/test/CMakeLists.txt Mon Nov 26 16:25:49 2018 @@ -93,11 +93,11 @@ if (NOT "${LLDB_LIT_TOOLS_DIR}" STREQUAL endif() endif() -if(CMAKE_HOST_APPLE AND DEBUGSERVER_PATH) +if(CMAKE_HOST_APPLE) list(APPEND LLDB_TEST_COMMON_ARGS --server ${DEBUGSERVER_PATH}) endif() -if(SKIP_TEST_DEBUGSERVER) +if(SKIP_DEBUGSERVER) list(APPEND LLDB_TEST_COMMON_ARGS --out-of-tree-debugserver) endif() Modified: lldb/trunk/tools/debugserver/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/CMakeLists.txt?rev=347619&r1=347618&r2=347619&view=diff == --- lldb/trunk/tools/debugserver/CMakeLists.txt (original) +++ lldb/trunk/tools/debugserver/CMakeLists.txt Mon Nov 26 16:25:49 2018 @@ -8,18 +8,12 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR "${CMAKE_SOURCE_DIR}/../../cmake" "${CMAKE_SOURCE_DIR}/../../cmake/modules" ) - + include(LLDBStandalone) include(AddLLDB) set(LLDB_SOURCE_DIR "${CMAKE_SOURCE_DIR}/../../") include_directories(${LLDB_SOURCE_DIR}/include) - - option(LLDB_USE_ENTITLEMENTS "When codesigning, use entitlements if available" ON) - if(LLDB_CODESIGN_IDENTITY) -# In the future we may use LLVM_CODESIGNING_IDENTITY directly. -set(LLVM_CODESIGNING_IDENTITY ${LLDB_CODESIGN_IDENTITY}) - endif() endif() add_subdirectory(source) Modified: lldb/trunk/tools/debugserver/source/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/CMakeLists.txt?rev=347619&r1=347618&r2=347619&view=diff == --- lldb/trunk/tools/debugserver/source/CMakeLists.txt (original) +++ lldb/trunk/tools/debugserver/source/CMakeLists.txt Mon Nov 26 16:25:49 2018 @@ -94,102 +94,32 @@ set(lldbDebugserverCommonSources add_library(lldbDebugserverCommon ${lldbDebugserverCommonSources}) -option(LLDB_NO_DEBUGSERVER "Disable the debugserver target" OFF) -option(LLDB_USE_SYSTEM_DEBUGSERVER "Use the system's debugserver instead of building it from source (Darwin only)." OFF) -# Incompatible options -if(LLDB_NO_DEBUGSERVER AND LLDB_USE_SYSTEM_DEBUGSERVER) - message(FATAL_ERROR "Inconsistent options: LLDB_NO_DEBUGSERVER and LLDB_USE_SYSTEM_DEBUGSERVER") -endif() +set(LLDB_CODESIGN_IDENTITY "lldb_codesign" + CACHE STRING "Identity used for code signing.
Re: [Lldb-commits] [lldb] r347305 - [CMake] Streamline code signing for debugserver and pass entitlements to extended llvm_codesign
Reverted in r347619. -- Davide On Mon, Nov 26, 2018 at 3:34 PM Davide Italiano wrote: > > On Tue, Nov 20, 2018 at 6:13 AM Stefan Granitz via lldb-commits > wrote: > > > > Author: stefan.graenitz > > Date: Tue Nov 20 06:10:33 2018 > > New Revision: 347305 > > > > URL: http://llvm.org/viewvc/llvm-project?rev=347305&view=rev > > Log: > > [CMake] Streamline code signing for debugserver and pass entitlements to > > extended llvm_codesign > > > > This broke the lldb-server tests, at least on MacOS. > > Example: > > ERROR: test_written_M_content_reads_back_correctly_debugserver > (TestLldbGdbServer.LldbGdbServerTestCase) > > -- > > Traceback (most recent call last): > File > "/Users/davide/work/llvm-project-20170507/lldb/packages/Python/lldbsuite/test/decorators.py", > line 143, in wrapper > func(*args, **kwargs) > File > "/Users/davide/work/llvm-project-20170507/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py", > line 1389, in test_written_M_content_reads_back_correctly_debugserver > self.written_M_content_reads_back_correctly() > File > "/Users/davide/work/llvm-project-20170507/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py", > line 1333, in written_M_content_reads_back_correctly > "print-message:"]) > File > "/Users/davide/work/llvm-project-20170507/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py", > line 568, in prep_debug_monitor_and_inferior > server = self.connect_to_debug_monitor(attach_pid=attach_pid) > File > "/Users/davide/work/llvm-project-20170507/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py", > line 403, in connect_to_debug_monitor > server = self.launch_debug_monitor(attach_pid=attach_pid) > File > "/Users/davide/work/llvm-project-20170507/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py", > line 389, in launch_debug_monitor > install_remote=False) > File > "/Users/davide/work/llvm-project-20170507/lldb/packages/Python/lldbsuite/test/lldbtest.py", > line 890, in spawnSubprocess > proc.launch(executable, args) > File > "/Users/davide/work/llvm-project-20170507/lldb/packages/Python/lldbsuite/test/lldbtest.py", > line 323, in launch > stdin=PIPE) > File > "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", > line 710, in __init__ > errread, errwrite) > File > "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", > line 1335, in _execute_child > raise child_exception > OSError: [Errno 2] No such file or directory > Config=x86_64-/Users/davide/work/llvm-project-20170507/build-rel/bin/clang-8 > -- > > Ran 65 tests in 29.425s > > > I'm going to revert this for now. In order to reproduce, just run > `ninja check-lldb`. > I believe you didn't hit this because there were other three issues > piling up, but don't hesitate to ping me in case you can't repro this > locally. ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r347673 - Catch up with EvaluateAsInt() clang API change.
Author: davide Date: Tue Nov 27 08:40:21 2018 New Revision: 347673 URL: http://llvm.org/viewvc/llvm-project?rev=347673&view=rev Log: Catch up with EvaluateAsInt() clang API change. Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=347673&r1=347672&r2=347673&view=diff == --- lldb/trunk/source/Symbol/ClangASTContext.cpp (original) +++ lldb/trunk/source/Symbol/ClangASTContext.cpp Tue Nov 27 08:40:21 2018 @@ -5965,10 +5965,10 @@ GetObjCFieldAtIndex(clang::ASTContext *a if (is_bitfield && ast) { clang::Expr *bitfield_bit_size_expr = ivar_pos->getBitWidth(); - clang::Expr::EvalResult result; + llvm::APSInt bitfield_apsint; if (bitfield_bit_size_expr && - bitfield_bit_size_expr->EvaluateAsInt(result, *ast)) { -llvm::APSInt bitfield_apsint = result.Val.getInt(); + bitfield_bit_size_expr->EvaluateAsInt(bitfield_apsint, +*ast)) { *bitfield_bit_size_ptr = bitfield_apsint.getLimitedValue(); } } @@ -6025,11 +6025,10 @@ CompilerType ClangASTContext::GetFieldAt if (is_bitfield) { clang::Expr *bitfield_bit_size_expr = field->getBitWidth(); - clang::Expr::EvalResult result; + llvm::APSInt bitfield_apsint; if (bitfield_bit_size_expr && - bitfield_bit_size_expr->EvaluateAsInt(result, + bitfield_bit_size_expr->EvaluateAsInt(bitfield_apsint, *getASTContext())) { -llvm::APSInt bitfield_apsint = result.Val.getInt(); *bitfield_bit_size_ptr = bitfield_apsint.getLimitedValue(); } } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D55383: Implement basic DidAttach for DynamicLoaderWindowsDYLD for use with ds2
On Thu, Dec 6, 2018 at 1:32 PM Davide Italiano via Phabricator wrote: > > davide added subscribers: zturner, labath, davide. > davide added a comment. > > You would recommend getting a post-commit review from @labath or @zturner > *I would. ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r348592 - Introduce ObjectFileBreakpad
Pavel, this broke the MacOS lldb cmake bot. In particular, this test started failing. lldb-Suite.macosx/function-starts.TestFunctionStarts.py http://lab.llvm.org:8080/green/view/LLDB/job/lldb-cmake/ May I ask you to take a look? -- Davide On Fri, Dec 7, 2018 at 6:23 AM Pavel Labath via lldb-commits wrote: > > Author: labath > Date: Fri Dec 7 06:20:27 2018 > New Revision: 348592 > > URL: http://llvm.org/viewvc/llvm-project?rev=348592&view=rev > Log: > Introduce ObjectFileBreakpad > > Summary: > This patch adds the scaffolding necessary for lldb to recognise symbol > files generated by breakpad. These (textual) files contain just enough > information to be able to produce a backtrace from a crash > dump. This information includes: > - UUID, architecture and name of the module > - line tables > - list of symbols > - unwind information > > A minimal breakpad file could look like this: > MODULE Linux x86_64 24B5D199F0F766FF5DC30 a.out > INFO CODE_ID B52499D1F0F766FF5DC3 > FILE 0 /tmp/a.c > FUNC 1010 10 0 _start > 1010 4 4 0 > 1014 5 5 0 > 1019 5 6 0 > 101e 2 7 0 > PUBLIC 1010 0 _start > STACK CFI INIT 1010 10 .cfa: $rsp 8 + .ra: .cfa -8 + ^ > STACK CFI 1011 $rbp: .cfa -16 + ^ .cfa: $rsp 16 + > STACK CFI 1014 .cfa: $rbp 16 + > > Even though this data would normally be considered "symbol" information, > in the current lldb infrastructure it is assumed every SymbolFile object > is backed by an ObjectFile instance. So, in order to better interoperate > with the rest of the code (particularly symbol vendors). > > In this patch I just parse the breakpad header, which is enough to > populate the UUID and architecture fields of the ObjectFile interface. > The rough plan for followup patches is to expose the individual parts of > the breakpad file as ObjectFile "sections", which can then be used by > other parts of the codebase (SymbolFileBreakpad ?) to vend the necessary > information. > > Reviewers: clayborg, zturner, lemo, amccarth > > Subscribers: mgorny, fedor.sergeev, markmentovai, lldb-commits > > Differential Revision: https://reviews.llvm.org/D55214 > > Added: > lldb/trunk/lit/Modules/Breakpad/ > lldb/trunk/lit/Modules/Breakpad/Inputs/ > lldb/trunk/lit/Modules/Breakpad/Inputs/bad-module-id-1.syms > lldb/trunk/lit/Modules/Breakpad/Inputs/bad-module-id-2.syms > lldb/trunk/lit/Modules/Breakpad/Inputs/bad-module-id-3.syms > lldb/trunk/lit/Modules/Breakpad/Inputs/identification-linux.syms > lldb/trunk/lit/Modules/Breakpad/Inputs/identification-macosx.syms > lldb/trunk/lit/Modules/Breakpad/Inputs/identification-windows.syms > lldb/trunk/lit/Modules/Breakpad/breakpad-identification.test > lldb/trunk/lit/Modules/Breakpad/lit.local.cfg > lldb/trunk/source/Plugins/ObjectFile/Breakpad/ > lldb/trunk/source/Plugins/ObjectFile/Breakpad/CMakeLists.txt > lldb/trunk/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.cpp > lldb/trunk/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.h > Modified: > lldb/trunk/include/lldb/Symbol/ObjectFile.h > lldb/trunk/source/API/SystemInitializerFull.cpp > lldb/trunk/source/Plugins/ObjectFile/CMakeLists.txt > lldb/trunk/source/Symbol/ObjectFile.cpp > lldb/trunk/tools/lldb-test/SystemInitializerTest.cpp > lldb/trunk/tools/lldb-test/lldb-test.cpp > > Modified: lldb/trunk/include/lldb/Symbol/ObjectFile.h > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ObjectFile.h?rev=348592&r1=348591&r2=348592&view=diff > == > --- lldb/trunk/include/lldb/Symbol/ObjectFile.h (original) > +++ lldb/trunk/include/lldb/Symbol/ObjectFile.h Fri Dec 7 06:20:27 2018 > @@ -817,4 +817,16 @@ private: > > } // namespace lldb_private > > +namespace llvm { > +template <> struct format_provider { > + static void format(const lldb_private::ObjectFile::Type &type, > + raw_ostream &OS, StringRef Style); > +}; > + > +template <> struct format_provider { > + static void format(const lldb_private::ObjectFile::Strata &strata, > + raw_ostream &OS, StringRef Style); > +}; > +} // namespace llvm > + > #endif // liblldb_ObjectFile_h_ > > Added: lldb/trunk/lit/Modules/Breakpad/Inputs/bad-module-id-1.syms > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/Modules/Breakpad/Inputs/bad-module-id-1.syms?rev=348592&view=auto > == > --- lldb/trunk/lit/Modules/Breakpad/Inputs/bad-module-id-1.syms (added) > +++ lldb/trunk/lit/Modules/Breakpad/Inputs/bad-module-id-1.syms Fri Dec 7 > 06:20:27 2018 > @@ -0,0 +1,2 @@ > +MODULE Linux x86_64 E5894855+C35D+0 linux.out > +PUBLIC 1000 0 _start > > Added: lldb/trunk/lit/Modules/Breakpad/Inputs/bad-module-id-2.syms > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/Modules/Breakpad/Inputs/bad-module-id-2.syms?rev=348592&view=auto >
[Lldb-commits] [lldb] r349372 - Fix lldb's macosx/heap.py cstr command.
Author: davide Date: Mon Dec 17 10:21:51 2018 New Revision: 349372 URL: http://llvm.org/viewvc/llvm-project?rev=349372&view=rev Log: Fix lldb's macosx/heap.py cstr command. Added: lldb/trunk/lit/Heap/ lldb/trunk/lit/Heap/Inputs/ lldb/trunk/lit/Heap/Inputs/cstr.c lldb/trunk/lit/Heap/heap-cstr.test Modified: lldb/trunk/examples/darwin/heap_find/heap.py Modified: lldb/trunk/examples/darwin/heap_find/heap.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/examples/darwin/heap_find/heap.py?rev=349372&r1=349371&r2=349372&view=diff == --- lldb/trunk/examples/darwin/heap_find/heap.py (original) +++ lldb/trunk/examples/darwin/heap_find/heap.py Mon Dec 17 10:21:51 2018 @@ -1036,7 +1036,7 @@ range_callback_t range_callback = [](tas callback_baton_t *lldb_info = (callback_baton_t *)baton; if (lldb_info->cstr_len < ptr_size) { const char *begin = (const char *)ptr_addr; -const char *end = begin + ptr_size - info->cstr_len; +const char *end = begin + ptr_size - lldb_info->cstr_len; for (const char *s = begin; s < end; ++s) { if ((int)memcmp(s, lldb_info->cstr, lldb_info->cstr_len) == 0) { if (lldb_info->num_matches < MAX_MATCHES) { Added: lldb/trunk/lit/Heap/Inputs/cstr.c URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/Heap/Inputs/cstr.c?rev=349372&view=auto == --- lldb/trunk/lit/Heap/Inputs/cstr.c (added) +++ lldb/trunk/lit/Heap/Inputs/cstr.c Mon Dec 17 10:21:51 2018 @@ -0,0 +1,17 @@ +#include + +int main(void) { + char *str; + int size = 9; //strlen("patatino") + 1 + str = (char *)malloc(sizeof(char)*size); + *(str+0) = 'p'; + *(str+1) = 'a'; + *(str+2) = 't'; + *(str+3) = 'a'; + *(str+4) = 't'; + *(str+5) = 'i'; + *(str+6) = 'n'; + *(str+7) = 'o'; + *(str+8) = '\0'; + return 0; +} Added: lldb/trunk/lit/Heap/heap-cstr.test URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/Heap/heap-cstr.test?rev=349372&view=auto == --- lldb/trunk/lit/Heap/heap-cstr.test (added) +++ lldb/trunk/lit/Heap/heap-cstr.test Mon Dec 17 10:21:51 2018 @@ -0,0 +1,10 @@ +# REQUIRES: system-darwin +# RUN: %clang %p/Inputs/cstr.c -g -o %t +# RUN: %lldb -b -s %s -f %t | FileCheck %s + +br set -p return +command script import lldb.macosx.heap +run +cstr "patatino" + +# CHECK: {{.*}}: malloc(16) -> {{.*}} ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r349372 - Fix lldb's macosx/heap.py cstr command.
For the masses, this is https://reviews.llvm.org/D55776 On Mon, Dec 17, 2018 at 10:24 AM Davide Italiano via lldb-commits wrote: > > Author: davide > Date: Mon Dec 17 10:21:51 2018 > New Revision: 349372 > > URL: http://llvm.org/viewvc/llvm-project?rev=349372&view=rev > Log: > Fix lldb's macosx/heap.py cstr command. > > > > Added: > lldb/trunk/lit/Heap/ > lldb/trunk/lit/Heap/Inputs/ > lldb/trunk/lit/Heap/Inputs/cstr.c > lldb/trunk/lit/Heap/heap-cstr.test > Modified: > lldb/trunk/examples/darwin/heap_find/heap.py > > Modified: lldb/trunk/examples/darwin/heap_find/heap.py > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/examples/darwin/heap_find/heap.py?rev=349372&r1=349371&r2=349372&view=diff > == > --- lldb/trunk/examples/darwin/heap_find/heap.py (original) > +++ lldb/trunk/examples/darwin/heap_find/heap.py Mon Dec 17 10:21:51 2018 > @@ -1036,7 +1036,7 @@ range_callback_t range_callback = [](tas > callback_baton_t *lldb_info = (callback_baton_t *)baton; > if (lldb_info->cstr_len < ptr_size) { > const char *begin = (const char *)ptr_addr; > -const char *end = begin + ptr_size - info->cstr_len; > +const char *end = begin + ptr_size - lldb_info->cstr_len; > for (const char *s = begin; s < end; ++s) { > if ((int)memcmp(s, lldb_info->cstr, lldb_info->cstr_len) == 0) { > if (lldb_info->num_matches < MAX_MATCHES) { > > Added: lldb/trunk/lit/Heap/Inputs/cstr.c > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/Heap/Inputs/cstr.c?rev=349372&view=auto > == > --- lldb/trunk/lit/Heap/Inputs/cstr.c (added) > +++ lldb/trunk/lit/Heap/Inputs/cstr.c Mon Dec 17 10:21:51 2018 > @@ -0,0 +1,17 @@ > +#include > + > +int main(void) { > + char *str; > + int size = 9; //strlen("patatino") + 1 > + str = (char *)malloc(sizeof(char)*size); > + *(str+0) = 'p'; > + *(str+1) = 'a'; > + *(str+2) = 't'; > + *(str+3) = 'a'; > + *(str+4) = 't'; > + *(str+5) = 'i'; > + *(str+6) = 'n'; > + *(str+7) = 'o'; > + *(str+8) = '\0'; > + return 0; > +} > > Added: lldb/trunk/lit/Heap/heap-cstr.test > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/Heap/heap-cstr.test?rev=349372&view=auto > == > --- lldb/trunk/lit/Heap/heap-cstr.test (added) > +++ lldb/trunk/lit/Heap/heap-cstr.test Mon Dec 17 10:21:51 2018 > @@ -0,0 +1,10 @@ > +# REQUIRES: system-darwin > +# RUN: %clang %p/Inputs/cstr.c -g -o %t > +# RUN: %lldb -b -s %s -f %t | FileCheck %s > + > +br set -p return > +command script import lldb.macosx.heap > +run > +cstr "patatino" > + > +# CHECK: {{.*}}: malloc(16) -> {{.*}} > > > ___ > 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] [lldb] r349970 - [Scalar] Implement operator!= using operator==.
Author: davide Date: Fri Dec 21 14:42:00 2018 New Revision: 349970 URL: http://llvm.org/viewvc/llvm-project?rev=349970&view=rev Log: [Scalar] Implement operator!= using operator==. Summary: Adding some test coverage while I'm around. Reviewers: JDevlieghere, aprantl, zturner, clayborg, jingham Differential Revision: https://reviews.llvm.org/D56017 Modified: lldb/trunk/source/Utility/Scalar.cpp lldb/trunk/unittests/Utility/ScalarTest.cpp Modified: lldb/trunk/source/Utility/Scalar.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/Scalar.cpp?rev=349970&r1=349969&r2=349970&view=diff == --- lldb/trunk/source/Utility/Scalar.cpp (original) +++ lldb/trunk/source/Utility/Scalar.cpp Fri Dec 21 14:42:00 2018 @@ -2598,37 +2598,7 @@ bool lldb_private::operator==(const Scal } bool lldb_private::operator!=(const Scalar &lhs, const Scalar &rhs) { - // If either entry is void then we can just compare the types - if (lhs.m_type == Scalar::e_void || rhs.m_type == Scalar::e_void) -return lhs.m_type != rhs.m_type; - - Scalar - temp_value; // A temp value that might get a copy of either promoted value - const Scalar *a; - const Scalar *b; - llvm::APFloat::cmpResult result; - switch (PromoteToMaxType(lhs, rhs, temp_value, a, b)) { - case Scalar::e_void: -break; - case Scalar::e_sint: - case Scalar::e_uint: - case Scalar::e_slong: - case Scalar::e_ulong: - case Scalar::e_slonglong: - case Scalar::e_ulonglong: - case Scalar::e_sint128: - case Scalar::e_uint128: - case Scalar::e_sint256: - case Scalar::e_uint256: -return a->m_integer != b->m_integer; - case Scalar::e_float: - case Scalar::e_double: - case Scalar::e_long_double: -result = a->m_float.compare(b->m_float); -if (result != llvm::APFloat::cmpEqual) - return true; - } - return true; + return !(lhs == rhs); } bool lldb_private::operator<(const Scalar &lhs, const Scalar &rhs) { Modified: lldb/trunk/unittests/Utility/ScalarTest.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Utility/ScalarTest.cpp?rev=349970&r1=349969&r2=349970&view=diff == --- lldb/trunk/unittests/Utility/ScalarTest.cpp (original) +++ lldb/trunk/unittests/Utility/ScalarTest.cpp Fri Dec 21 14:42:00 2018 @@ -19,6 +19,33 @@ using namespace lldb_private; using namespace llvm; +template +bool checkInequality(T c1, T c2) { + return (Scalar(c1) != Scalar(c2)); +} + +template +bool checkEquality(T c1, T c2) { + return (Scalar(c1) == Scalar(c2)); +} + +TEST(ScalarTest, Equality) { + ASSERT_TRUE(checkInequality(23, 24)); + ASSERT_TRUE(checkEquality(96, 96)); + ASSERT_TRUE(checkInequality(4.0f, 4.5f)); + ASSERT_TRUE(checkEquality(4.0f, 4.0f)); + uint64_t apint1 = 234; + uint64_t apint2 = 246; + ASSERT_TRUE(checkInequality(APInt(64, apint1), APInt(64, apint2))); + ASSERT_TRUE(checkEquality(APInt(64, apint1), APInt(64, apint1))); + + Scalar void1; + Scalar void2; + float f1 = 2.0; + ASSERT_TRUE(void1 == void2); + ASSERT_FALSE(void1 == Scalar(f1)); +} + TEST(ScalarTest, RightShiftOperator) { int a = 0x1000; int b = 0x; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r349971 - [Scalar] Simplify as Jonas suggested. NFCI.
Author: davide Date: Fri Dec 21 14:45:07 2018 New Revision: 349971 URL: http://llvm.org/viewvc/llvm-project?rev=349971&view=rev Log: [Scalar] Simplify as Jonas suggested. NFCI. Modified: lldb/trunk/unittests/Utility/ScalarTest.cpp Modified: lldb/trunk/unittests/Utility/ScalarTest.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Utility/ScalarTest.cpp?rev=349971&r1=349970&r2=349971&view=diff == --- lldb/trunk/unittests/Utility/ScalarTest.cpp (original) +++ lldb/trunk/unittests/Utility/ScalarTest.cpp Fri Dec 21 14:45:07 2018 @@ -34,10 +34,11 @@ TEST(ScalarTest, Equality) { ASSERT_TRUE(checkEquality(96, 96)); ASSERT_TRUE(checkInequality(4.0f, 4.5f)); ASSERT_TRUE(checkEquality(4.0f, 4.0f)); - uint64_t apint1 = 234; - uint64_t apint2 = 246; - ASSERT_TRUE(checkInequality(APInt(64, apint1), APInt(64, apint2))); - ASSERT_TRUE(checkEquality(APInt(64, apint1), APInt(64, apint1))); + + auto apint1 = APInt(64, 234); + auto apint2 = APInt(64, 246); + ASSERT_TRUE(checkInequality(apint1, apint2)); + ASSERT_TRUE(checkEquality(apint1, apint1)); Scalar void1; Scalar void2; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r350146 - [SymbolContext] Rewrite operator== to be more concise.
Author: davide Date: Fri Dec 28 20:57:00 2018 New Revision: 350146 URL: http://llvm.org/viewvc/llvm-project?rev=350146&view=rev Log: [SymbolContext] Rewrite operator== to be more concise. And probably, less error prone. NFCI. Modified: lldb/trunk/source/Symbol/SymbolContext.cpp Modified: lldb/trunk/source/Symbol/SymbolContext.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/SymbolContext.cpp?rev=350146&r1=350145&r2=350146&view=diff == --- lldb/trunk/source/Symbol/SymbolContext.cpp (original) +++ lldb/trunk/source/Symbol/SymbolContext.cpp Fri Dec 28 20:57:00 2018 @@ -393,12 +393,7 @@ bool lldb_private::operator==(const Symb bool lldb_private::operator!=(const SymbolContext &lhs, const SymbolContext &rhs) { - return lhs.function != rhs.function || lhs.symbol != rhs.symbol || - lhs.module_sp.get() != rhs.module_sp.get() || - lhs.comp_unit != rhs.comp_unit || - lhs.target_sp.get() != rhs.target_sp.get() || - LineEntry::Compare(lhs.line_entry, rhs.line_entry) != 0 || - lhs.variable != rhs.variable; + return !(lhs == rhs); } bool SymbolContext::GetAddressRange(uint32_t scope, uint32_t range_idx, ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r350147 - [CompilerType] Remove dead code. NFCI.
Author: davide Date: Fri Dec 28 20:59:07 2018 New Revision: 350147 URL: http://llvm.org/viewvc/llvm-project?rev=350147&view=rev Log: [CompilerType] Remove dead code. NFCI. Modified: lldb/trunk/source/Symbol/CompilerType.cpp Modified: lldb/trunk/source/Symbol/CompilerType.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/CompilerType.cpp?rev=350147&r1=350146&r2=350147&view=diff == --- lldb/trunk/source/Symbol/CompilerType.cpp (original) +++ lldb/trunk/source/Symbol/CompilerType.cpp Fri Dec 28 20:59:07 2018 @@ -1058,16 +1058,6 @@ bool CompilerType::WriteToMemory(lldb_pr return false; } -// clang::CXXRecordDecl * -// CompilerType::GetAsCXXRecordDecl (lldb::opaque_compiler_type_t -// opaque_compiler_qual_type) -//{ -//if (opaque_compiler_qual_type) -//return -// clang::QualType::getFromOpaquePtr(opaque_compiler_qual_type)->getAsCXXRecordDecl(); -//return NULL; -//} - bool lldb_private::operator==(const lldb_private::CompilerType &lhs, const lldb_private::CompilerType &rhs) { return lhs.GetTypeSystem() == rhs.GetTypeSystem() && ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r350148 - [CompilerType] Simplify operator!=. NFCI.
Author: davide Date: Fri Dec 28 21:00:33 2018 New Revision: 350148 URL: http://llvm.org/viewvc/llvm-project?rev=350148&view=rev Log: [CompilerType] Simplify operator!=. NFCI. Modified: lldb/trunk/source/Symbol/CompilerType.cpp Modified: lldb/trunk/source/Symbol/CompilerType.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/CompilerType.cpp?rev=350148&r1=350147&r2=350148&view=diff == --- lldb/trunk/source/Symbol/CompilerType.cpp (original) +++ lldb/trunk/source/Symbol/CompilerType.cpp Fri Dec 28 21:00:33 2018 @@ -1066,6 +1066,5 @@ bool lldb_private::operator==(const lldb bool lldb_private::operator!=(const lldb_private::CompilerType &lhs, const lldb_private::CompilerType &rhs) { - return lhs.GetTypeSystem() != rhs.GetTypeSystem() || - lhs.GetOpaqueQualType() != rhs.GetOpaqueQualType(); + return !(lhs == rhs); } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r350149 - [RegisterValue] Rewrite operator!= in terms of operator==. NFCI.
Author: davide Date: Fri Dec 28 21:05:23 2018 New Revision: 350149 URL: http://llvm.org/viewvc/llvm-project?rev=350149&view=rev Log: [RegisterValue] Rewrite operator!= in terms of operator==. NFCI. Modified: lldb/trunk/source/Utility/RegisterValue.cpp Modified: lldb/trunk/source/Utility/RegisterValue.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/RegisterValue.cpp?rev=350149&r1=350148&r2=350149&view=diff == --- lldb/trunk/source/Utility/RegisterValue.cpp (original) +++ lldb/trunk/source/Utility/RegisterValue.cpp Fri Dec 28 21:05:23 2018 @@ -793,32 +793,7 @@ bool RegisterValue::operator==(const Reg } bool RegisterValue::operator!=(const RegisterValue &rhs) const { - if (m_type != rhs.m_type) -return true; - switch (m_type) { - case eTypeInvalid: -return false; - case eTypeUInt8: - case eTypeUInt16: - case eTypeUInt32: - case eTypeUInt64: - case eTypeUInt128: - case eTypeFloat: - case eTypeDouble: - case eTypeLongDouble: -return m_scalar != rhs.m_scalar; - case eTypeBytes: -if (buffer.length != rhs.buffer.length) { - return true; -} else { - uint8_t length = buffer.length; - if (length > kMaxRegisterByteSize) -length = kMaxRegisterByteSize; - return memcmp(buffer.bytes, rhs.buffer.bytes, length) != 0; -} -break; - } - return true; + return !(*this == rhs); } bool RegisterValue::ClearBit(uint32_t bit) { ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r350160 - [test] Remove flakiness decorator from TestObjCDynamicSBType
Nice, thanks! There is a typo in the commit message, I assume? On Sun, Dec 30, 2018 at 7:13 AM Jonas Devlieghere via lldb-commits wrote: > > Author: jdevlieghere > Date: Sat Dec 29 22:10:03 2018 > New Revision: 350160 > > URL: http://llvm.org/viewvc/llvm-project?rev=350160&view=rev > Log: > [test] Remove flakiness decorator from TestObjCDynamicSBType > > The quoted bug report (llvm.org/PR20270) was closed in 2014. > > Modified: > > lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py > > Modified: > lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py?rev=350160&r1=350159&r2=350160&view=diff > == > --- > lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py > (original) > +++ > lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py > Sat Dec 29 22:10:03 2018 > @@ -6,7 +6,6 @@ from __future__ import print_function > > > import lldb > -from lldbsuite.test.decorators import * > from lldbsuite.test.lldbtest import * > from lldbsuite.test import lldbutil > > @@ -24,7 +23,6 @@ class ExprCommandCallStopContinueTestCas > '// Please test these expressions while stopped at this line:') > self.func_line = line_number('main.cpp', '{5, "five"}') > > -@expectedFlakeyDarwin("llvm.org/pr20274") > def test(self): > """Test gathering result from interrupted function call.""" > self.build() > > > ___ > 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] [lldb] r350163 - [TypeName] Simplify operator!=. NFCI.
Author: davide Date: Sun Dec 30 07:07:25 2018 New Revision: 350163 URL: http://llvm.org/viewvc/llvm-project?rev=350163&view=rev Log: [TypeName] Simplify operator!=. NFCI. Modified: lldb/trunk/source/Symbol/Type.cpp Modified: lldb/trunk/source/Symbol/Type.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Type.cpp?rev=350163&r1=350162&r2=350163&view=diff == --- lldb/trunk/source/Symbol/Type.cpp (original) +++ lldb/trunk/source/Symbol/Type.cpp Sun Dec 30 07:07:25 2018 @@ -710,11 +710,7 @@ bool TypeAndOrName::operator==(const Typ } bool TypeAndOrName::operator!=(const TypeAndOrName &other) const { - if (m_type_pair != other.m_type_pair) -return true; - if (m_type_name != other.m_type_name) -return true; - return false; + return !(*this == other); } ConstString TypeAndOrName::GetName() const { ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r350164 - [Type] Simplify operator!=. NFC.
Author: davide Date: Sun Dec 30 07:08:51 2018 New Revision: 350164 URL: http://llvm.org/viewvc/llvm-project?rev=350164&view=rev Log: [Type] Simplify operator!=. NFC. Modified: lldb/trunk/source/Symbol/Type.cpp Modified: lldb/trunk/source/Symbol/Type.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Type.cpp?rev=350164&r1=350163&r2=350164&view=diff == --- lldb/trunk/source/Symbol/Type.cpp (original) +++ lldb/trunk/source/Symbol/Type.cpp Sun Dec 30 07:08:51 2018 @@ -867,8 +867,7 @@ bool TypeImpl::operator==(const TypeImpl } bool TypeImpl::operator!=(const TypeImpl &rhs) const { - return m_static_type != rhs.m_static_type || - m_dynamic_type != rhs.m_dynamic_type; + return !(*this == rhs); } bool TypeImpl::IsValid() const { ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r350160 - [test] Remove flakiness decorator from TestObjCDynamicSBType
No problem, thanks! On Sun, Dec 30, 2018 at 5:11 PM Jonas Devlieghere wrote: > > > > On Sun, Dec 30, 2018 at 05:33 Davide Italiano wrote: >> >> Nice, thanks! >> There is a typo in the commit message, I assume? > > > Correct, I made a typo in the PR and then mindlessly copied the name of the > test. >> >> >> >> On Sun, Dec 30, 2018 at 7:13 AM Jonas Devlieghere via lldb-commits >> wrote: >> > >> > Author: jdevlieghere >> > Date: Sat Dec 29 22:10:03 2018 >> > New Revision: 350160 >> > >> > URL: http://llvm.org/viewvc/llvm-project?rev=350160&view=rev >> > Log: >> > [test] Remove flakiness decorator from TestObjCDynamicSBType >> > >> > The quoted bug report (llvm.org/PR20270) was closed in 2014. >> > >> > Modified: >> > >> > lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py >> > >> > Modified: >> > lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py >> > URL: >> > http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py?rev=350160&r1=350159&r2=350160&view=diff >> > == >> > --- >> > lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py >> > (original) >> > +++ >> > lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py >> > Sat Dec 29 22:10:03 2018 >> > @@ -6,7 +6,6 @@ from __future__ import print_function >> > >> > >> > import lldb >> > -from lldbsuite.test.decorators import * >> > from lldbsuite.test.lldbtest import * >> > from lldbsuite.test import lldbutil >> > >> > @@ -24,7 +23,6 @@ class ExprCommandCallStopContinueTestCas >> > '// Please test these expressions while stopped at this >> > line:') >> > self.func_line = line_number('main.cpp', '{5, "five"}') >> > >> > -@expectedFlakeyDarwin("llvm.org/pr20274") >> > def test(self): >> > """Test gathering result from interrupted function call.""" >> > self.build() >> > >> > >> > ___ >> > lldb-commits mailing list >> > lldb-commits@lists.llvm.org >> > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits > > -- > Sent from my iPhone ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r350177 - [DWARFUnit] Remove commented out code. NFCI.
Author: davide Date: Mon Dec 31 10:45:30 2018 New Revision: 350177 URL: http://llvm.org/viewvc/llvm-project?rev=350177&view=rev Log: [DWARFUnit] Remove commented out code. NFCI. Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp?rev=350177&r1=350176&r2=350177&view=diff == --- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp (original) +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp Mon Dec 31 10:45:30 2018 @@ -191,13 +191,6 @@ void DWARFUnit::ExtractDIEsRWLocked() { IsDWARF64()); while (offset < next_cu_offset && die.FastExtract(data, this, fixed_form_sizes, &offset)) { -//if (log) -//log->Printf("0x%8.8x: %*.*s%s%s", -//die.GetOffset(), -//depth * 2, depth * 2, "", -//DW_TAG_value_to_name (die.Tag()), -//die.HasChildren() ? " *" : ""); - const bool null_die = die.IsNULL(); if (depth == 0) { assert(m_die_array.empty() && "Compile unit DIE already added"); ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r350428 - [Scalar] Simplify comparison operators and add coverage.
Author: davide Date: Fri Jan 4 11:23:52 2019 New Revision: 350428 URL: http://llvm.org/viewvc/llvm-project?rev=350428&view=rev Log: [Scalar] Simplify comparison operators and add coverage. Modified: lldb/trunk/source/Utility/Scalar.cpp lldb/trunk/unittests/Utility/ScalarTest.cpp Modified: lldb/trunk/source/Utility/Scalar.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/Scalar.cpp?rev=350428&r1=350427&r2=350428&view=diff == --- lldb/trunk/source/Utility/Scalar.cpp (original) +++ lldb/trunk/source/Utility/Scalar.cpp Fri Jan 4 11:23:52 2019 @@ -2635,104 +2635,15 @@ bool lldb_private::operator<(const Scala } bool lldb_private::operator<=(const Scalar &lhs, const Scalar &rhs) { - if (lhs.m_type == Scalar::e_void || rhs.m_type == Scalar::e_void) -return false; - - Scalar temp_value; - const Scalar *a; - const Scalar *b; - llvm::APFloat::cmpResult result; - switch (PromoteToMaxType(lhs, rhs, temp_value, a, b)) { - case Scalar::e_void: -break; - case Scalar::e_sint: - case Scalar::e_slong: - case Scalar::e_slonglong: - case Scalar::e_sint128: - case Scalar::e_sint256: -return a->m_integer.sle(b->m_integer); - case Scalar::e_uint: - case Scalar::e_ulong: - case Scalar::e_ulonglong: - case Scalar::e_uint128: - case Scalar::e_uint256: -return a->m_integer.ule(b->m_integer); - case Scalar::e_float: - case Scalar::e_double: - case Scalar::e_long_double: -result = a->m_float.compare(b->m_float); -if (result == llvm::APFloat::cmpLessThan || -result == llvm::APFloat::cmpEqual) - return true; - } - return false; + return !(rhs < lhs); } bool lldb_private::operator>(const Scalar &lhs, const Scalar &rhs) { - if (lhs.m_type == Scalar::e_void || rhs.m_type == Scalar::e_void) -return false; - - Scalar temp_value; - const Scalar *a; - const Scalar *b; - llvm::APFloat::cmpResult result; - switch (PromoteToMaxType(lhs, rhs, temp_value, a, b)) { - case Scalar::e_void: -break; - case Scalar::e_sint: - case Scalar::e_slong: - case Scalar::e_slonglong: - case Scalar::e_sint128: - case Scalar::e_sint256: -return a->m_integer.sgt(b->m_integer); - case Scalar::e_uint: - case Scalar::e_ulong: - case Scalar::e_ulonglong: - case Scalar::e_uint128: - case Scalar::e_uint256: -return a->m_integer.ugt(b->m_integer); - case Scalar::e_float: - case Scalar::e_double: - case Scalar::e_long_double: -result = a->m_float.compare(b->m_float); -if (result == llvm::APFloat::cmpGreaterThan) - return true; - } - return false; + return rhs < lhs; } bool lldb_private::operator>=(const Scalar &lhs, const Scalar &rhs) { - if (lhs.m_type == Scalar::e_void || rhs.m_type == Scalar::e_void) -return false; - - Scalar temp_value; - const Scalar *a; - const Scalar *b; - llvm::APFloat::cmpResult result; - switch (PromoteToMaxType(lhs, rhs, temp_value, a, b)) { - case Scalar::e_void: -break; - case Scalar::e_sint: - case Scalar::e_slong: - case Scalar::e_slonglong: - case Scalar::e_sint128: - case Scalar::e_sint256: -return a->m_integer.sge(b->m_integer); - case Scalar::e_uint: - case Scalar::e_ulong: - case Scalar::e_ulonglong: - case Scalar::e_uint128: - case Scalar::e_uint256: -return a->m_integer.uge(b->m_integer); - case Scalar::e_float: - case Scalar::e_double: - case Scalar::e_long_double: -result = a->m_float.compare(b->m_float); -if (result == llvm::APFloat::cmpGreaterThan || -result == llvm::APFloat::cmpEqual) - return true; - } - return false; + return !(lhs < rhs); } bool Scalar::ClearBit(uint32_t bit) { Modified: lldb/trunk/unittests/Utility/ScalarTest.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Utility/ScalarTest.cpp?rev=350428&r1=350427&r2=350428&view=diff == --- lldb/trunk/unittests/Utility/ScalarTest.cpp (original) +++ lldb/trunk/unittests/Utility/ScalarTest.cpp Fri Jan 4 11:23:52 2019 @@ -47,6 +47,24 @@ TEST(ScalarTest, Equality) { ASSERT_FALSE(void1 == Scalar(f1)); } +TEST(ScalarTest, Comparison) { + auto s1 = Scalar(23); + auto s2 = Scalar(46); + ASSERT_TRUE(s1 < s2); + ASSERT_TRUE(s1 <= s2); + ASSERT_TRUE(s2 > s1); + ASSERT_TRUE(s2 >= s1); +} + +TEST(ScalarTest, ComparisonFloat) { + auto s1 = Scalar(23.0f); + auto s2 = Scalar(46.0f); + ASSERT_TRUE(s1 < s2); + ASSERT_TRUE(s1 <= s2); + ASSERT_TRUE(s2 > s1); + ASSERT_TRUE(s2 >= s1); +} + TEST(ScalarTest, RightShiftOperator) { int a = 0x1000; int b = 0x; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r332162 - [LLDB] Support GNU-style compressed debug sections (.zdebug)
Author: davide Date: Fri May 11 17:29:25 2018 New Revision: 332162 URL: http://llvm.org/viewvc/llvm-project?rev=332162&view=rev Log: [LLDB] Support GNU-style compressed debug sections (.zdebug) Patch by Erik Welander! Differential Revision: https://reviews.llvm.org/D45628 Added: lldb/trunk/packages/Python/lldbsuite/test/linux/compressed-debug-info/ lldb/trunk/packages/Python/lldbsuite/test/linux/compressed-debug-info/Makefile lldb/trunk/packages/Python/lldbsuite/test/linux/compressed-debug-info/TestCompressedDebugInfo.py lldb/trunk/packages/Python/lldbsuite/test/linux/compressed-debug-info/a.c Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Added: lldb/trunk/packages/Python/lldbsuite/test/linux/compressed-debug-info/Makefile URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/linux/compressed-debug-info/Makefile?rev=332162&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/linux/compressed-debug-info/Makefile (added) +++ lldb/trunk/packages/Python/lldbsuite/test/linux/compressed-debug-info/Makefile Fri May 11 17:29:25 2018 @@ -0,0 +1,16 @@ +LEVEL := ../../make + +C_SOURCES := a.c + +all: compressed.out compressed.gnu.out + +compressed.out: a.out + $(OBJCOPY) --compress-debug-sections=zlib $< $@ + +compressed.gnu.out: a.out + $(OBJCOPY) --compress-debug-sections=zlib-gnu $< $@ + +include $(LEVEL)/Makefile.rules + +clean:: + $(RM) -f a.o main compressed.out compressed.gnu.out Added: lldb/trunk/packages/Python/lldbsuite/test/linux/compressed-debug-info/TestCompressedDebugInfo.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/linux/compressed-debug-info/TestCompressedDebugInfo.py?rev=332162&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/linux/compressed-debug-info/TestCompressedDebugInfo.py (added) +++ lldb/trunk/packages/Python/lldbsuite/test/linux/compressed-debug-info/TestCompressedDebugInfo.py Fri May 11 17:29:25 2018 @@ -0,0 +1,46 @@ +""" Tests that compressed debug info sections are used. """ +import os +import lldb +import sys +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class TestCompressedDebugInfo(TestBase): + mydir = TestBase.compute_mydir(__file__) + + def setUp(self): +TestBase.setUp(self) + + @no_debug_info_test # Prevent the genaration of the dwarf version of this test + @skipUnlessPlatform(["linux"]) + def test_compressed_debug_info(self): +"""Tests that the 'frame variable' works with compressed debug info.""" + +self.build() +process = lldbutil.run_to_source_breakpoint( +self, "main", lldb.SBFileSpec("a.c"), exe_name="compressed.out")[1] + +# The process should be stopped at a breakpoint, and the z variable should +# be in the top frame. +self.assertTrue(process.GetState() == lldb.eStateStopped, +STOPPED_DUE_TO_BREAKPOINT) +frame = process.GetThreadAtIndex(0).GetFrameAtIndex(0) +self.assertTrue(frame.FindVariable("z").IsValid(), "z is not valid") + + @no_debug_info_test # Prevent the genaration of the dwarf version of this test + @skipUnlessPlatform(["linux"]) + def test_compressed_debug_info_gnu(self): +"""Tests that the 'frame variable' works with gnu-style compressed debug info.""" + +self.build() +process = lldbutil.run_to_source_breakpoint( +self, "main", lldb.SBFileSpec("a.c"), exe_name="compressed.gnu.out")[1] + +# The process should be stopped at a breakpoint, and the z variable should +# be in the top frame. +self.assertTrue(process.GetState() == lldb.eStateStopped, +STOPPED_DUE_TO_BREAKPOINT) +frame = process.GetThreadAtIndex(0).GetFrameAtIndex(0) +self.assertTrue(frame.FindVariable("z").IsValid(), "z is not valid") Added: lldb/trunk/packages/Python/lldbsuite/test/linux/compressed-debug-info/a.c URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/linux/compressed-debug-info/a.c?rev=332162&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/linux/compressed-debug-info/a.c (added) +++ lldb/trunk/packages/Python/lldbsuite/test/linux/compressed-debug-info/a.c Fri May 11 17:29:25 2018 @@ -0,0 +1,4 @@ +int main() { + int z = 2; + return z; +} Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp?rev=332162&r1=332161&r2=332162&view=diff == --- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (original) +++ lldb/trunk/source/Plugins/ObjectFile/ELF/Obj
[Lldb-commits] [lldb] r332163 - [LanguageRuntime/ObjC] Turn off ISA logging once and for all.
Author: davide Date: Fri May 11 17:33:12 2018 New Revision: 332163 URL: http://llvm.org/viewvc/llvm-project?rev=332163&view=rev Log: [LanguageRuntime/ObjC] Turn off ISA logging once and for all. On behalf of Jim, who's out today. Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp?rev=332163&r1=332162&r2=332163&view=diff == --- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp (original) +++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp Fri May 11 17:33:12 2018 @@ -1437,6 +1437,8 @@ uint32_t AppleObjCRuntimeV2::ParseClassI //} __attribute__((__packed__)); Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_TYPES)); + bool should_log = log && log->GetVerbose(); + uint32_t num_parsed = 0; // Iterate through all ClassInfo structures @@ -1445,7 +1447,7 @@ uint32_t AppleObjCRuntimeV2::ParseClassI ObjCISA isa = data.GetPointer(&offset); if (isa == 0) { - if (log && log->GetVerbose()) + if (should_log) log->Printf( "AppleObjCRuntimeV2 found NULL isa, ignoring this class info"); continue; @@ -1453,7 +1455,7 @@ uint32_t AppleObjCRuntimeV2::ParseClassI // Check if we already know about this ISA, if we do, the info will never // change, so we can just skip it. if (ISAIsCached(isa)) { - if (log) + if (should_log) log->Printf("AppleObjCRuntimeV2 found cached isa=0x%" PRIx64 ", ignoring this class info", isa); @@ -1464,14 +1466,14 @@ uint32_t AppleObjCRuntimeV2::ParseClassI ClassDescriptorSP descriptor_sp(new ClassDescriptorV2(*this, isa, NULL)); AddClass(isa, descriptor_sp, name_hash); num_parsed++; - if (log) + if (should_log) log->Printf("AppleObjCRuntimeV2 added isa=0x%" PRIx64 ", hash=0x%8.8x, name=%s", isa, name_hash, descriptor_sp->GetClassName().AsCString("")); } } - if (log) + if (should_log) log->Printf("AppleObjCRuntimeV2 parsed %" PRIu32 " class infos", num_parsed); return num_parsed; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r332162 - [LLDB] Support GNU-style compressed debug sections (.zdebug)
On Fri, May 11, 2018 at 5:29 PM, Davide Italiano via lldb-commits wrote: > Author: davide > Date: Fri May 11 17:29:25 2018 > New Revision: 332162 > > URL: http://llvm.org/viewvc/llvm-project?rev=332162&view=rev > Log: > [LLDB] Support GNU-style compressed debug sections (.zdebug) > > Patch by Erik Welander! > Erik, I'm going to revert this because it broke the ubuntu 14.04 bot. Please take a look and I'll recommit it for you once it's fixed. Log: http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/23184 Culprit: ``` Build Command Output: objcopy: option '--compress-debug-sections' doesn't allow an argument ``` ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r332165 - Revert "[LLDB] Support GNU-style compressed debug sections (.zdebug)"
Author: davide Date: Fri May 11 18:25:48 2018 New Revision: 332165 URL: http://llvm.org/viewvc/llvm-project?rev=332165&view=rev Log: Revert "[LLDB] Support GNU-style compressed debug sections (.zdebug)" This reverts commit r332162 as it breaks the bots (Ubuntu 14.04) with the following message: Build Command Output: objcopy: option '--compress-debug-sections' doesn't allow an argument Removed: lldb/trunk/packages/Python/lldbsuite/test/linux/compressed-debug-info/Makefile lldb/trunk/packages/Python/lldbsuite/test/linux/compressed-debug-info/TestCompressedDebugInfo.py lldb/trunk/packages/Python/lldbsuite/test/linux/compressed-debug-info/a.c Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Removed: lldb/trunk/packages/Python/lldbsuite/test/linux/compressed-debug-info/Makefile URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/linux/compressed-debug-info/Makefile?rev=332164&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/linux/compressed-debug-info/Makefile (original) +++ lldb/trunk/packages/Python/lldbsuite/test/linux/compressed-debug-info/Makefile (removed) @@ -1,16 +0,0 @@ -LEVEL := ../../make - -C_SOURCES := a.c - -all: compressed.out compressed.gnu.out - -compressed.out: a.out - $(OBJCOPY) --compress-debug-sections=zlib $< $@ - -compressed.gnu.out: a.out - $(OBJCOPY) --compress-debug-sections=zlib-gnu $< $@ - -include $(LEVEL)/Makefile.rules - -clean:: - $(RM) -f a.o main compressed.out compressed.gnu.out Removed: lldb/trunk/packages/Python/lldbsuite/test/linux/compressed-debug-info/TestCompressedDebugInfo.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/linux/compressed-debug-info/TestCompressedDebugInfo.py?rev=332164&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/linux/compressed-debug-info/TestCompressedDebugInfo.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/linux/compressed-debug-info/TestCompressedDebugInfo.py (removed) @@ -1,46 +0,0 @@ -""" Tests that compressed debug info sections are used. """ -import os -import lldb -import sys -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - - -class TestCompressedDebugInfo(TestBase): - mydir = TestBase.compute_mydir(__file__) - - def setUp(self): -TestBase.setUp(self) - - @no_debug_info_test # Prevent the genaration of the dwarf version of this test - @skipUnlessPlatform(["linux"]) - def test_compressed_debug_info(self): -"""Tests that the 'frame variable' works with compressed debug info.""" - -self.build() -process = lldbutil.run_to_source_breakpoint( -self, "main", lldb.SBFileSpec("a.c"), exe_name="compressed.out")[1] - -# The process should be stopped at a breakpoint, and the z variable should -# be in the top frame. -self.assertTrue(process.GetState() == lldb.eStateStopped, -STOPPED_DUE_TO_BREAKPOINT) -frame = process.GetThreadAtIndex(0).GetFrameAtIndex(0) -self.assertTrue(frame.FindVariable("z").IsValid(), "z is not valid") - - @no_debug_info_test # Prevent the genaration of the dwarf version of this test - @skipUnlessPlatform(["linux"]) - def test_compressed_debug_info_gnu(self): -"""Tests that the 'frame variable' works with gnu-style compressed debug info.""" - -self.build() -process = lldbutil.run_to_source_breakpoint( -self, "main", lldb.SBFileSpec("a.c"), exe_name="compressed.gnu.out")[1] - -# The process should be stopped at a breakpoint, and the z variable should -# be in the top frame. -self.assertTrue(process.GetState() == lldb.eStateStopped, -STOPPED_DUE_TO_BREAKPOINT) -frame = process.GetThreadAtIndex(0).GetFrameAtIndex(0) -self.assertTrue(frame.FindVariable("z").IsValid(), "z is not valid") Removed: lldb/trunk/packages/Python/lldbsuite/test/linux/compressed-debug-info/a.c URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/linux/compressed-debug-info/a.c?rev=332164&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/linux/compressed-debug-info/a.c (original) +++ lldb/trunk/packages/Python/lldbsuite/test/linux/compressed-debug-info/a.c (removed) @@ -1,4 +0,0 @@ -int main() { - int z = 2; - return z; -} Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp?rev=332165&r1=332164&r2=332165&view=diff == --- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (original) +++ lldb/trunk/source/Plugins/Object
Re: [Lldb-commits] [lldb] r332162 - [LLDB] Support GNU-style compressed debug sections (.zdebug)
On Fri, May 11, 2018 at 5:57 PM, Davide Italiano wrote: > On Fri, May 11, 2018 at 5:29 PM, Davide Italiano via lldb-commits > wrote: >> Author: davide >> Date: Fri May 11 17:29:25 2018 >> New Revision: 332162 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=332162&view=rev >> Log: >> [LLDB] Support GNU-style compressed debug sections (.zdebug) >> >> Patch by Erik Welander! >> > > Erik, I'm going to revert this because it broke the ubuntu 14.04 bot. > Please take a look and I'll recommit it for you once it's fixed. > > Log: > http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/23184 > > Culprit: > ``` > Build Command Output: > objcopy: option '--compress-debug-sections' doesn't allow an argument > ``` Reverted in r332165. Don't hesitate to ping me when you have a fix. -- Davide ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r333465 - [ObjC] Fix the formatter for NSOrderedSet.
Author: davide Date: Tue May 29 15:08:07 2018 New Revision: 333465 URL: http://llvm.org/viewvc/llvm-project?rev=333465&view=rev Log: [ObjC] Fix the formatter for NSOrderedSet. While I'm here, delete some dead code. Added: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/orderedset/ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/orderedset/TestOrderedSet.py lldb/trunk/packages/Python/lldbsuite/test/lang/objc/orderedset/main.m Modified: lldb/trunk/source/Plugins/Language/ObjC/NSSet.cpp Added: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/orderedset/TestOrderedSet.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/orderedset/TestOrderedSet.py?rev=333465&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/orderedset/TestOrderedSet.py (added) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/orderedset/TestOrderedSet.py Tue May 29 15:08:07 2018 @@ -0,0 +1,17 @@ +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + +class TestOrderedSet(TestBase): + mydir = TestBase.compute_mydir(__file__) + + def test_ordered_set(self): +self.build() +src_file = "main.m" +src_file_spec = lldb.SBFileSpec(src_file) +(target, process, thread, main_breakpoint) = lldbutil.run_to_source_breakpoint(self, + "break here", src_file_spec, exe_name = "a.out") +frame = thread.GetSelectedFrame() +self.expect("expr -d run -- orderedSet", substrs=["3 elements"]) +self.expect("expr -d run -- *orderedSet", substrs=["(int)1", "(int)2", "(int)3"]) Added: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/orderedset/main.m URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/orderedset/main.m?rev=333465&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/orderedset/main.m (added) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/orderedset/main.m Tue May 29 15:08:07 2018 @@ -0,0 +1,8 @@ +#import + +int main() { + NSOrderedSet *orderedSet = + [NSOrderedSet orderedSetWithArray:@[@1,@2,@3,@1]]; + NSLog(@"%@",orderedSet); + return 0; // break here +} Modified: lldb/trunk/source/Plugins/Language/ObjC/NSSet.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/NSSet.cpp?rev=333465&r1=333464&r2=333465&view=diff == --- lldb/trunk/source/Plugins/Language/ObjC/NSSet.cpp (original) +++ lldb/trunk/source/Plugins/Language/ObjC/NSSet.cpp Tue May 29 15:08:07 2018 @@ -269,7 +269,8 @@ bool lldb_private::formatters::NSSetSumm if (!class_name || !*class_name) return false; - if (!strcmp(class_name, "__NSSetI")) { + if (!strcmp(class_name, "__NSSetI") || + !strcmp(class_name, "__NSOrderedSetI")) { Status error; value = process_sp->ReadUnsignedIntegerFromMemory(valobj_addr + ptr_size, ptr_size, 0, error); @@ -289,32 +290,7 @@ bool lldb_private::formatters::NSSetSumm } if (error.Fail()) return false; - } - /*else if (!strcmp(class_name,"__NSCFSet")) - { - Status error; - value = process_sp->ReadUnsignedIntegerFromMemory(valobj_addr + (is_64bit ? - 20 : 12), 4, 0, error); - if (error.Fail()) - return false; - if (is_64bit) - value &= ~0x1fffUL; - } - else if (!strcmp(class_name,"NSCountedSet")) - { - Status error; - value = process_sp->ReadUnsignedIntegerFromMemory(valobj_addr + ptr_size, - ptr_size, 0, error); - if (error.Fail()) - return false; - value = process_sp->ReadUnsignedIntegerFromMemory(value + (is_64bit ? 20 : - 12), 4, 0, error); - if (error.Fail()) - return false; - if (is_64bit) - value &= ~0x1fffUL; - }*/ - else { + } else { auto &map(NSSet_Additionals::GetAdditionalSummaries()); auto iter = map.find(class_name_cs), end = map.end(); if (iter != end) @@ -371,7 +347,8 @@ lldb_private::formatters::NSSetSynthetic if (!class_name || !*class_name) return nullptr; - if (!strcmp(class_name, "__NSSetI")) { + if (!strcmp(class_name, "__NSSetI") || + !strcmp(class_name, "__NSOrderedSetI")) { return (new NSSetISyntheticFrontEnd(valobj_sp)); } else if (!strcmp(class_name, "__NSSetM")) { AppleObjCRuntime *apple_runtime = ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r333466 - [ObjC] Add a Makefile for the test added in r333465.
Author: davide Date: Tue May 29 15:20:05 2018 New Revision: 333466 URL: http://llvm.org/viewvc/llvm-project?rev=333466&view=rev Log: [ObjC] Add a Makefile for the test added in r333465. Not strictly necessary, but makes the test more robust in case we end up changing the defaults. Added: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/orderedset/Makefile Added: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/orderedset/Makefile URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/orderedset/Makefile?rev=333466&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/orderedset/Makefile (added) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/orderedset/Makefile Tue May 29 15:20:05 2018 @@ -0,0 +1,6 @@ +LEVEL = ../../../make + +OBJC_SOURCES := main.m +LDFLAGS = $(CFLAGS) -lobjc -framework Foundation + +include $(LEVEL)/Makefile.rules ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] buildbot failure in LLVM on lldb-x86_64-ubuntu-14.04-cmake
Pavel, this should be fixed now that I added a Makefile. Don't hesitate to revert in case it stays red (or fix it yourself, even better :) -- Davide On Tue, May 29, 2018 at 3:26 PM, wrote: > The Buildbot has detected a new failure on builder > lldb-x86_64-ubuntu-14.04-cmake while building lldb. > Full details are available at: > http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/23928 > > Buildbot URL: http://lab.llvm.org:8011/ > > Buildslave for this Build: lldb-build1-ubuntu-1404 > > Build Reason: scheduler > Build Source Stamp: [branch trunk] 333465 > Blamelist: davide > > BUILD FAILED: failed test1 test2 test3 test4 test5 test6 > > sincerely, > -The Buildbot > > > -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r333465 - [ObjC] Fix the formatter for NSOrderedSet.
I would like to apologize, I forgot to `git add `the Makefile and this broke the bots. It should be fixed now. I'll keep an eye to make sure everything stays green. Sorry for the disruption, folks! -- Davide On Tue, May 29, 2018 at 3:08 PM, Davide Italiano via lldb-commits wrote: > Author: davide > Date: Tue May 29 15:08:07 2018 > New Revision: 333465 > > URL: http://llvm.org/viewvc/llvm-project?rev=333465&view=rev > Log: > [ObjC] Fix the formatter for NSOrderedSet. > > While I'm here, delete some dead code. > > > > Added: > lldb/trunk/packages/Python/lldbsuite/test/lang/objc/orderedset/ > > lldb/trunk/packages/Python/lldbsuite/test/lang/objc/orderedset/TestOrderedSet.py > lldb/trunk/packages/Python/lldbsuite/test/lang/objc/orderedset/main.m > Modified: > lldb/trunk/source/Plugins/Language/ObjC/NSSet.cpp > > Added: > lldb/trunk/packages/Python/lldbsuite/test/lang/objc/orderedset/TestOrderedSet.py > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/orderedset/TestOrderedSet.py?rev=333465&view=auto > == > --- > lldb/trunk/packages/Python/lldbsuite/test/lang/objc/orderedset/TestOrderedSet.py > (added) > +++ > lldb/trunk/packages/Python/lldbsuite/test/lang/objc/orderedset/TestOrderedSet.py > Tue May 29 15:08:07 2018 > @@ -0,0 +1,17 @@ > +import lldb > +from lldbsuite.test.decorators import * > +from lldbsuite.test.lldbtest import * > +from lldbsuite.test import lldbutil > + > +class TestOrderedSet(TestBase): > + mydir = TestBase.compute_mydir(__file__) > + > + def test_ordered_set(self): > +self.build() > +src_file = "main.m" > +src_file_spec = lldb.SBFileSpec(src_file) > +(target, process, thread, main_breakpoint) = > lldbutil.run_to_source_breakpoint(self, > + "break here", src_file_spec, exe_name = "a.out") > +frame = thread.GetSelectedFrame() > +self.expect("expr -d run -- orderedSet", substrs=["3 elements"]) > +self.expect("expr -d run -- *orderedSet", substrs=["(int)1", "(int)2", > "(int)3"]) > > Added: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/orderedset/main.m > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/orderedset/main.m?rev=333465&view=auto > == > --- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/orderedset/main.m > (added) > +++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/orderedset/main.m Tue > May 29 15:08:07 2018 > @@ -0,0 +1,8 @@ > +#import > + > +int main() { > + NSOrderedSet *orderedSet = > + [NSOrderedSet orderedSetWithArray:@[@1,@2,@3,@1]]; > + NSLog(@"%@",orderedSet); > + return 0; // break here > +} > > Modified: lldb/trunk/source/Plugins/Language/ObjC/NSSet.cpp > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/NSSet.cpp?rev=333465&r1=333464&r2=333465&view=diff > == > --- lldb/trunk/source/Plugins/Language/ObjC/NSSet.cpp (original) > +++ lldb/trunk/source/Plugins/Language/ObjC/NSSet.cpp Tue May 29 15:08:07 2018 > @@ -269,7 +269,8 @@ bool lldb_private::formatters::NSSetSumm >if (!class_name || !*class_name) > return false; > > - if (!strcmp(class_name, "__NSSetI")) { > + if (!strcmp(class_name, "__NSSetI") || > + !strcmp(class_name, "__NSOrderedSetI")) { > Status error; > value = process_sp->ReadUnsignedIntegerFromMemory(valobj_addr + ptr_size, >ptr_size, 0, error); > @@ -289,32 +290,7 @@ bool lldb_private::formatters::NSSetSumm > } > if (error.Fail()) >return false; > - } > - /*else if (!strcmp(class_name,"__NSCFSet")) > - { > - Status error; > - value = process_sp->ReadUnsignedIntegerFromMemory(valobj_addr + (is_64bit > ? > - 20 : 12), 4, 0, error); > - if (error.Fail()) > - return false; > - if (is_64bit) > - value &= ~0x1fffUL; > - } > - else if (!strcmp(class_name,"NSCountedSet")) > - { > - Status error; > - value = process_sp->ReadUnsignedIntegerFromMemory(valobj_addr + ptr_size, > - ptr_size, 0, error); > - if (error.Fail()) > - return false; > - value = process_sp->ReadUnsignedIntegerFromMemory(value + (is_64bit ? 20 : > - 12), 4, 0, error); > - if
Re: [Lldb-commits] [lldb] r334320 - Delete some dead code
On Fri, Jun 8, 2018 at 2:13 PM, Alex Langford via lldb-commits wrote: > Author: xiaobai > Date: Fri Jun 8 14:13:26 2018 > New Revision: 334320 > > URL: http://llvm.org/viewvc/llvm-project?rev=334320&view=rev > Log: > Delete some dead code > Thanks! ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r334743 - Add a script to setup codesigning on macOS.
On Thu, Jun 14, 2018 at 11:04 AM, Frederic Riss via lldb-commits wrote: > Author: friss > Date: Thu Jun 14 11:04:13 2018 > New Revision: 334743 > > URL: http://llvm.org/viewvc/llvm-project?rev=334743&view=rev > Log: > Add a script to setup codesigning on macOS. > > I've been using this script on a couple machines and it seems to work > so I'm putting it out there, maybe other people will find it useful. > It is strongly inspired from a similar script in the delve project. > > Added: > lldb/trunk/scripts/macos-setup-codesign.sh (with props) > > Added: lldb/trunk/scripts/macos-setup-codesign.sh > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/macos-setup-codesign.sh?rev=334743&view=auto > == > --- lldb/trunk/scripts/macos-setup-codesign.sh (added) > +++ lldb/trunk/scripts/macos-setup-codesign.sh Thu Jun 14 11:04:13 2018 > @@ -0,0 +1,57 @@ > +#!/bin/bash > + > +CERT="lldb_codesign" > + > +function error() { > +echo error: "$@" > +exit 1 > +} > + > +function cleanup { > +# Remove generated files > +rm -f "$TMPDIR/$CERT.tmpl" "$TMPDIR/$CERT.cer" "$TMPDIR/$CERT.key" > > /dev/null 2>&1 > +} > + > +trap cleanup EXIT > + > +# Check if the certificate is already present in the system keychain > +security find-certificate -Z -p -c "$CERT" > /Library/Keychains/System.keychain > /dev/null 2>&1 > +if [ $? -eq 0 ]; then > +echo Certificate has already been generated and installed > +exit 0 > +fi > + > +# Create the certificate template > +cat <$TMPDIR/$CERT.tmpl > +[ req ] > +default_bits = 2048# RSA key size > +encrypt_key= no # Protect private key > +default_md = sha512 # MD to use > +prompt = no # Prompt for DN > +distinguished_name = codesign_dn # DN template > +[ codesign_dn ] > +commonName = "$CERT" > +[ codesign_reqext ] > +keyUsage = critical,digitalSignature > +extendedKeyUsage = critical,codeSigning > +EOF > + > +echo Generating and installing lldb_codesign certificate > + > +# Generate a new certificate > +openssl req -new -newkey rsa:2048 -x509 -days 3650 -nodes -config > "$TMPDIR/$CERT.tmpl" -extensions codesign_reqext -batch -out > "$TMPDIR/$CERT.cer" -keyout "$TMPDIR/$CERT.key" > /dev/null 2>&1 > +[ $? -eq 0 ] || error Something went wrong when generating the certificate > + > +# Install the certificate in the system keychain > +sudo security add-trusted-cert -d -r trustRoot -p codeSign -k > /Library/Keychains/System.keychain "$TMPDIR/$CERT.cer" > /dev/null 2>&1 > +[ $? -eq 0 ] || error Something went wrong when installing the certificate > + > +# Install the key for the certificate in the system keychain > +sudo security import "$TMPDIR/$CERT.key" -A -k > /Library/Keychains/System.keychain > /dev/null 2>&1 > +[ $? -eq 0 ] || error Something went wrong when installing the key > + > +# Kill task_for_pid access control daemon > +sudo pkill -f /usr/libexec/taskgated > /dev/null 2>&1 > + > +# Exit indicating the certificate is now generated and installed > +exit 0 > > Propchange: lldb/trunk/scripts/macos-setup-codesign.sh > -- > svn:executable = * > I just tested on my freshly installed OS and it works :) Thank you very much, I really quite didn't like the manual dance. Should we update code_signing.txt to point to this? (and fallback to the old manual method) Best, -- Davide ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r336158 - Re-sort the lldb.xcodeproj project file and commit the script
Thank you Jason! On Mon, Jul 2, 2018 at 5:48 PM Jason Molenda via lldb-commits wrote: > > Author: jmolenda > Date: Mon Jul 2 17:43:57 2018 > New Revision: 336158 > > URL: http://llvm.org/viewvc/llvm-project?rev=336158&view=rev > Log: > Re-sort the lldb.xcodeproj project file and commit the script > that I used to sort it to scripts/sort-pbxproj.rb. It turns > out that Xcode will perturb the order of the file lists > every time we add a file, following its own logic, and unfortunately > we'll still end up with lots of merge conflicts when that tries > to merge to the github swift repositories. We talked this over > and we're going to keep it in a canonical state by running this > script over it when Xcode tries to reorder it. > > Added: > lldb/trunk/scripts/sort-pbxproj.rb (with props) > Modified: > lldb/trunk/lldb.xcodeproj/project.pbxproj > > ___ > 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] [lldb] r336463 - [test-suite] Add a decorator for the lack of libstdcxx on the system.
Author: davide Date: Fri Jul 6 13:40:00 2018 New Revision: 336463 URL: http://llvm.org/viewvc/llvm-project?rev=336463&view=rev Log: [test-suite] Add a decorator for the lack of libstdcxx on the system. This generalizes a bunch of target-specific tests. MacOS has no libstdcxx anymore, and neither does FreeBSD (or Windows). Modified: lldb/trunk/packages/Python/lldbsuite/test/decorators.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/smart_ptr/TestDataFormatterStdSmartPtr.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/TestDataFormatterStdTuple.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/TestDataFormatterStdUniquePtr.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py Modified: lldb/trunk/packages/Python/lldbsuite/test/decorators.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/decorators.py?rev=336463&r1=336462&r2=336463&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/decorators.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/decorators.py Fri Jul 6 13:40:00 2018 @@ -687,6 +687,18 @@ def skipUnlessSupportedTypeAttribute(att return None return skipTestIfFn(compiler_doesnt_support_struct_attribute) +def skipUnlessLibstdcxxAvailable(func): +"""Decorate the item to skip test unless libstdc++ is available on the system.""" +def compiler_doesnt_support_libstdcxx(self): +compiler_path = self.getCompiler() +f = tempfile.NamedTemporaryFile() +f = tempfile.NamedTemporaryFile() +cmd = "echo '#include | %s -x c++ -stdlib=libstdc++ -o %s -" % (compiler_path, f.name) +if os.popen(cmd).close() is not None: +return "libstdcxx not available on the sytem" +return None +return skipTestIfFn(compiler_doesnt_support_libstdcxx)(func) + def skipUnlessThreadSanitizer(func): """Decorate the item to skip test unless Clang -fsanitize=thread is supported.""" Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py?rev=336463&r1=336462&r2=336463&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py Fri Jul 6 13:40:00 2018 @@ -23,8 +23,7 @@ class StdIteratorDataFormatterTestCase(T # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') -@skipIfWindows # libstdcpp not ported to Windows -@skipIfwatchOS # libstdcpp not ported to watchos +@skipUnlessLibstdcxxAvailable def test_with_run_command(self): """Test that libstdcpp iterators format properly.""" self.build() Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py?rev=336463&r1=336462&r2=336463&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdL
[Lldb-commits] [lldb] r336607 - [ObjCRuntime] Add support for obfuscation in tagged pointers.
Author: davide Date: Mon Jul 9 14:53:43 2018 New Revision: 336607 URL: http://llvm.org/viewvc/llvm-project?rev=336607&view=rev Log: [ObjCRuntime] Add support for obfuscation in tagged pointers. This is the default in MacOS Mojave. No testcases, as basically we have a lot of coverage (and the testsuite fails quite a bit without this change in Beta 3). Thanks to Fred Riss for helping me with this patch (fixing bugs/nondeterminism). Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp?rev=336607&r1=336606&r2=336607&view=diff == --- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp (original) +++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp Mon Jul 9 14:53:43 2018 @@ -283,6 +283,10 @@ bool AppleObjCRuntimeV1::ClassDescriptor return false; } +lldb::addr_t AppleObjCRuntimeV1::GetTaggedPointerObfuscator() { + return 0; +} + lldb::addr_t AppleObjCRuntimeV1::GetISAHashTablePointer() { if (m_isa_hash_table_ptr == LLDB_INVALID_ADDRESS) { ModuleSP objc_module_sp(GetObjCModule()); Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h?rev=336607&r1=336606&r2=336607&view=diff == --- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h (original) +++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h Mon Jul 9 14:53:43 2018 @@ -45,6 +45,8 @@ public: } } + lldb::addr_t GetTaggedPointerObfuscator(); + class ClassDescriptorV1 : public ObjCLanguageRuntime::ClassDescriptor { public: ClassDescriptorV1(ValueObject &isa_pointer); Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp?rev=336607&r1=336606&r2=336607&view=diff == --- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp (original) +++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp Mon Jul 9 14:53:43 2018 @@ -384,7 +384,9 @@ AppleObjCRuntimeV2::AppleObjCRuntimeV2(P m_get_class_info_args_mutex(), m_get_shared_cache_class_info_code(), m_get_shared_cache_class_info_args(LLDB_INVALID_ADDRESS), m_get_shared_cache_class_info_args_mutex(), m_decl_vendor_ap(), - m_isa_hash_table_ptr(LLDB_INVALID_ADDRESS), m_hash_signature(), + m_tagged_pointer_obfuscator(LLDB_INVALID_ADDRESS), + m_isa_hash_table_ptr(LLDB_INVALID_ADDRESS), + m_hash_signature(), m_has_object_getClass(false), m_loaded_objc_opt(false), m_non_pointer_isa_cache_ap( NonPointerISACache::CreateInstance(*this, objc_module_sp)), @@ -1196,6 +1198,38 @@ AppleObjCRuntimeV2::GetClassDescriptor(V return objc_class_sp; } +lldb::addr_t AppleObjCRuntimeV2::GetTaggedPointerObfuscator() { + if (m_tagged_pointer_obfuscator != LLDB_INVALID_ADDRESS) +return m_tagged_pointer_obfuscator; + + + Process *process = GetProcess(); + ModuleSP objc_module_sp(GetObjCModule()); + + if (!objc_module_sp) +return LLDB_INVALID_ADDRESS; + + static ConstString g_gdb_objc_obfuscator("objc_debug_taggedpointer_obfuscator"); + + const Symbol *symbol = objc_module_sp->FindFirstSymbolWithNameAndType( + g_gdb_objc_obfuscator, lldb::eSymbolTypeAny); + if (symbol) { +lldb::addr_t g_gdb_obj_obfuscator_ptr = + symbol->GetLoadAddress(&process->GetTarget()); + +if (g_gdb_obj_obfuscator_ptr != LLDB_INVALID_ADDRESS) { + Status error; + m_tagged_pointer_obfuscator = process->ReadPointerFromMemory( +g_gdb_obj_obfuscator_ptr, error); +} + } + // If we don't have a correct value at this point, there must be no obfuscation. + if (m_tagged_pointer_obfuscator == LLDB_INVALID_ADDRESS) +m_tagged_pointer_obfuscator = 0; + + return m_tagged_pointer_obfuscator; +} + lldb::addr_t AppleObjCRuntimeV2::GetISAHashTablePointer() { if (m_isa_hash_table_ptr == LLDB_INVALID_ADDR
[Lldb-commits] [lldb] r336608 - Rollback [test-suite] Add a decorator for the lack of libstdcxx on the system.
Author: davide Date: Mon Jul 9 14:56:28 2018 New Revision: 336608 URL: http://llvm.org/viewvc/llvm-project?rev=336608&view=rev Log: Rollback [test-suite] Add a decorator for the lack of libstdcxx on the system. Pavel suggested an alternative approach that I'll try to implement. Modified: lldb/trunk/packages/Python/lldbsuite/test/decorators.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/smart_ptr/TestDataFormatterStdSmartPtr.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/TestDataFormatterStdTuple.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/TestDataFormatterStdUniquePtr.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py Modified: lldb/trunk/packages/Python/lldbsuite/test/decorators.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/decorators.py?rev=336608&r1=336607&r2=336608&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/decorators.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/decorators.py Mon Jul 9 14:56:28 2018 @@ -687,18 +687,6 @@ def skipUnlessSupportedTypeAttribute(att return None return skipTestIfFn(compiler_doesnt_support_struct_attribute) -def skipUnlessLibstdcxxAvailable(func): -"""Decorate the item to skip test unless libstdc++ is available on the system.""" -def compiler_doesnt_support_libstdcxx(self): -compiler_path = self.getCompiler() -f = tempfile.NamedTemporaryFile() -f = tempfile.NamedTemporaryFile() -cmd = "echo '#include | %s -x c++ -stdlib=libstdc++ -o %s -" % (compiler_path, f.name) -if os.popen(cmd).close() is not None: -return "libstdcxx not available on the sytem" -return None -return skipTestIfFn(compiler_doesnt_support_libstdcxx)(func) - def skipUnlessThreadSanitizer(func): """Decorate the item to skip test unless Clang -fsanitize=thread is supported.""" Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py?rev=336608&r1=336607&r2=336608&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py Mon Jul 9 14:56:28 2018 @@ -23,7 +23,8 @@ class StdIteratorDataFormatterTestCase(T # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') -@skipUnlessLibstdcxxAvailable +@skipIfWindows # libstdcpp not ported to Windows +@skipIfwatchOS # libstdcpp not ported to watchos def test_with_run_command(self): """Test that libstdcpp iterators format properly.""" self.build() Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py?rev=336608&r1=336607&r2=336608&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py Mon Jul 9 14:56:28 2018 @@ -27,7 +27,8
[Lldb-commits] [lldb] r336724 - [testsuite] Implement a category to skip libstdcxx tests
Author: davide Date: Tue Jul 10 13:37:24 2018 New Revision: 336724 URL: http://llvm.org/viewvc/llvm-project?rev=336724&view=rev Log: [testsuite] Implement a category to skip libstdcxx tests On systems where it's not supported. As far as I understand Linux is the only systems which now ships with libstdcxx (maybe NetBSD?, but I'm not entirely sure of the state of lldb on the platform). We could make this more fine grained looking for the header as we do for libcxx. This is a little tricky as there's no such thing as /usr/include/c++/v1, but libstdcxx encodes the version number in the path (i.e. /usr/include/c++/5.4). I guess we might match a regex, but it seems fragile to me. Differential Revision: https://reviews.llvm.org/D49110 Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/smart_ptr/TestDataFormatterStdSmartPtr.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/TestDataFormatterStdTuple.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/TestDataFormatterStdUniquePtr.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py lldb/trunk/packages/Python/lldbsuite/test/test_categories.py Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=336724&r1=336723&r2=336724&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Tue Jul 10 13:37:24 2018 @@ -1104,6 +1104,23 @@ def checkLibcxxSupport(): print("Libc++ tests will not be run because: " + reason) configuration.skipCategories.append("libc++") +def canRunLibstdcxxTests(): +from lldbsuite.test import lldbplatformutil + +platform = lldbplatformutil.getPlatform() +if platform == "linux": + return True, "libstdcxx always present" +return False, "Don't know how to build with libstdcxx on %s" % platform + +def checkLibstdcxxSupport(): +result, reason = canRunLibstdcxxTests() +if result: +return # libstdcxx supported +if "libstdcxx" in configuration.categoriesList: +return # libstdcxx category explicitly requested, let it run. +print("libstdcxx tests will not be run because: " + reason) +configuration.skipCategories.append("libstdcxx") + def checkDebugInfoSupport(): import lldb @@ -1228,6 +1245,7 @@ def run_suite(): target_platform = lldb.DBG.GetSelectedPlatform().GetTriple().split('-')[2] checkLibcxxSupport() +checkLibstdcxxSupport() checkDebugInfoSupport() # Don't do debugserver tests on anything except OS X. Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py?rev=336724&r1=336723&r2=336724&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py Tue Jul 10 13:37:24 2018 @@ -23,8 +23,7 @@ class StdIteratorDataFormatterTestCase(T # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') -@skipIfWindows # libstdcpp not ported to Windows -@skipIfwatchOS # libstdcpp not ported to watchos +@add_test_categories(["libstdcxx"]) def test_with_run_command(self): """Test that libstdcpp iterators format properly.""" self.build() Modified:
[Lldb-commits] [lldb] r336872 - [IRInterpreter] Fix misevaluation of interpretation expressions with `urem`.
Author: davide Date: Wed Jul 11 17:31:04 2018 New Revision: 336872 URL: http://llvm.org/viewvc/llvm-project?rev=336872&view=rev Log: [IRInterpreter] Fix misevaluation of interpretation expressions with `urem`. Scalar::MakeUnsigned was implemented incorrectly so it didn't really change the sign of the type (leaving signed types signed). This showed up as a misevaluation when IR-interpreting urem but it's likely to arise in other contexts. This commit fixes the definition, and adds a test to make sure this won't regress in future (hopefully). Fixes rdar://problem/42038760 and LLVM PR38076 Differential Revision: https://reviews.llvm.org/D49155 Added: lldb/trunk/packages/Python/lldbsuite/test/expression_command/rdar42038760/ lldb/trunk/packages/Python/lldbsuite/test/expression_command/rdar42038760/Makefile lldb/trunk/packages/Python/lldbsuite/test/expression_command/rdar42038760/TestScalarURem.py lldb/trunk/packages/Python/lldbsuite/test/expression_command/rdar42038760/main.c Modified: lldb/trunk/source/Core/Scalar.cpp Added: lldb/trunk/packages/Python/lldbsuite/test/expression_command/rdar42038760/Makefile URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/rdar42038760/Makefile?rev=336872&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/expression_command/rdar42038760/Makefile (added) +++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/rdar42038760/Makefile Wed Jul 11 17:31:04 2018 @@ -0,0 +1,3 @@ +LEVEL = ../../make +C_SOURCES := main.c +include $(LEVEL)/Makefile.rules Added: lldb/trunk/packages/Python/lldbsuite/test/expression_command/rdar42038760/TestScalarURem.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/rdar42038760/TestScalarURem.py?rev=336872&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/expression_command/rdar42038760/TestScalarURem.py (added) +++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/rdar42038760/TestScalarURem.py Wed Jul 11 17:31:04 2018 @@ -0,0 +1,4 @@ +from lldbsuite.test import lldbinline +from lldbsuite.test import decorators + +lldbinline.MakeInlineTest(__file__, globals(), None) Added: lldb/trunk/packages/Python/lldbsuite/test/expression_command/rdar42038760/main.c URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/rdar42038760/main.c?rev=336872&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/expression_command/rdar42038760/main.c (added) +++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/rdar42038760/main.c Wed Jul 11 17:31:04 2018 @@ -0,0 +1,19 @@ +// Make sure we IR-interpret the expression correctly. + +typedef unsigned int uint32_t; +struct S0 { + signed f2; +}; +static g_463 = 0x1561983AL; +void func_1(void) +{ + struct S0 l_19; + l_19.f2 = 419; + uint32_t l_4037 = 4294967295UL; + l_19.f2 = g_463; //%self.expect("expr ((l_4037 % (-(g_463))) | l_19.f2)", substrs=['(unsigned int) $0 = 358717883']) +} +int main() +{ + func_1(); + return 0; +} Modified: lldb/trunk/source/Core/Scalar.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Scalar.cpp?rev=336872&r1=336871&r2=336872&view=diff == --- lldb/trunk/source/Core/Scalar.cpp (original) +++ lldb/trunk/source/Core/Scalar.cpp Wed Jul 11 17:31:04 2018 @@ -1184,38 +1184,38 @@ bool Scalar::MakeUnsigned() { case e_void: break; case e_sint: +m_type = e_uint; success = true; break; case e_uint: -m_type = e_uint; success = true; break; case e_slong: +m_type = e_ulong; success = true; break; case e_ulong: -m_type = e_ulong; success = true; break; case e_slonglong: +m_type = e_ulonglong; success = true; break; case e_ulonglong: -m_type = e_ulonglong; success = true; break; case e_sint128: +m_type = e_uint128; success = true; break; case e_uint128: -m_type = e_uint128; success = true; break; case e_sint256: +m_type = e_uint256; success = true; break; case e_uint256: -m_type = e_uint256; success = true; break; case e_float: ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r337959 - [DataFormatters] Add formatter for C++17 std::optional.
Author: davide Date: Wed Jul 25 13:46:29 2018 New Revision: 337959 URL: http://llvm.org/viewvc/llvm-project?rev=337959&view=rev Log: [DataFormatters] Add formatter for C++17 std::optional. Patch by Shafik Yaghmour. Differential Revision: https://reviews.llvm.org/D49271 Added: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/Makefile lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/TestDataFormatterLibcxxOptional.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/main.cpp lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxOptional.cpp Added: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/Makefile URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/Makefile?rev=337959&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/Makefile (added) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/Makefile Wed Jul 25 13:46:29 2018 @@ -0,0 +1,7 @@ +LEVEL = ../../../../../make + +CXX_SOURCES := main.cpp + +USE_LIBCPP := 1 +include $(LEVEL)/Makefile.rules +CXXFLAGS += -std=c++17 Added: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/TestDataFormatterLibcxxOptional.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/TestDataFormatterLibcxxOptional.py?rev=337959&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/TestDataFormatterLibcxxOptional.py (added) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/TestDataFormatterLibcxxOptional.py Wed Jul 25 13:46:29 2018 @@ -0,0 +1,59 @@ +""" +Test lldb data formatter subsystem. +""" + +from __future__ import print_function + + +import os +import time +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class LibcxxOptionalDataFormatterTestCase(TestBase): + +mydir = TestBase.compute_mydir(__file__) + +@add_test_categories(["libc++"]) + +def test_with_run_command(self): +"""Test that that file and class static variables display correctly.""" +self.build() +self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET) + +bkpt = self.target().FindBreakpointByID( +lldbutil.run_break_set_by_source_regexp( +self, "break here")) + +self.runCmd("run", RUN_SUCCEEDED) + +# The stop reason of the thread should be breakpoint. +self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT, +substrs=['stopped', + 'stop reason = breakpoint']) + +self.expect("frame variable number_not_engaged", +substrs=['Has Value=false']) + +self.expect("frame variable number_engaged", +substrs=['Has Value=true', + 'Value = 42', + '}']) + +self.expect("frame var numbers", +substrs=['(optional_int_vect) numbers = Has Value=true {', + 'Value = size=4 {', + '[0] = 1', + '[1] = 2', + '[2] = 3', + '[3] = 4', + '}', + '}']) + +self.expect("frame var ostring", +substrs=['(optional_string) ostring = Has Value=true {', +'Value = "hello"', +'}']) Added: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/main.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/main.cpp?rev=337959&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/main.cpp (added) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-forma
[Lldb-commits] [lldb] r337963 - Revert "[DataFormatters] Add formatter for C++17 std::optional."
Author: davide Date: Wed Jul 25 14:18:20 2018 New Revision: 337963 URL: http://llvm.org/viewvc/llvm-project?rev=337963&view=rev Log: Revert "[DataFormatters] Add formatter for C++17 std::optional." I forgot to git add some files. I'm going to recommit the correct version at once soon. Removed: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/ lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxOptional.cpp Removed: lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxOptional.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxOptional.cpp?rev=337962&view=auto == --- lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxOptional.cpp (original) +++ lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxOptional.cpp (removed) @@ -1,85 +0,0 @@ -//===-- LibCxxOptional.cpp --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===--===// - -#include "LibCxx.h" -#include "lldb/DataFormatters/FormattersHelpers.h" - -using namespace lldb; -using namespace lldb_private; - -namespace { - -class OptionalFrontEnd : public SyntheticChildrenFrontEnd { -public: - OptionalFrontEnd(ValueObject &valobj) : SyntheticChildrenFrontEnd(valobj) { -Update(); - } - - size_t GetIndexOfChildWithName(const ConstString &name) override { -return formatters::ExtractIndexFromString(name.GetCString()); - } - - bool MightHaveChildren() override { return true; } - bool Update() override; - size_t CalculateNumChildren() override { return m_size; } - ValueObjectSP GetChildAtIndex(size_t idx) override; - -private: - size_t m_size = 0; - ValueObjectSP m_base_sp; -}; -} // namespace - -bool OptionalFrontEnd::Update() { - ValueObjectSP engaged_sp( - m_backend.GetChildMemberWithName(ConstString("__engaged_"), true)); - - if (!engaged_sp) -return false; - - // __engaged_ is a bool flag and is true if the optional contains a value. - // Converting it to unsigned gives us a size of 1 if it contains a value - // and 0 if not. - m_size = engaged_sp->GetValueAsUnsigned(0); - - return false; -} - -ValueObjectSP OptionalFrontEnd::GetChildAtIndex(size_t idx) { - if (idx >= m_size) -return ValueObjectSP(); - - // __val_ contains the underlying value of an optional if it has one. - // Currently because it is part of an anonymous union GetChildMemberWithName() - // does not peer through and find it unless we are at the parent itself. - // We can obtain the parent through __engaged_. - ValueObjectSP val_sp( - m_backend.GetChildMemberWithName(ConstString("__engaged_"), true) - ->GetParent() - ->GetChildAtIndex(0, true) - ->GetChildMemberWithName(ConstString("__val_"), true)); - - if (!val_sp) -return ValueObjectSP(); - - CompilerType holder_type = val_sp->GetCompilerType(); - - if (!holder_type) -return ValueObjectSP(); - - return val_sp->Clone(ConstString(llvm::formatv("Value").str())); -} - -SyntheticChildrenFrontEnd * -formatters::LibcxxOptionalFrontEndCreator(CXXSyntheticChildren *, - lldb::ValueObjectSP valobj_sp) { - if (valobj_sp) -return new OptionalFrontEnd(*valobj_sp); - return nullptr; -} ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r338156 - Recommit [DataFormatters] Add formatter for C++17 std::optional.
Author: davide Date: Fri Jul 27 12:57:30 2018 New Revision: 338156 URL: http://llvm.org/viewvc/llvm-project?rev=338156&view=rev Log: Recommit [DataFormatters] Add formatter for C++17 std::optional. This should have all the correct files now. Patch by Shafik Yaghmour. Differential Revision: https://reviews.llvm.org/D49271 Added: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/Makefile lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/TestDataFormatterLibcxxOptional.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/main.cpp lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxOptional.cpp Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj lldb/trunk/source/Plugins/Language/CPlusPlus/CMakeLists.txt lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxx.cpp lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxx.h Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=338156&r1=338155&r2=338156&view=diff == --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original) +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Fri Jul 27 12:57:30 2018 @@ -388,6 +388,7 @@ 945261C11B9A11FC00BF138D /* LibCxxInitializerList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 945261B71B9A11E800BF138D /* LibCxxInitializerList.cpp */; }; 945261C21B9A11FC00BF138D /* LibCxxList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 945261B81B9A11E800BF138D /* LibCxxList.cpp */; }; 945261C31B9A11FC00BF138D /* LibCxxMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 945261B91B9A11E800BF138D /* LibCxxMap.cpp */; }; + E4A63A9120F55D28000D9548 /* LibCxxOptional.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4A63A9020F55D27000D9548 /* LibCxxOptional.cpp */; }; AF9FF1F71FAA79FE00474976 /* LibCxxQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF9FF1F61FAA79FE00474976 /* LibCxxQueue.cpp */; }; AF9FF1F51FAA79A400474976 /* LibCxxTuple.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF9FF1F41FAA79A400474976 /* LibCxxTuple.cpp */; }; 945261C41B9A11FC00BF138D /* LibCxxUnorderedMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 945261BA1B9A11E800BF138D /* LibCxxUnorderedMap.cpp */; }; @@ -2000,6 +2001,7 @@ 945261B71B9A11E800BF138D /* LibCxxInitializerList.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxInitializerList.cpp; path = Language/CPlusPlus/LibCxxInitializerList.cpp; sourceTree = ""; }; 945261B81B9A11E800BF138D /* LibCxxList.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxList.cpp; path = Language/CPlusPlus/LibCxxList.cpp; sourceTree = ""; }; 945261B91B9A11E800BF138D /* LibCxxMap.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxMap.cpp; path = Language/CPlusPlus/LibCxxMap.cpp; sourceTree = ""; }; + E4A63A9020F55D27000D9548 /* LibCxxOptional.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxOptional.cpp; path = Language/CPlusPlus/LibCxxOptional.cpp; sourceTree = ""; }; AF9FF1F61FAA79FE00474976 /* LibCxxQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxQueue.cpp; path = Language/CPlusPlus/LibCxxQueue.cpp; sourceTree = ""; }; AF9FF1F41FAA79A400474976 /* LibCxxTuple.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxTuple.cpp; path = Language/CPlusPlus/LibCxxTuple.cpp; sourceTree = ""; }; 945261BA1B9A11E800BF138D /* LibCxxUnorderedMap.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxUnorderedMap.cpp; path = Language/CPlusPlus/LibCxxUnorderedMap.cpp; sourceTree = ""; }; @@ -6351,6 +6353,7 @@ 945261B71B9A11E800BF138D /* LibCxxInitializerList.cpp */, 945261B81B9A11E800BF138D /* LibCxxList.cpp */, 945261B91B9A11E800BF138D /* LibCxxMap.cpp */, + E4A63A9020F55D27000D9548 /* LibCxxOptional.cpp */, AF9FF1F61FAA79FE00474976 /* LibCxxQueue.cpp */, AF9FF1F41FAA79A400474976 /* LibCxxTuple.cpp */, 945261BA1B9
[Lldb-commits] [lldb] r338162 - Revert "Recommit [DataFormatters] Add formatter for C++17 std::optional."
Author: davide Date: Fri Jul 27 13:38:01 2018 New Revision: 338162 URL: http://llvm.org/viewvc/llvm-project?rev=338162&view=rev Log: Revert "Recommit [DataFormatters] Add formatter for C++17 std::optional." This broke a linux bot which doesn't support -std=c++17. The solution is to add a decorator to skip these tests on machines with older compilers. Removed: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/ lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxOptional.cpp Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj lldb/trunk/source/Plugins/Language/CPlusPlus/CMakeLists.txt lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxx.cpp lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxx.h Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=338162&r1=338161&r2=338162&view=diff == --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original) +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Fri Jul 27 13:38:01 2018 @@ -388,7 +388,6 @@ 945261C11B9A11FC00BF138D /* LibCxxInitializerList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 945261B71B9A11E800BF138D /* LibCxxInitializerList.cpp */; }; 945261C21B9A11FC00BF138D /* LibCxxList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 945261B81B9A11E800BF138D /* LibCxxList.cpp */; }; 945261C31B9A11FC00BF138D /* LibCxxMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 945261B91B9A11E800BF138D /* LibCxxMap.cpp */; }; - E4A63A9120F55D28000D9548 /* LibCxxOptional.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4A63A9020F55D27000D9548 /* LibCxxOptional.cpp */; }; AF9FF1F71FAA79FE00474976 /* LibCxxQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF9FF1F61FAA79FE00474976 /* LibCxxQueue.cpp */; }; AF9FF1F51FAA79A400474976 /* LibCxxTuple.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF9FF1F41FAA79A400474976 /* LibCxxTuple.cpp */; }; 945261C41B9A11FC00BF138D /* LibCxxUnorderedMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 945261BA1B9A11E800BF138D /* LibCxxUnorderedMap.cpp */; }; @@ -2001,7 +2000,6 @@ 945261B71B9A11E800BF138D /* LibCxxInitializerList.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxInitializerList.cpp; path = Language/CPlusPlus/LibCxxInitializerList.cpp; sourceTree = ""; }; 945261B81B9A11E800BF138D /* LibCxxList.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxList.cpp; path = Language/CPlusPlus/LibCxxList.cpp; sourceTree = ""; }; 945261B91B9A11E800BF138D /* LibCxxMap.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxMap.cpp; path = Language/CPlusPlus/LibCxxMap.cpp; sourceTree = ""; }; - E4A63A9020F55D27000D9548 /* LibCxxOptional.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxOptional.cpp; path = Language/CPlusPlus/LibCxxOptional.cpp; sourceTree = ""; }; AF9FF1F61FAA79FE00474976 /* LibCxxQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxQueue.cpp; path = Language/CPlusPlus/LibCxxQueue.cpp; sourceTree = ""; }; AF9FF1F41FAA79A400474976 /* LibCxxTuple.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxTuple.cpp; path = Language/CPlusPlus/LibCxxTuple.cpp; sourceTree = ""; }; 945261BA1B9A11E800BF138D /* LibCxxUnorderedMap.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxUnorderedMap.cpp; path = Language/CPlusPlus/LibCxxUnorderedMap.cpp; sourceTree = ""; }; @@ -6353,7 +6351,6 @@ 945261B71B9A11E800BF138D /* LibCxxInitializerList.cpp */, 945261B81B9A11E800BF138D /* LibCxxList.cpp */, 945261B91B9A11E800BF138D /* LibCxxMap.cpp */, - E4A63A9020F55D27000D9548 /* LibCxxOptional.cpp */, AF9FF1F61FAA79FE00474976 /* LibCxxQueue.cpp */, AF9FF1F41FAA79A400474976 /* LibCxxTuple.cpp */, 945261BA1B9A11E800BF138D /* LibCxxUnorderedMap.cpp */, @@ -8048,7 +8045,6 @@ AF26703B1852D01E00B6CC36 /* QueueList.cpp in Sources */, 267C012B136880DF006E963E /* OptionGroupValueObjectDisplay.cpp in Sources */, 49CA96FE1E6AACC900C03FEE /* DataEncoder.cpp in Sources */, -
[Lldb-commits] [lldb] r338638 - [DWARFASTParser] Remove special cases for `llvm-gcc`
Author: davide Date: Wed Aug 1 14:13:45 2018 New Revision: 338638 URL: http://llvm.org/viewvc/llvm-project?rev=338638&view=rev Log: [DWARFASTParser] Remove special cases for `llvm-gcc` Reviewed by: aprantl, labath. Differential Revision: https://reviews.llvm.org/D48500 Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp?rev=338638&r1=338637&r2=338638&view=diff == --- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp (original) +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp Wed Aug 1 14:13:45 2018 @@ -307,14 +307,7 @@ TypeSP DWARFASTParserClang::ParseTypeFro decl.SetColumn(form_value.Unsigned()); break; case DW_AT_name: - type_name_cstr = form_value.AsCString(); -// Work around a bug in llvm-gcc where they give a name to a -// reference type which doesn't include the "&"... -if (tag == DW_TAG_reference_type) { - if (strchr(type_name_cstr, '&') == NULL) -type_name_cstr = NULL; -} if (type_name_cstr) type_name_const_str.SetCString(type_name_cstr); break; @@ -558,16 +551,9 @@ TypeSP DWARFASTParserClang::ParseTypeFro if (attributes.ExtractFormValueAtIndex(i, form_value)) { switch (attr) { case DW_AT_decl_file: -if (die.GetCU()->DW_AT_decl_file_attributes_are_invalid()) { - // llvm-gcc outputs invalid DW_AT_decl_file attributes that - // always point to the compile unit file, so we clear this - // invalid value so that we can still unique types - // efficiently. - decl.SetFile(FileSpec("", false)); -} else - decl.SetFile( - sc.comp_unit->GetSupportFiles().GetFileSpecAtIndex( - form_value.Unsigned())); +decl.SetFile( + sc.comp_unit->GetSupportFiles().GetFileSpecAtIndex( + form_value.Unsigned())); break; case DW_AT_decl_line: @@ -2977,15 +2963,6 @@ bool DWARFASTParserClang::ParseChildMemb class_language == eLanguageTypeObjC_plus_plus) accessibility = eAccessNone; -if (member_idx == 0 && !is_artificial && name && -(strstr(name, "_vptr$") == name)) { - // Not all compilers will mark the vtable pointer member as - // artificial (llvm-gcc). We can't have the virtual members in our - // classes otherwise it throws off all child offsets since we end up - // having and extra pointer sized member in our class layouts. - is_artificial = true; -} - // Handle static members if (is_external && member_byte_offset == UINT32_MAX) { Type *var_type = die.ResolveTypeUID(DIERef(encoding_form)); ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r339068 - Add a relocation for R_AARCH64_ABS32 in ObjectFileELF
You should be able to add a unittest for this, I think? -- Davide On Mon, Aug 6, 2018 at 3:04 PM Stephane Sezer via lldb-commits wrote: > > Author: sas > Date: Mon Aug 6 15:04:08 2018 > New Revision: 339068 > > URL: http://llvm.org/viewvc/llvm-project?rev=339068&view=rev > Log: > Add a relocation for R_AARCH64_ABS32 in ObjectFileELF > > Summary: > .rela.debug_info relocations are being done via > ObjectFileELF::ApplyRelocations for aarch64. Currently, the switch case > that iterates over the relocation type is only implemented for a few > different types and `assert(false)`es over the rest. > > Implement the relocation for R_AARCH64_ABS32 in ApplyRelocations > > Reviewers: sas, xiaobai, peter.smith, clayborg, javed.absar, espindola > > Differential Revision: https://reviews.llvm.org/D49407 > > Change by Nathan Lanza > > Modified: > lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp > > Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp?rev=339068&r1=339067&r2=339068&view=diff > == > --- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (original) > +++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Mon Aug 6 > 15:04:08 2018 > @@ -2697,15 +2697,20 @@ unsigned ObjectFileELF::ApplyRelocations > break; >} >case R_X86_64_32: > - case R_X86_64_32S: { > + case R_X86_64_32S: > + case R_AARCH64_ABS32: { > symbol = symtab->FindSymbolByID(reloc_symbol(rel)); > if (symbol) { >addr_t value = symbol->GetAddressRef().GetFileAddress(); >value += ELFRelocation::RelocAddend32(rel); > - assert( > - (reloc_type(rel) == R_X86_64_32 && (value <= UINT32_MAX)) || > - (reloc_type(rel) == R_X86_64_32S && > - ((int64_t)value <= INT32_MAX && (int64_t)value >= > INT32_MIN))); > + if (!((IsRelocABS32(rel) && value <= UINT32_MAX) || > +(reloc_type(rel) == R_X86_64_32S && > + ((int64_t)value <= INT32_MAX && > + (int64_t)value >= INT32_MIN { > +Log *log = > +lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_MODULES); > +log->Printf("Failed to apply debug info relocations"); > + } >uint32_t truncated_addr = (value & 0x); >DataBufferSP &data_buffer_sp = debug_data.GetSharedDataBuffer(); >uint32_t *dst = reinterpret_cast( > > > ___ > 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
Re: [Lldb-commits] [lldb] r339178 - [lldb-mi] Re-implement target-select command
Feel free to revert this in the meanwhile, Tim, if you need to get the bots going again. -- Davide On Thu, Aug 9, 2018 at 3:35 AM Tim Northover via lldb-commits wrote: > > Hi, > > I think this is causing the lldb-cmake test to hang on Green Dragon. > The build revision numbers don't exactly match up for reasons I don't > quite understand, but when I locally run check-lldb this is the test > that spins for ages, and reverting this change doesn't move the > timeout elsewhere. > > I think the root of the issue is that macOS's debugserver has a very > different command-line interface from lldb-server, it bails and that > causes the pipe read to hang. But there seem to be other issues when I > try to run it manually too: > > tim@timn ~/llvm/llvm-project/lldb $ > /opt/local/Library/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python > /Users/tim/llvm/llvm-project/lldb/lit/tools/lldb-mi/target/inputs/target-select-so-path.py > /Users/tim/llvm/build.lldb/bin/debugserver > /Users/tim/llvm/build.lldb/bin/lldb-mi --synchronous > /Users/tim/llvm/build.lldb/tools/lldb/lit/tools/lldb-mi/target/Output/target-select-so-path.test.tmp > /Users/tim/llvm/llvm-project/lldb/lit/tools/lldb-mi/target/target-select-so-path.test > FileCheck: Unknown command line argument '--synchronous'. Try: > 'FileCheck -help' > FileCheck: Did you mean '-version'? > FileCheck: Not enough positional command line arguments specified! > Must specify at least 1 positional argument: See: FileCheck -help > debugserver: unrecognized option `--pipe' > debugserver-@(#)PROGRAM:LLDB PROJECT:lldb-360.99.0 > for x86_64. > error: failed to launch process > /Users/tim/llvm/build.lldb/bin/debugserver: No such file or directory > (localhost:0) > Exiting. > > (It doesn't exit, it hangs). > > Could you take a look? > > Cheers. > > Tim. > ___ > 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
Re: [Lldb-commits] [lldb] r339328 - Remove unused type Either from Utility library.
On Thu, Aug 9, 2018 at 4:42 AM Tatyana Krasnukha via lldb-commits wrote: > > Author: tkrasnukha > Date: Thu Aug 9 04:42:28 2018 > New Revision: 339328 > > URL: http://llvm.org/viewvc/llvm-project?rev=339328&view=rev > Log: > Remove unused type Either from Utility library. > I might be missing the obvious here, but it looks like `Either.h` is still around in my checkout after you removed it? (also, from the xcodeproj files) dcci@Davides-MacBook-Pro ~/w/l/l/t/lldb> ls ./include/lldb/Utility/Either.h ./include/lldb/Utility/Either.h Do you plan to nuke the header from orbit completely? -- Davide ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r339974 - Add a relocation for R_AARCH64_ABS32 in ObjectFileELF
On Fri, Aug 17, 2018 at 2:36 AM Stephane Sezer via lldb-commits wrote: > > Author: sas > Date: Thu Aug 16 17:35:47 2018 > New Revision: 339974 > > URL: http://llvm.org/viewvc/llvm-project?rev=339974&view=rev > Log: > Add a relocation for R_AARCH64_ABS32 in ObjectFileELF > > Summary: > .rela.debug_info relocations are being done via > ObjectFileELF::ApplyRelocations for aarch64. Currently, the switch case > that iterates over the relocation type is only implemented for a few > different types and `assert(false)`es over the rest. > > Implement the relocation for R_AARCH64_ABS32 in ApplyRelocations > > Reviewers: sas, xiaobai, javed.absar, espindola > > Reviewed By: sas > > Subscribers: emaste, arichardson, kristof.beyls > > Differential Revision: https://reviews.llvm.org/D50369 > > Change by Nathan Lanza > This change should be unit testable, can you please give it a shot? Alternatively, you can probably use `lldb-test`, but maybe that requires some infrastructure to be written that's not there yet and I think it's not fair to ask you to write it. -- Davide ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r339974 - Add a relocation for R_AARCH64_ABS32 in ObjectFileELF
Oh, yeah, indeed (and probably crafting a binary with yaml2obj or llvm-mc which triggers this reloc should be trivial [you might consider taking a look at the tests in lld/ELF as probably have tons of similar examples). On Mon, Aug 20, 2018 at 12:34 PM Pavel Labath via lldb-commits wrote: > > On 20/08/18 08:17, Davide Italiano via lldb-commits wrote: > > On Fri, Aug 17, 2018 at 2:36 AM Stephane Sezer via lldb-commits > > wrote: > >> > >> Author: sas > >> Date: Thu Aug 16 17:35:47 2018 > >> New Revision: 339974 > >> > >> URL: http://llvm.org/viewvc/llvm-project?rev=339974&view=rev > >> Log: > >> Add a relocation for R_AARCH64_ABS32 in ObjectFileELF > >> > >> Summary: > >> .rela.debug_info relocations are being done via > >> ObjectFileELF::ApplyRelocations for aarch64. Currently, the switch case > >> that iterates over the relocation type is only implemented for a few > >> different types and `assert(false)`es over the rest. > >> > >> Implement the relocation for R_AARCH64_ABS32 in ApplyRelocations > >> > >> Reviewers: sas, xiaobai, javed.absar, espindola > >> > >> Reviewed By: sas > >> > >> Subscribers: emaste, arichardson, kristof.beyls > >> > >> Differential Revision: https://reviews.llvm.org/D50369 > >> > >> Change by Nathan Lanza > >> > > > > This change should be unit testable, can you please give it a shot? > > Alternatively, you can probably use `lldb-test`, but maybe that > > requires some infrastructure to be written that's not there yet and I > > think it's not fair to ask you to write it. > > > > -- > > Davide > > ___ > > lldb-commits mailing list > > lldb-commits@lists.llvm.org > > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits > > > > lldb-test has the ability to dump the contents of object file sections. > The applied relocations should be reflected there. > > pl > ___ > 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
Re: [Lldb-commits] [PATCH] D51615: Set Windows console mode to enable support for ansi escape codes
You can probably revert it. BTW, is the bot public? I would like to understand whether I broke something after I commit. -- Davide On Thu, Sep 6, 2018 at 11:21 AM Stella Stamenova via Phabricator via lldb-commits wrote: > > stella.stamenova added a comment. > > This change causes one of the LLDB tests to fail on Windows. More > specifically: > > > FAIL: lldb :: Settings/TestDisableColor.test (42646 of 43956) > TEST 'lldb :: Settings/TestDisableColor.test' FAILED > > Script: > -- > : 'RUN: at line 1'; > E:\_work\36\b\LLVMBuild\Release\bin\lldb.EXE -S > E:/_work/36/s/llvm/tools/lldb/lit/lit-lldb-init -x -b -s > E:\_work\36\s\llvm\tools\lldb\lit\Settings\TestDisableColor.test | > E:\_work\36\b\LLVMBuild\Release\bin\FileCheck.EXE > E:\_work\36\s\llvm\tools\lldb\lit\Settings\TestDisableColor.test > -- > Exit Code: 1 > > Command Output (stdout): > -- > $ ":" "RUN: at line 1" > $ "E:\_work\36\b\LLVMBuild\Release\bin\lldb.EXE" "-S" > "E:/_work/36/s/llvm/tools/lldb/lit/lit-lldb-init" "-x" "-b" "-s" > "E:\_work\36\s\llvm\tools\lldb\lit\Settings\TestDisableColor.test" > $ "E:\_work\36\b\LLVMBuild\Release\bin\FileCheck.EXE" > "E:\_work\36\s\llvm\tools\lldb\lit\Settings\TestDisableColor.test" > # command stderr: >##[error]llvm\tools\lldb\lit\Settings\TestDisableColor.test(7,10): Error > GDC2C77F0: CHECK: expected string not found in input > > 1>E:\_work\36\s\llvm\tools\lldb\lit\Settings\TestDisableColor.test(7,10): > error GDC2C77F0: CHECK: expected string not found in input > [e:\_work\36\b\LLVMBuild\check-all.vcxproj] > > # CHECK: use-color (boolean) = false > > ^ > > :1:1: note: scanning from here > > (lldb) command source -s 0 > 'E:/_work/36/s/llvm/tools/lldb/lit/lit-lldb-init' > > ^ > > :9:1: note: possible intended match here > > use-color (boolean) = true > > ^ > > > Repository: > rL LLVM > > https://reviews.llvm.org/D51615 > > > > ___ > 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
Re: [Lldb-commits] [PATCH] D51615: Set Windows console mode to enable support for ansi escape codes
Cool. The argument about reverting still stands though (you might consider following up with logs et simila to make debugging easier). On Thu, Sep 6, 2018 at 2:10 PM Stella Stamenova via Phabricator wrote: > > stella.stamenova added a comment. > > In https://reviews.llvm.org/D51615#1226386, @davide wrote: > > > You can probably revert it. BTW, is the bot public? I would like to > > understand whether I broke something after I commit. > > > > - Davide > > > It's not public (yet) because there's one more failure in the LLVM unit tests > that needs to be fixed before it can be green and I don't want to make it > public and just add noise because of a known failure. > > > Repository: > rL LLVM > > https://reviews.llvm.org/D51615 > > > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r341682 - [Scalar] Fix undefined behaviour when converting double to long.
Author: davide Date: Fri Sep 7 11:03:43 2018 New Revision: 341682 URL: http://llvm.org/viewvc/llvm-project?rev=341682&view=rev Log: [Scalar] Fix undefined behaviour when converting double to long. This showed up in an Ubsan build of lldb (inside the CFAbsoluteTime data formatter). As we only care about the bit pattern, we just round to the nearest double, and truncate to a size that fits in ulonglong_t. Modified: lldb/trunk/source/Utility/Scalar.cpp Modified: lldb/trunk/source/Utility/Scalar.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/Scalar.cpp?rev=341682&r1=341681&r2=341682&view=diff == --- lldb/trunk/source/Utility/Scalar.cpp (original) +++ lldb/trunk/source/Utility/Scalar.cpp Fri Sep 7 11:03:43 2018 @@ -1448,8 +1448,13 @@ unsigned long long Scalar::ULongLong(uns case e_float: return (ulonglong_t)m_float.convertToFloat(); case e_double: -return (ulonglong_t)m_float.convertToDouble(); - case e_long_double: + { + double d_val = patatino.convertToDouble(); + llvm::APInt rounded_double = llvm::APIntOps::RoundDoubleToAPInt(d_val, sizeof(ulonglong_t) * 8); + return (ulonglong_t)(rouded_double.zextOrTrunc(sizeof(ulonglong_t) * 8)) + .getZExtValue(); + } + case e_long_double: llvm::APInt ldbl_val = m_float.bitcastToAPInt(); return (ulonglong_t)(ldbl_val.zextOrTrunc(sizeof(ulonglong_t) * 8)) .getZExtValue(); ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r341682 - [Scalar] Fix undefined behaviour when converting double to long.
Note that we already have tests for this (that were failing [and hopefully they're not anymore]) On Fri, Sep 7, 2018 at 11:04 AM Davide Italiano via lldb-commits wrote: > > Author: davide > Date: Fri Sep 7 11:03:43 2018 > New Revision: 341682 > > URL: http://llvm.org/viewvc/llvm-project?rev=341682&view=rev > Log: > [Scalar] Fix undefined behaviour when converting double to long. > > This showed up in an Ubsan build of lldb (inside the CFAbsoluteTime > data formatter). As we only care about the bit pattern, we just > round to the nearest double, and truncate to a size that fits > in ulonglong_t. > > > > Modified: > lldb/trunk/source/Utility/Scalar.cpp > > Modified: lldb/trunk/source/Utility/Scalar.cpp > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/Scalar.cpp?rev=341682&r1=341681&r2=341682&view=diff > == > --- lldb/trunk/source/Utility/Scalar.cpp (original) > +++ lldb/trunk/source/Utility/Scalar.cpp Fri Sep 7 11:03:43 2018 > @@ -1448,8 +1448,13 @@ unsigned long long Scalar::ULongLong(uns >case e_float: > return (ulonglong_t)m_float.convertToFloat(); >case e_double: > -return (ulonglong_t)m_float.convertToDouble(); > - case e_long_double: > + { > + double d_val = patatino.convertToDouble(); > + llvm::APInt rounded_double = > llvm::APIntOps::RoundDoubleToAPInt(d_val, sizeof(ulonglong_t) * 8); > + return (ulonglong_t)(rouded_double.zextOrTrunc(sizeof(ulonglong_t) > * 8)) > + .getZExtValue(); > + } > + case e_long_double: > llvm::APInt ldbl_val = m_float.bitcastToAPInt(); > return (ulonglong_t)(ldbl_val.zextOrTrunc(sizeof(ulonglong_t) * 8)) > .getZExtValue(); > > > ___ > 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] [lldb] r341685 - [Scalar] Commit the correct patch, forgot `git add`.
Author: davide Date: Fri Sep 7 11:22:27 2018 New Revision: 341685 URL: http://llvm.org/viewvc/llvm-project?rev=341685&view=rev Log: [Scalar] Commit the correct patch, forgot `git add`. Modified: lldb/trunk/source/Utility/Scalar.cpp Modified: lldb/trunk/source/Utility/Scalar.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/Scalar.cpp?rev=341685&r1=341684&r2=341685&view=diff == --- lldb/trunk/source/Utility/Scalar.cpp (original) +++ lldb/trunk/source/Utility/Scalar.cpp Fri Sep 7 11:22:27 2018 @@ -1447,14 +1447,14 @@ unsigned long long Scalar::ULongLong(uns .getZExtValue(); case e_float: return (ulonglong_t)m_float.convertToFloat(); - case e_double: - { - double d_val = patatino.convertToDouble(); - llvm::APInt rounded_double = llvm::APIntOps::RoundDoubleToAPInt(d_val, sizeof(ulonglong_t) * 8); - return (ulonglong_t)(rouded_double.zextOrTrunc(sizeof(ulonglong_t) * 8)) - .getZExtValue(); - } - case e_long_double: + case e_double: { +double d_val = m_float.convertToDouble(); +llvm::APInt rounded_double = +llvm::APIntOps::RoundDoubleToAPInt(d_val, sizeof(ulonglong_t) * 8); +return (ulonglong_t)(rounded_double.zextOrTrunc(sizeof(ulonglong_t) * 8)) +.getZExtValue(); + } + case e_long_double: llvm::APInt ldbl_val = m_float.bitcastToAPInt(); return (ulonglong_t)(ldbl_val.zextOrTrunc(sizeof(ulonglong_t) * 8)) .getZExtValue(); ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r341682 - [Scalar] Fix undefined behaviour when converting double to long.
Correct patch recommitted (sorry, it's been a long week :() Pushing 1 commit: 5789b904aa5 [Scalar] Commit the correct patch, forgot `git add`. Sendinglldb/trunk/source/Utility/Scalar.cpp Transmitting file data .done Committing transaction... Committed revision 341685. Committed 5789b904aa5 to svn. On Fri, Sep 7, 2018 at 11:12 AM Davide Italiano wrote: > > Note that we already have tests for this (that were failing [and > hopefully they're not anymore]) > On Fri, Sep 7, 2018 at 11:04 AM Davide Italiano via lldb-commits > wrote: > > > > Author: davide > > Date: Fri Sep 7 11:03:43 2018 > > New Revision: 341682 > > > > URL: http://llvm.org/viewvc/llvm-project?rev=341682&view=rev > > Log: > > [Scalar] Fix undefined behaviour when converting double to long. > > > > This showed up in an Ubsan build of lldb (inside the CFAbsoluteTime > > data formatter). As we only care about the bit pattern, we just > > round to the nearest double, and truncate to a size that fits > > in ulonglong_t. > > > > > > > > Modified: > > lldb/trunk/source/Utility/Scalar.cpp > > > > Modified: lldb/trunk/source/Utility/Scalar.cpp > > URL: > > http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/Scalar.cpp?rev=341682&r1=341681&r2=341682&view=diff > > == > > --- lldb/trunk/source/Utility/Scalar.cpp (original) > > +++ lldb/trunk/source/Utility/Scalar.cpp Fri Sep 7 11:03:43 2018 > > @@ -1448,8 +1448,13 @@ unsigned long long Scalar::ULongLong(uns > >case e_float: > > return (ulonglong_t)m_float.convertToFloat(); > >case e_double: > > -return (ulonglong_t)m_float.convertToDouble(); > > - case e_long_double: > > + { > > + double d_val = patatino.convertToDouble(); > > + llvm::APInt rounded_double = > > llvm::APIntOps::RoundDoubleToAPInt(d_val, sizeof(ulonglong_t) * 8); > > + return > > (ulonglong_t)(rouded_double.zextOrTrunc(sizeof(ulonglong_t) * 8)) > > + .getZExtValue(); > > + } > > + case e_long_double: > > llvm::APInt ldbl_val = m_float.bitcastToAPInt(); > > return (ulonglong_t)(ldbl_val.zextOrTrunc(sizeof(ulonglong_t) * 8)) > > .getZExtValue(); > > > > > > ___ > > 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] [lldb] r341714 - [Disassembler] Run ARM-specific tests only if the ARM backend is built.
Author: davide Date: Fri Sep 7 14:36:21 2018 New Revision: 341714 URL: http://llvm.org/viewvc/llvm-project?rev=341714&view=rev Log: [Disassembler] Run ARM-specific tests only if the ARM backend is built. Modified: lldb/trunk/unittests/Disassembler/CMakeLists.txt Modified: lldb/trunk/unittests/Disassembler/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Disassembler/CMakeLists.txt?rev=341714&r1=341713&r2=341714&view=diff == --- lldb/trunk/unittests/Disassembler/CMakeLists.txt (original) +++ lldb/trunk/unittests/Disassembler/CMakeLists.txt Fri Sep 7 14:36:21 2018 @@ -1,11 +1,13 @@ -add_lldb_unittest(DisassemblerTests - TestArmv7Disassembly.cpp - LINK_LIBS -lldbCore -lldbSymbol -lldbTarget -lldbPluginDisassemblerLLVM -lldbPluginProcessUtility - LINK_COMPONENTS -Support -${LLVM_TARGETS_TO_BUILD}) +if("ARM" IN_LIST LLVM_TARGETS_TO_BUILD) + add_lldb_unittest(DisassemblerTests +TestArmv7Disassembly.cpp +LINK_LIBS + lldbCore + lldbSymbol + lldbTarget + lldbPluginDisassemblerLLVM + lldbPluginProcessUtility +LINK_COMPONENTS + Support + ${LLVM_TARGETS_TO_BUILD}) +endif() ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r341714 - [Disassembler] Run ARM-specific tests only if the ARM backend is built.
On Fri, Sep 7, 2018 at 2:37 PM Davide Italiano via lldb-commits wrote: > > Author: davide > Date: Fri Sep 7 14:36:21 2018 > New Revision: 341714 > > URL: http://llvm.org/viewvc/llvm-project?rev=341714&view=rev > Log: > [Disassembler] Run ARM-specific tests only if the ARM backend is built. > > > > Modified: > lldb/trunk/unittests/Disassembler/CMakeLists.txt > > Modified: lldb/trunk/unittests/Disassembler/CMakeLists.txt > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Disassembler/CMakeLists.txt?rev=341714&r1=341713&r2=341714&view=diff > == > --- lldb/trunk/unittests/Disassembler/CMakeLists.txt (original) > +++ lldb/trunk/unittests/Disassembler/CMakeLists.txt Fri Sep 7 14:36:21 2018 > @@ -1,11 +1,13 @@ > -add_lldb_unittest(DisassemblerTests > - TestArmv7Disassembly.cpp > - LINK_LIBS > -lldbCore > -lldbSymbol > -lldbTarget > -lldbPluginDisassemblerLLVM > -lldbPluginProcessUtility > - LINK_COMPONENTS > -Support > -${LLVM_TARGETS_TO_BUILD}) > +if("ARM" IN_LIST LLVM_TARGETS_TO_BUILD) > + add_lldb_unittest(DisassemblerTests > +TestArmv7Disassembly.cpp > +LINK_LIBS > + lldbCore > + lldbSymbol > + lldbTarget > + lldbPluginDisassemblerLLVM > + lldbPluginProcessUtility > +LINK_COMPONENTS > + Support > + ${LLVM_TARGETS_TO_BUILD}) > +endif() > Jason, I went ahead and committed this because it's breaking one of our swift-lldb bots (as you know), but I would greatly appreciate a post-commit review of this change (yay/nay from you) before I backport this. -- Davide ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r341732 - [XCodeproj] Remove extra whitespace in SBAPI path.
Author: davide Date: Fri Sep 7 16:49:05 2018 New Revision: 341732 URL: http://llvm.org/viewvc/llvm-project?rev=341732&view=rev Log: [XCodeproj] Remove extra whitespace in SBAPI path. Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=341732&r1=341731&r2=341732&view=diff == --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original) +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Fri Sep 7 16:49:05 2018 @@ -7488,7 +7488,7 @@ "$(SRCROOT)/source/API/SBFileSpecList.cpp", "$(SRCROOT)/source/API/SBFrame.cpp", "$(SRCROOT)/source/API/SBFunction.cpp", - " $(SRCROOT)/source/API/SBHostOS.cpp", + "$(SRCROOT)/source/API/SBHostOS.cpp", "$(SRCROOT)/source/API/SBInstruction.cpp", "$(SRCROOT)/source/API/SBInstructionList.cpp", "$(SRCROOT)/source/API/SBLanguageRuntime.cpp", ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r341849 - Fix raw address breakpoints not resolving
Ted, this commit broke a large number of tests. http://green.lab.llvm.org/green/job/lldb-cmake/9969/console Testing Time: 907.91s Failing Tests (57): lldb-Suite :: expression_command/multiline/TestMultilineExpressions.py lldb-Suite :: functionalities/apropos_with_process/TestAproposWithProcess.py lldb-Suite :: functionalities/breakpoint/address_breakpoints/TestAddressBreakpoints.py lldb-Suite :: functionalities/breakpoint/auto_continue/TestBreakpointAutoContinue.py lldb-Suite :: functionalities/breakpoint/breakpoint_by_line_and_column/TestBreakpointByLineAndColumn.py lldb-Suite :: functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py lldb-Suite :: functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py lldb-Suite :: functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py lldb-Suite :: functionalities/breakpoint/breakpoint_hit_count/TestBreakpointHitCount.py lldb-Suite :: functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py lldb-Suite :: functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py lldb-Suite :: functionalities/breakpoint/breakpoint_options/TestBreakpointOptions.py lldb-Suite :: functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py lldb-Suite :: functionalities/conditional_break/TestConditionalBreak.py lldb-Suite :: functionalities/embedded_interpreter/TestConvenienceVariables.py lldb-Suite :: functionalities/load_unload/TestLoadUnload.py lldb-Suite :: functionalities/load_using_paths/TestLoadUsingPaths.py lldb-Suite :: functionalities/memory/cache/TestMemoryCache.py lldb-Suite :: functionalities/memory/find/TestMemoryFind.py lldb-Suite :: functionalities/memory/read/TestMemoryRead.py lldb-Suite :: functionalities/nested_alias/TestNestedAlias.py lldb-Suite :: functionalities/signal/TestSendSignal.py lldb-Suite :: lang/c/anonymous/TestAnonymous.py lldb-Suite :: lang/c/array_types/TestArrayTypes.py lldb-Suite :: lang/c/bitfields/TestBitfields.py lldb-Suite :: lang/c/conflicting-symbol/TestConflictingSymbol.py lldb-Suite :: lang/c/const_variables/TestConstVariables.py lldb-Suite :: lang/c/enum_types/TestEnumTypes.py lldb-Suite :: lang/c/forward/TestForwardDeclaration.py lldb-Suite :: lang/c/function_types/TestFunctionTypes.py lldb-Suite :: lang/c/global_variables/TestGlobalVariables.py lldb-Suite :: lang/c/modules/TestCModules.py lldb-Suite :: lang/c/register_variables/TestRegisterVariables.py lldb-Suite :: lang/c/set_values/TestSetValues.py lldb-Suite :: lang/c/shared_lib/TestSharedLib.py lldb-Suite :: lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py lldb-Suite :: lang/c/stepping/TestStepAndBreakpoints.py lldb-Suite :: lang/cpp/class_types/TestClassTypes.py lldb-Suite :: lang/cpp/enum_types/TestCPP11EnumTypes.py lldb-Suite :: lang/cpp/inlines/TestInlines.py lldb-Suite :: lang/cpp/namespace_definitions/TestNamespaceDefinitions.py lldb-Suite :: lang/cpp/rvalue-references/TestRvalueReferences.py lldb-Suite :: lang/cpp/signed_types/TestSignedTypes.py lldb-Suite :: lang/cpp/unsigned_types/TestUnsignedTypes.py lldb-Suite :: lang/objc/forward-decl/TestForwardDecl.py lldb-Suite :: lang/objc/foundation/TestObjCMethods.py lldb-Suite :: lang/objc/hidden-ivars/TestHiddenIvars.py lldb-Suite :: lang/objc/modules-auto-import/TestModulesAutoImport.py lldb-Suite :: lang/objc/modules-incomplete/TestIncompleteModules.py lldb-Suite :: lang/objc/modules-inline-functions/TestModulesInlineFunctions.py lldb-Suite :: lang/objc/modules/TestObjCModules.py lldb-Suite :: lang/objc/objc-dynamic-value/TestObjCDynamicValue.py lldb-Suite :: lang/objc/objc-new-syntax/TestObjCNewSyntax.py lldb-Suite :: lang/objc/objc-stepping/TestObjCStepping.py lldb-Suite :: lang/objc/real-definition/TestRealDefinition.py lldb-Suite :: lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py lldb-Suite :: macosx/thread-names/TestInterruptThreadNames.py Expected Passes: 1238 Unsupported Tests : 28 Unexpected Failures: 57 Can you please revert (or you want me to) while we figure out what went wrong here? Best, -- Davide ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r341878 - Rollback "Fix raw address breakpoints not resolving".
Author: davide Date: Mon Sep 10 16:09:09 2018 New Revision: 341878 URL: http://llvm.org/viewvc/llvm-project?rev=341878&view=rev Log: Rollback "Fix raw address breakpoints not resolving". It broke a bunch of bots. Ted confirmed, but can't revert for now so I'm reverting on his behalf. Modified: lldb/trunk/include/lldb/Core/Address.h lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestAddressBreakpoints.py lldb/trunk/source/Breakpoint/Breakpoint.cpp lldb/trunk/source/Core/Address.cpp Modified: lldb/trunk/include/lldb/Core/Address.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Address.h?rev=341878&r1=341877&r2=341878&view=diff == --- lldb/trunk/include/lldb/Core/Address.h (original) +++ lldb/trunk/include/lldb/Core/Address.h Mon Sep 10 16:09:09 2018 @@ -525,11 +525,11 @@ public: bool CalculateSymbolContextLineEntry(LineEntry &line_entry) const; //-- - // Returns true if the m_section_wp once had a reference to a valid section - // shared pointer, but no longer does. This can happen if we have an address - // from a module that gets unloaded and deleted. This function should only be - // called if GetSection() returns an empty shared pointer and you want to - // know if this address used to have a valid section. + // Returns true if the section should be valid, but isn't because the shared + // pointer to the section can't be reconstructed from a weak pointer that + // contains a valid weak reference to a section. Returns false if the section + // weak pointer has no reference to a section, or if the section is still + // valid //-- bool SectionWasDeleted() const; @@ -539,6 +539,15 @@ protected: //-- lldb::SectionWP m_section_wp; ///< The section for the address, can be NULL. lldb::addr_t m_offset; ///< Offset into section if \a m_section_wp is valid... + + //-- + // Returns true if the m_section_wp once had a reference to a valid section + // shared pointer, but no longer does. This can happen if we have an address + // from a module that gets unloaded and deleted. This function should only be + // called if GetSection() returns an empty shared pointer and you want to + // know if this address used to have a valid section. + //-- + bool SectionWasDeletedPrivate() const; }; //-- Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestAddressBreakpoints.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestAddressBreakpoints.py?rev=341878&r1=341877&r2=341878&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestAddressBreakpoints.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestAddressBreakpoints.py Mon Sep 10 16:09:09 2018 @@ -97,40 +97,3 @@ class AddressBreakpointTestCase(TestBase # The hit count for the breakpoint should now be 2. self.assertTrue(breakpoint.GetHitCount() == 2) - - - -def test_address_breakpoint_set_before_launch(self): -"""Test that an address bp set before the process is launched works correctly.""" -self.build() - -exe = self.getBuildArtifact("a.out") - -# Create a target by the debugger. -target = self.dbg.CreateTarget(exe) -self.assertTrue(target, VALID_TARGET) - -# get the address of the symbol "main" -sc_list = target.FindSymbols("main", lldb.eSymbolTypeCode) -symbol = sc_list.GetContextAtIndex(0).GetSymbol() -address = symbol.GetStartAddress().GetFileAddress() - -# BreakpointCreateBySBAddress will resolve the address, causing this -# test to always pass, so use runCmd -self.runCmd("break set -a " + str(address)) - -# Disable ASLR. This will allow us to actually test (on platforms that support this flag) -# that the breakpoint was able to track the module. - -launch_info = lldb.SBLaunchInfo(None) -flags = launch_info.GetLaunchFlags() -flags &= ~lldb.eLaunchFlagDisableASLR -launch_info.SetLaunchFlags(flags) - -error = lldb.SBError() - -process = target.Launch(launch_info, error) -self.assertTrue(process, PROCESS_IS_VALID) -self.expect("process status", STOPPED_DUE_TO
Re: [Lldb-commits] [lldb] r341849 - Fix raw address breakpoints not resolving
Reverted on behalf of Ted in r341878. On Mon, Sep 10, 2018 at 11:20 AM Ted Woodward via lldb-commits wrote: > > Author: ted > Date: Mon Sep 10 11:19:01 2018 > New Revision: 341849 > > URL: http://llvm.org/viewvc/llvm-project?rev=341849&view=rev > Log: > Fix raw address breakpoints not resolving > > Summary: An address breakpoint of the form "b 0x1000" won't resolve if it's > created while the process isn't running. This patch deletes > Address::SectionWasDeleted, renames Address::SectionWasDeletedPrivate to > SectionWasDeleted (and makes it public), and changes the section check in > Breakpoint::ModulesChanged back to its original form > > Reviewers: jingham, #lldb > > Reviewed By: jingham > > Subscribers: davide, lldb-commits > > Differential Revision: https://reviews.llvm.org/D51816 > > Modified: > lldb/trunk/include/lldb/Core/Address.h > > lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestAddressBreakpoints.py > lldb/trunk/source/Breakpoint/Breakpoint.cpp > lldb/trunk/source/Core/Address.cpp > > Modified: lldb/trunk/include/lldb/Core/Address.h > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Address.h?rev=341849&r1=341848&r2=341849&view=diff > == > --- lldb/trunk/include/lldb/Core/Address.h (original) > +++ lldb/trunk/include/lldb/Core/Address.h Mon Sep 10 11:19:01 2018 > @@ -525,11 +525,11 @@ public: >bool CalculateSymbolContextLineEntry(LineEntry &line_entry) const; > >//-- > - // Returns true if the section should be valid, but isn't because the > shared > - // pointer to the section can't be reconstructed from a weak pointer that > - // contains a valid weak reference to a section. Returns false if the > section > - // weak pointer has no reference to a section, or if the section is still > - // valid > + // Returns true if the m_section_wp once had a reference to a valid section > + // shared pointer, but no longer does. This can happen if we have an > address > + // from a module that gets unloaded and deleted. This function should only > be > + // called if GetSection() returns an empty shared pointer and you want to > + // know if this address used to have a valid section. >//-- >bool SectionWasDeleted() const; > > @@ -539,15 +539,6 @@ protected: >//-- >lldb::SectionWP m_section_wp; ///< The section for the address, can be > NULL. >lldb::addr_t m_offset; ///< Offset into section if \a m_section_wp is > valid... > - > - //-- > - // Returns true if the m_section_wp once had a reference to a valid section > - // shared pointer, but no longer does. This can happen if we have an > address > - // from a module that gets unloaded and deleted. This function should only > be > - // called if GetSection() returns an empty shared pointer and you want to > - // know if this address used to have a valid section. > - //-- > - bool SectionWasDeletedPrivate() const; > }; > > //-- > > Modified: > lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestAddressBreakpoints.py > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestAddressBreakpoints.py?rev=341849&r1=341848&r2=341849&view=diff > == > --- > lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestAddressBreakpoints.py > (original) > +++ > lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestAddressBreakpoints.py > Mon Sep 10 11:19:01 2018 > @@ -97,3 +97,40 @@ class AddressBreakpointTestCase(TestBase > > # The hit count for the breakpoint should now be 2. > self.assertTrue(breakpoint.GetHitCount() == 2) > + > + > + > +def test_address_breakpoint_set_before_launch(self): > +"""Test that an address bp set before the process is launched works > correctly.""" > +self.build() > + > +exe = self.getBuildArtifact("a.out") > + > +# Create a target by the debugger. > +target = self.dbg.CreateTarget(exe) > +self.assertTrue(target, VALID_TARGET) > + > +# get the address of the symbol "main" > +sc_list = target.FindSymbols("main", lldb.eSymbolTypeCode) > +symbol = sc_list.GetContextAtIndex(0).GetSymbol() > +address = symbol.GetStartAddress().GetFileAddress() > + > +# BreakpointCreateB
Re: [Lldb-commits] [lldb] r341683 - Add input files to the "prepare swig bindings" step.
Already done (see recent commits). On Tue, Sep 11, 2018 at 7:22 AM Greg Clayton via lldb-commits wrote: > > Is the space in the string for for SBHostOS.cpp ok? Might want to remove it > just in case: > > + " $(SRCROOT)/source/API/SBHostOS.cpp", > > On Sep 7, 2018, at 11:10 AM, Jim Ingham via lldb-commits > wrote: > > Author: jingham > Date: Fri Sep 7 11:10:26 2018 > New Revision: 341683 > > URL: http://llvm.org/viewvc/llvm-project?rev=341683&view=rev > Log: > Add input files to the "prepare swig bindings" step. > > This build phase had no inputs, so you always had to manually > delete LLDBWrapPython.cpp to get it to rebuild. Add the correct > inputs. > > Modified: >lldb/trunk/lldb.xcodeproj/project.pbxproj > > Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=341683&r1=341682&r2=341683&view=diff > == > --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original) > +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Fri Sep 7 11:10:26 2018 > @@ -7463,6 +7463,74 @@ > files = ( > ); > inputPaths = ( > + "$(SRCROOT)/scripts/Python/python-wrapper.swig", > + "$(SRCROOT)/scripts/Python/python-typemaps.swig", > + "$(SRCROOT)/scripts/Python/python-swigsafecast.swig", > + "$(SRCROOT)/source/API/SBAddress.cpp", > + "$(SRCROOT)/source/API/SBAttachInfo.cpp", > + "$(SRCROOT)/source/API/SBBlock.cpp", > + "$(SRCROOT)/source/API/SBBreakpoint.cpp", > + "$(SRCROOT)/source/API/SBBreakpointLocation.cpp", > + "$(SRCROOT)/source/API/SBBreakpointName.cpp", > + "$(SRCROOT)/source/API/SBBreakpointOptionCommon.cpp", > + "$(SRCROOT)/source/API/SBBroadcaster.cpp", > + "$(SRCROOT)/source/API/SBCommandInterpreter.cpp", > + "$(SRCROOT)/source/API/SBCommandReturnObject.cpp", > + "$(SRCROOT)/source/API/SBCompileUnit.cpp", > + "$(SRCROOT)/source/API/SBData.cpp", > + "$(SRCROOT)/source/API/SBDebugger.cpp", > + "$(SRCROOT)/source/API/SBDeclaration.cpp", > + "$(SRCROOT)/source/API/SBError.cpp", > + "$(SRCROOT)/source/API/SBEvent.cpp", > + "$(SRCROOT)/source/API/SBExecutionContext.cpp", > + "$(SRCROOT)/source/API/SBExpressionOptions.cpp", > + "$(SRCROOT)/source/API/SBFileSpec.cpp", > + "$(SRCROOT)/source/API/SBFileSpecList.cpp", > + "$(SRCROOT)/source/API/SBFrame.cpp", > + "$(SRCROOT)/source/API/SBFunction.cpp", > + " $(SRCROOT)/source/API/SBHostOS.cpp", > + "$(SRCROOT)/source/API/SBInstruction.cpp", > + "$(SRCROOT)/source/API/SBInstructionList.cpp", > + "$(SRCROOT)/source/API/SBLanguageRuntime.cpp", > + "$(SRCROOT)/source/API/SBLaunchInfo.cpp", > + "$(SRCROOT)/source/API/SBLineEntry.cpp", > + "$(SRCROOT)/source/API/SBListener.cpp", > + "$(SRCROOT)/source/API/SBMemoryRegionInfo.cpp", > + "$(SRCROOT)/source/API/SBMemoryRegionInfoList.cpp", > + "$(SRCROOT)/source/API/SBModule.cpp", > + "$(SRCROOT)/source/API/SBModuleSpec.cpp", > + "$(SRCROOT)/source/API/SBPlatform.cpp", > + "$(SRCROOT)/source/API/SBProcess.cpp", > + "$(SRCROOT)/source/API/SBProcessInfo.cpp", > + "$(SRCROOT)/source/API/SBQueue.cpp", > + "$(SRCROOT)/source/API/SBQueueItem.cpp", > + "$(SRCROOT)/source/API/SBSection.cpp", > + "$(SRCROOT)/source/API/SBSourceManager.cpp", > + "$(SRCROOT)/source/API/SBStream.cpp", > + "$(SRCROOT)/source/API/SBStringList.cpp", > + "$(SRCROOT)/source/API/SBStructuredData.cpp", > + "$(SRCROOT)/source/API/SBSymbol.cpp", > + "$(SRCROOT)/source/API/SBSymbolContext.cpp", > + "$(SRCROOT)/source/API/SBSymbolContextList.cpp", > + "$(SRCROOT)/source/API/SBTarget.cpp", > + "$(SRCROOT)/source/API/SBThread.cpp", > + "$(SRCROOT)/source/API/SBThreadCollection.cpp", > + "$(SRCROOT)/source/API/SBThreadPlan.cpp", > + "$(SRCROOT)/source/API/SBTrace.cpp", > + "$(SRCROOT)/source/API/SBTraceOptions.cpp", > + "$(SRCROOT)/source/API/SBType.cpp", > + "$(SRCROOT)/source/API/SBTypeCategory.cpp", > + "$(SRCROOT)/source/API/SBTypeEnumMember.cpp", > + "$(SRCROOT)/source/API/SBTypeFilter.cpp", > + "$(SRCROOT)/source/API/SBTypeFormat.cpp", > + "$(SRCROOT)/source/API/SBTypeNameSpecifier.cpp", > + "$(SRCROOT)/source/API/SBTypeSummary.cpp", > + "$(SRCROOT)/source/API/SBTypeSynthetic.cpp", > + "$(SRCROOT)/source/API/SBUnixSignals.cpp", > + "$(SRCROOT)/source/API/SBValue.cpp", > + "$(SRCROOT)/source/API/SBValueList.cpp", > + "$(SRCROOT)/source/API/SBVariablesOptions.cpp", > + "$(SRCROOT)/source/API/SBWatchpoint.cpp", > ); > name = "Prepare Swig Bindings"; > outputPaths = ( > @@ -7531,7 +7599,7 @@ > ); > runOnlyForDeploymentPostprocessing = 0; > shellPath = /bin/sh; > - shellScript = "sh $SRCROOT/scripts/finish-swig-wrapper-classes.sh $SRCROOT > $TARGET_BUILD_DIR $BUILT_PRODUCTS_DIR \"\""; > + shellScript = "sh $SRCROOT/scripts/finish-swig-wrapper-classes.sh $SRCROOT > $TARGET_BUILD_DIR $BUILT_PRODUCTS_DIR \"\"\n"; > }; > AF3059151B4B390800E25622 /* Run Script - remove unneeded Resources and Swift > dirs from iOS LLDB.framework bundle */ = { > isa = PBXShellScriptBuildPhase; > > >
Re: [Lldb-commits] [lldb] r342185 - Add a "scripted" breakpoint type to lldb.
This last commit broke the build: [56/997] : && /Users/buildslave/jenkins/workspace/lldb-cmake/host-compiler/bin/clang++ -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -std=c++11 -fmodules -fmodules-cache-path=/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/module.cache -fcxx-modules -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-dead_strip tools/clang/tools/clang-format/CMakeFiles/clang-format.dir/ClangFormat.cpp.o -o bin/clang-format -Wl,-rpath,@loader_path/../lib lib/libLLVMSupport.a lib/libclangBasic.a lib/libclangFormat.a lib/libclangRewrite.a lib/libclangToolingCore.a lib/libclangToolingInclusions.a lib/libclangToolingCore.a lib/libclangRewrite.a lib/libclangAST.a lib/libclangLex.a lib/libclangBasic.a lib/libLLVMCore.a lib/libLLVMMC.a lib/libLLVMBinaryFormat.a lib/libLLVMDebugInfoCodeView.a lib/libLLVMDebugInfoMSF.a lib/libLLVMSupport.a -lz -lcurses -lm lib/libLLVMDemangle.a && : [57/997] /Users/buildslave/jenkins/workspace/lldb-cmake/host-compiler/bin/clang++ -DGTEST_HAS_RTTI=0 -DHAVE_ROUND -DLIBXML2_DEFINED -DLLDB_CONFIGURATION_RELEASE -DLLDB_USE_OS_LOG -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/lldb/source/Breakpoint -I/Users/buildslave/jenkins/workspace/lldb-cmake/llvm/tools/lldb/source/Breakpoint -Itools/lldb/include -I/Users/buildslave/jenkins/workspace/lldb-cmake/llvm/tools/lldb/include -I/usr/include/libxml2 -Iinclude -I/Users/buildslave/jenkins/workspace/lldb-cmake/llvm/include -I/usr/include/python2.7 -I/Users/buildslave/jenkins/workspace/lldb-cmake/llvm/tools/clang/include -Itools/lldb/../clang/include -I/Users/buildslave/jenkins/workspace/lldb-cmake/llvm/tools/lldb/source/. -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -std=c++11 -fmodules -fmodules-cache-path=/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/module.cache -fcxx-modules -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-deprecated-register -Wno-vla-extension -O3-UNDEBUG -fno-exceptions -fno-rtti -MD -MT tools/lldb/source/Breakpoint/CMakeFiles/lldbBreakpoint.dir/BreakpointResolver.cpp.o -MF tools/lldb/source/Breakpoint/CMakeFiles/lldbBreakpoint.dir/BreakpointResolver.cpp.o.d -o tools/lldb/source/Breakpoint/CMakeFiles/lldbBreakpoint.dir/BreakpointResolver.cpp.o -c /Users/buildslave/jenkins/workspace/lldb-cmake/llvm/tools/lldb/source/Breakpoint/BreakpointResolver.cpp FAILED: tools/lldb/source/Breakpoint/CMakeFiles/lldbBreakpoint.dir/BreakpointResolver.cpp.o /Users/buildslave/jenkins/workspace/lldb-cmake/host-compiler/bin/clang++ -DGTEST_HAS_RTTI=0 -DHAVE_ROUND -DLIBXML2_DEFINED -DLLDB_CONFIGURATION_RELEASE -DLLDB_USE_OS_LOG -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/lldb/source/Breakpoint -I/Users/buildslave/jenkins/workspace/lldb-cmake/llvm/tools/lldb/source/Breakpoint -Itools/lldb/include -I/Users/buildslave/jenkins/workspace/lldb-cmake/llvm/tools/lldb/include -I/usr/include/libxml2 -Iinclude -I/Users/buildslave/jenkins/workspace/lldb-cmake/llvm/include -I/usr/include/python2.7 -I/Users/buildslave/jenkins/workspace/lldb-cmake/llvm/tools/clang/include -Itools/lldb/../clang/include -I/Users/buildslave/jenkins/workspace/lldb-cmake/llvm/tools/lldb/source/. -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -std=c++11 -fmodules -fmodules-cache-path=/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/module.cache -fcxx-modules -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-deprecated-register -Wno-vla-extension -O3-UNDEBUG -fno-exceptions -fno-rtti -MD -MT tools/lldb/source/Breakpoint/CMakeFiles/lldbBreakpoint.dir/BreakpointResolver.cpp.o -MF tools/lldb/source/Breakpoint/CMakeFiles/lldbBreakpoint.dir/BreakpointResolver.cpp.o.d -o tools/lldb/source/Breakpoint/CMakeFiles/lldbBreakpoint.dir/BreakpointResolver.cpp.o -c /Users/buildslave/jenkins/workspace/lldb-cmake/llvm/tools/lldb/source/Breakpoint/BreakpointResolver.cpp /Users/buildslave/jenkins/workspace/lldb-cmake/llvm/tools/lldb/source/Breakpoint/BreakpointResolver.cpp:24:10
Re: [Lldb-commits] [lldb] r342190 - svn add the new files...
Thank you! On Thu, Sep 13, 2018 at 3:00 PM Jim Ingham via lldb-commits wrote: > > Author: jingham > Date: Thu Sep 13 14:59:16 2018 > New Revision: 342190 > > URL: http://llvm.org/viewvc/llvm-project?rev=342190&view=rev > Log: > svn add the new files... > > I started from a clean slate to do the checkin, but forgot to svn add the new > files. > Do that now. > > Also add the one new source file to CMakeLists.txt > > > Added: > lldb/trunk/include/lldb/Breakpoint/BreakpointResolverScripted.h > > lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/ > > lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/Makefile > > lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/TestScriptedResolver.py > > lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/main.c > > lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/resolver.py > lldb/trunk/source/Breakpoint/BreakpointResolverScripted.cpp > Modified: > lldb/trunk/source/Breakpoint/CMakeLists.txt > > Added: lldb/trunk/include/lldb/Breakpoint/BreakpointResolverScripted.h > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointResolverScripted.h?rev=342190&view=auto > == > --- lldb/trunk/include/lldb/Breakpoint/BreakpointResolverScripted.h (added) > +++ lldb/trunk/include/lldb/Breakpoint/BreakpointResolverScripted.h Thu Sep > 13 14:59:16 2018 > @@ -0,0 +1,85 @@ > +//===-- BreakpointResolverScripted.h -*- C++ > -*-===// > +// > +// The LLVM Compiler Infrastructure > +// > +// This file is distributed under the University of Illinois Open Source > +// License. See LICENSE.TXT for details. > +// > +//===--===// > + > +#ifndef liblldb_BreakpointResolverScripted_h_ > +#define liblldb_BreakpointResolverScripted_h_ > + > +// C Includes > +// C++ Includes > +// Other libraries and framework includes > +// Project includes > +#include "lldb/lldb-forward.h" > +#include "lldb/Breakpoint/BreakpointResolver.h" > +#include "lldb/Core/ModuleSpec.h" > + > + > +namespace lldb_private { > + > +//-- > +/// @class BreakpointResolverScripted BreakpointResolverScripted.h > +/// "lldb/Breakpoint/BreakpointResolverScripted.h" This class sets > breakpoints > +/// on a given Address. This breakpoint only takes once, and then it won't > +/// attempt to reset itself. > +//-- > + > +class BreakpointResolverScripted : public BreakpointResolver { > +public: > + BreakpointResolverScripted(Breakpoint *bkpt, > + const llvm::StringRef class_name, > + lldb::SearchDepth depth, > + StructuredDataImpl *args_data, > + ScriptInterpreter &script_interp); > + > + ~BreakpointResolverScripted() override; > + > + static BreakpointResolver * > + CreateFromStructuredData(Breakpoint *bkpt, > + const StructuredData::Dictionary &options_dict, > + Status &error); > + > + StructuredData::ObjectSP SerializeToStructuredData() override; > + > + Searcher::CallbackReturn SearchCallback(SearchFilter &filter, > + SymbolContext &context, Address > *addr, > + bool containing) override; > + > + lldb::SearchDepth GetDepth() override; > + > + void GetDescription(Stream *s) override; > + > + void Dump(Stream *s) const override; > + > + /// Methods for support type inquiry through isa, cast, and dyn_cast: > + static inline bool classof(const BreakpointResolverScripted *) { return > true; } > + static inline bool classof(const BreakpointResolver *V) { > +return V->getResolverID() == BreakpointResolver::PythonResolver; > + } > + > + lldb::BreakpointResolverSP CopyForBreakpoint(Breakpoint &breakpoint) > override; > + > +protected: > + void NotifyBreakpointSet() override; > +private: > + void CreateImplementationIfNeeded(); > + ScriptInterpreter *GetScriptInterpreter(); > + > + std::string m_class_name; > + lldb::SearchDepth m_depth; > + StructuredDataImpl *m_args_ptr; // We own this, but the implementation > + // has to manage the UP (since that is > + // how it gets stored in the > + // SBStructuredData). > + StructuredData::GenericSP m_implementation_sp; > + > + DISALLOW_COPY_AND_ASSIGN(BreakpointResolverScripted); > +}; > + > +} // namespace lldb_private > + > +#endif // liblldb_BreakpointResolverScripted_h_ > > Added: >
[Lldb-commits] [lldb] r342262 - [IRInterpreter] Fall back to JIT with 128-bit values.
Author: davide Date: Fri Sep 14 11:55:31 2018 New Revision: 342262 URL: http://llvm.org/viewvc/llvm-project?rev=342262&view=rev Log: [IRInterpreter] Fall back to JIT with 128-bit values. They're not that common, and falling back is definitely better than throwing an error instead of the result. If we feel motivated, we might end up implementing support for these, but it's unclear whether it's worth the effort/complexity. Fixes PR38925. Added: lldb/trunk/packages/Python/lldbsuite/test/expression_command/rdar44436068/ lldb/trunk/packages/Python/lldbsuite/test/expression_command/rdar44436068/Makefile lldb/trunk/packages/Python/lldbsuite/test/expression_command/rdar44436068/Test128BitsInteger.py lldb/trunk/packages/Python/lldbsuite/test/expression_command/rdar44436068/main.c Modified: lldb/trunk/source/Expression/IRInterpreter.cpp Added: lldb/trunk/packages/Python/lldbsuite/test/expression_command/rdar44436068/Makefile URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/rdar44436068/Makefile?rev=342262&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/expression_command/rdar44436068/Makefile (added) +++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/rdar44436068/Makefile Fri Sep 14 11:55:31 2018 @@ -0,0 +1,3 @@ +LEVEL = ../../make +C_SOURCES := main.c +include $(LEVEL)/Makefile.rules Added: lldb/trunk/packages/Python/lldbsuite/test/expression_command/rdar44436068/Test128BitsInteger.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/rdar44436068/Test128BitsInteger.py?rev=342262&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/expression_command/rdar44436068/Test128BitsInteger.py (added) +++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/rdar44436068/Test128BitsInteger.py Fri Sep 14 11:55:31 2018 @@ -0,0 +1,4 @@ +from lldbsuite.test import lldbinline +from lldbsuite.test import decorators + +lldbinline.MakeInlineTest(__file__, globals(), None) Added: lldb/trunk/packages/Python/lldbsuite/test/expression_command/rdar44436068/main.c URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/rdar44436068/main.c?rev=342262&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/expression_command/rdar44436068/main.c (added) +++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/rdar44436068/main.c Fri Sep 14 11:55:31 2018 @@ -0,0 +1,8 @@ +int main(void) +{ +__int128_t n = 1; +n = n + n; +return n; //%self.expect("p n", substrs=['(__int128_t) $0 = 2']) + //%self.expect("p n + 6", substrs=['(__int128) $1 = 8']) + //%self.expect("p n + n", substrs=['(__int128) $2 = 4']) +} Modified: lldb/trunk/source/Expression/IRInterpreter.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRInterpreter.cpp?rev=342262&r1=342261&r2=342262&view=diff == --- lldb/trunk/source/Expression/IRInterpreter.cpp (original) +++ lldb/trunk/source/Expression/IRInterpreter.cpp Fri Sep 14 11:55:31 2018 @@ -613,6 +613,18 @@ bool IRInterpreter::CanInterpret(llvm::M } } +// The IR interpreter currently doesn't know about +// 128-bit integers. As they're not that frequent, +// we can just fall back to the JIT rather than +// choking. +if (operand_type->getPrimitiveSizeInBits() > 64) { + if (log) +log->Printf("Unsupported operand type: %s", +PrintType(operand_type).c_str()); + error.SetErrorString(unsupported_operand_error); + return false; +} + if (Constant *constant = llvm::dyn_cast(operand)) { if (!CanResolveConstant(constant)) { if (log) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r342280 - [IRInterpreter] Minor cleanups, add comments. NFCI.
Author: davide Date: Fri Sep 14 13:48:34 2018 New Revision: 342280 URL: http://llvm.org/viewvc/llvm-project?rev=342280&view=rev Log: [IRInterpreter] Minor cleanups, add comments. NFCI. Modified: lldb/trunk/source/Expression/IRInterpreter.cpp Modified: lldb/trunk/source/Expression/IRInterpreter.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRInterpreter.cpp?rev=342280&r1=342279&r2=342280&view=diff == --- lldb/trunk/source/Expression/IRInterpreter.cpp (original) +++ lldb/trunk/source/Expression/IRInterpreter.cpp Fri Sep 14 13:48:34 2018 @@ -601,17 +601,13 @@ bool IRInterpreter::CanInterpret(llvm::M Value *operand = ii->getOperand(oi); Type *operand_type = operand->getType(); -switch (operand_type->getTypeID()) { -default: - break; -case Type::VectorTyID: { +// Vectors are currently unsupported, give up. +if (operand_type->getTypeID() == Type::VectorTyID) if (log) log->Printf("Unsupported operand type: %s", PrintType(operand_type).c_str()); error.SetErrorString(unsupported_operand_error); return false; -} -} // The IR interpreter currently doesn't know about // 128-bit integers. As they're not that frequent, @@ -625,7 +621,7 @@ bool IRInterpreter::CanInterpret(llvm::M return false; } -if (Constant *constant = llvm::dyn_cast(operand)) { +if (auto *constant = llvm::dyn_cast(operand)) { if (!CanResolveConstant(constant)) { if (log) log->Printf("Unsupported constant: %s", ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r342404 - Revert "[IRInterpreter] Minor cleanups, add comments. NFCI."
Author: davide Date: Mon Sep 17 11:14:38 2018 New Revision: 342404 URL: http://llvm.org/viewvc/llvm-project?rev=342404&view=rev Log: Revert "[IRInterpreter] Minor cleanups, add comments. NFCI." This breaks buildbots. Modified: lldb/trunk/source/Expression/IRInterpreter.cpp Modified: lldb/trunk/source/Expression/IRInterpreter.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRInterpreter.cpp?rev=342404&r1=342403&r2=342404&view=diff == --- lldb/trunk/source/Expression/IRInterpreter.cpp (original) +++ lldb/trunk/source/Expression/IRInterpreter.cpp Mon Sep 17 11:14:38 2018 @@ -601,13 +601,17 @@ bool IRInterpreter::CanInterpret(llvm::M Value *operand = ii->getOperand(oi); Type *operand_type = operand->getType(); -// Vectors are currently unsupported, give up. -if (operand_type->getTypeID() == Type::VectorTyID) +switch (operand_type->getTypeID()) { +default: + break; +case Type::VectorTyID: { if (log) log->Printf("Unsupported operand type: %s", PrintType(operand_type).c_str()); error.SetErrorString(unsupported_operand_error); return false; +} +} // The IR interpreter currently doesn't know about // 128-bit integers. As they're not that frequent, @@ -621,7 +625,7 @@ bool IRInterpreter::CanInterpret(llvm::M return false; } -if (auto *constant = llvm::dyn_cast(operand)) { +if (Constant *constant = llvm::dyn_cast(operand)) { if (!CanResolveConstant(constant)) { if (log) log->Printf("Unsupported constant: %s", ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r342421 - [DataFormatters] Add formatter for C++17 std::variant
I'm afraid this broke one of our bots. Can you please take a look and fix or revert? Thanks! Testing Time: 236.25s Failing Tests (1): lldb-Suite :: functionalities/data-formatter/data-formatter-stl/libcxx/variant/TestDataFormatterLibcxxVariant.py http://green.lab.llvm.org/green/job/lldb-cmake-clang-5.0.2//418/console On Mon, Sep 17, 2018 at 3:11 PM Shafik Yaghmour via lldb-commits wrote: > > Author: shafik > Date: Mon Sep 17 15:10:44 2018 > New Revision: 342421 > > URL: http://llvm.org/viewvc/llvm-project?rev=342421&view=rev > Log: > [DataFormatters] Add formatter for C++17 std::variant > > rdar://problem/43691454 > > Patch by Shafik Yaghmour. > > Differential Revision: https://reviews.llvm.org/D51520 > > Added: > > lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/variant/ > > lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/variant/Makefile > > lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/variant/TestDataFormatterLibcxxVariant.py > > lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/variant/main.cpp > lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxVariant.cpp > lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxVariant.h > Modified: > lldb/trunk/lldb.xcodeproj/project.pbxproj > lldb/trunk/source/Plugins/Language/CPlusPlus/CMakeLists.txt > lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp > lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxx.h > > Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=342421&r1=342420&r2=342421&view=diff > == > --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original) > +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Mon Sep 17 15:10:44 2018 > @@ -401,6 +401,8 @@ > AF9FF1F71FAA79FE00474976 /* LibCxxQueue.cpp in Sources */ = > {isa = PBXBuildFile; fileRef = AF9FF1F61FAA79FE00474976 /* LibCxxQueue.cpp > */; }; > AF9FF1F51FAA79A400474976 /* LibCxxTuple.cpp in Sources */ = > {isa = PBXBuildFile; fileRef = AF9FF1F41FAA79A400474976 /* LibCxxTuple.cpp > */; }; > 945261C41B9A11FC00BF138D /* LibCxxUnorderedMap.cpp in Sources > */ = {isa = PBXBuildFile; fileRef = 945261BA1B9A11E800BF138D /* > LibCxxUnorderedMap.cpp */; }; > + E414F6F121388F6C00C50BC6 /* LibCxxVariant.cpp in Sources */ = > {isa = PBXBuildFile; fileRef = E414F6F021388F6B00C50BC6 /* LibCxxVariant.cpp > */; }; > + E414F6EE21388F0300C50BC6 /* LibCxxVariant.h in Headers */ = > {isa = PBXBuildFile; fileRef = E414F6ED21388F0200C50BC6 /* LibCxxVariant.h > */; }; > 945261C51B9A11FC00BF138D /* LibCxxVector.cpp in Sources */ = > {isa = PBXBuildFile; fileRef = 945261BB1B9A11E800BF138D /* LibCxxVector.cpp > */; }; > 945261C61B9A11FC00BF138D /* LibStdcpp.cpp in Sources */ = > {isa = PBXBuildFile; fileRef = 945261BC1B9A11E800BF138D /* LibStdcpp.cpp */; > }; > 4CDB8D6E1DBA91B6006C5B13 /* LibStdcppTuple.cpp in Sources */ > = {isa = PBXBuildFile; fileRef = 4CDB8D681DBA91A6006C5B13 /* > LibStdcppTuple.cpp */; }; > @@ -2056,6 +2058,8 @@ > AF9FF1F61FAA79FE00474976 /* LibCxxQueue.cpp */ = {isa = > PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; > name = LibCxxQueue.cpp; path = Language/CPlusPlus/LibCxxQueue.cpp; sourceTree > = ""; }; > AF9FF1F41FAA79A400474976 /* LibCxxTuple.cpp */ = {isa = > PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; > name = LibCxxTuple.cpp; path = Language/CPlusPlus/LibCxxTuple.cpp; sourceTree > = ""; }; > 945261BA1B9A11E800BF138D /* LibCxxUnorderedMap.cpp */ = {isa > = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = > LibCxxUnorderedMap.cpp; path = Language/CPlusPlus/LibCxxUnorderedMap.cpp; > sourceTree = ""; }; > + E414F6F021388F6B00C50BC6 /* LibCxxVariant.cpp */ = {isa = > PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; > name = LibCxxVariant.cpp; path = Language/CPlusPlus/LibCxxVariant.cpp; > sourceTree = ""; }; > + E414F6ED21388F0200C50BC6 /* LibCxxVariant.h */ = {isa = > PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name > = LibCxxVariant.h; path = Language/CPlusPlus/LibCxxVariant.h; sourceTree = > ""; }; > 945261BB1B9A11E800BF138D /* LibCxxVector.cpp */ = {isa = > PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = > LibCxxVector.cpp; path = Language/CPlusPlus/LibCxxVector.cpp; sourceTree = > ""; }; > 945261BC1B9A11E800BF138D /* LibStdcpp.cpp */ = {isa = >
Re: [Lldb-commits] [lldb] r342424 - Revert "[DataFormatters] Add formatter for C++17 std::variant"
Thanks Shafik! -- Davide On Mon, Sep 17, 2018 at 4:16 PM Shafik Yaghmour via lldb-commits wrote: > > Author: shafik > Date: Mon Sep 17 16:15:35 2018 > New Revision: 342424 > > URL: http://llvm.org/viewvc/llvm-project?rev=342424&view=rev > Log: > Revert "[DataFormatters] Add formatter for C++17 std::variant" > > This reverts commit r342421. > > Because it breaks build bot > http://green.lab.llvm.org/green/job/lldb-cmake-clang-5.0.2//418/console > > Removed: > > lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/variant/Makefile > > lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/variant/TestDataFormatterLibcxxVariant.py > > lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/variant/main.cpp > lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxVariant.cpp > lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxVariant.h > Modified: > lldb/trunk/lldb.xcodeproj/project.pbxproj > lldb/trunk/source/Plugins/Language/CPlusPlus/CMakeLists.txt > lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp > lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxx.h > > Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=342424&r1=342423&r2=342424&view=diff > == > --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original) > +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Mon Sep 17 16:15:35 2018 > @@ -401,8 +401,6 @@ > AF9FF1F71FAA79FE00474976 /* LibCxxQueue.cpp in Sources */ = > {isa = PBXBuildFile; fileRef = AF9FF1F61FAA79FE00474976 /* LibCxxQueue.cpp > */; }; > AF9FF1F51FAA79A400474976 /* LibCxxTuple.cpp in Sources */ = > {isa = PBXBuildFile; fileRef = AF9FF1F41FAA79A400474976 /* LibCxxTuple.cpp > */; }; > 945261C41B9A11FC00BF138D /* LibCxxUnorderedMap.cpp in Sources > */ = {isa = PBXBuildFile; fileRef = 945261BA1B9A11E800BF138D /* > LibCxxUnorderedMap.cpp */; }; > - E414F6F121388F6C00C50BC6 /* LibCxxVariant.cpp in Sources */ = > {isa = PBXBuildFile; fileRef = E414F6F021388F6B00C50BC6 /* LibCxxVariant.cpp > */; }; > - E414F6EE21388F0300C50BC6 /* LibCxxVariant.h in Headers */ = > {isa = PBXBuildFile; fileRef = E414F6ED21388F0200C50BC6 /* LibCxxVariant.h > */; }; > 945261C51B9A11FC00BF138D /* LibCxxVector.cpp in Sources */ = > {isa = PBXBuildFile; fileRef = 945261BB1B9A11E800BF138D /* LibCxxVector.cpp > */; }; > 945261C61B9A11FC00BF138D /* LibStdcpp.cpp in Sources */ = > {isa = PBXBuildFile; fileRef = 945261BC1B9A11E800BF138D /* LibStdcpp.cpp */; > }; > 4CDB8D6E1DBA91B6006C5B13 /* LibStdcppTuple.cpp in Sources */ > = {isa = PBXBuildFile; fileRef = 4CDB8D681DBA91A6006C5B13 /* > LibStdcppTuple.cpp */; }; > @@ -2058,8 +2056,6 @@ > AF9FF1F61FAA79FE00474976 /* LibCxxQueue.cpp */ = {isa = > PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; > name = LibCxxQueue.cpp; path = Language/CPlusPlus/LibCxxQueue.cpp; sourceTree > = ""; }; > AF9FF1F41FAA79A400474976 /* LibCxxTuple.cpp */ = {isa = > PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; > name = LibCxxTuple.cpp; path = Language/CPlusPlus/LibCxxTuple.cpp; sourceTree > = ""; }; > 945261BA1B9A11E800BF138D /* LibCxxUnorderedMap.cpp */ = {isa > = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = > LibCxxUnorderedMap.cpp; path = Language/CPlusPlus/LibCxxUnorderedMap.cpp; > sourceTree = ""; }; > - E414F6F021388F6B00C50BC6 /* LibCxxVariant.cpp */ = {isa = > PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; > name = LibCxxVariant.cpp; path = Language/CPlusPlus/LibCxxVariant.cpp; > sourceTree = ""; }; > - E414F6ED21388F0200C50BC6 /* LibCxxVariant.h */ = {isa = > PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name > = LibCxxVariant.h; path = Language/CPlusPlus/LibCxxVariant.h; sourceTree = > ""; }; > 945261BB1B9A11E800BF138D /* LibCxxVector.cpp */ = {isa = > PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = > LibCxxVector.cpp; path = Language/CPlusPlus/LibCxxVector.cpp; sourceTree = > ""; }; > 945261BC1B9A11E800BF138D /* LibStdcpp.cpp */ = {isa = > PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = > LibStdcpp.cpp; path = Language/CPlusPlus/LibStdcpp.cpp; sourceTree = > ""; }; > 945261BD1B9A11E800BF138D /* LibStdcpp.h */ = {isa = > PBXFileReference; lastKnownFileType = sourcecode.c.h; name = LibStdcpp.h; > path = Language/CPlusPlus/LibStdcpp.h; sourceTree = ""; }; > @@ -6479,8 +6475,6 @@ >
Re: [Lldb-commits] [lldb] r337459 - ELF: Replace the header-extension unit test with a lit one
Pavel, I guess this one is yours. http://green.lab.llvm.org/green/job/lldb-cmake-clang-6.0.1//484/console Mind to fix? FAILED: tools/lldb/unittests/ObjectFile/ELF/ObjectFileELFTests : && /Users/buildslave/jenkins/workspace/lldb-cmake-clang-6.0.1/host-compiler/bin/clang++ -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -std=c++11 -fmodules -fmodules-cache-path=/Users/buildslave/jenkins/workspace/lldb-cmake-clang-6.0.1/lldb-build/module.cache -fcxx-modules -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-deprecated-register -Wno-vla-extension -O3 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-dead_strip tools/lldb/unittests/ObjectFile/ELF/CMakeFiles/ObjectFileELFTests.dir/TestObjectFileELF.cpp.o -o tools/lldb/unittests/ObjectFile/ELF/ObjectFileELFTests -F/System/Library/PrivateFrameworks lib/libLLVMSupport.a lib/libgtest_main.a lib/libgtest.a lib/liblldbPluginObjectFileELF.a lib/liblldbPluginSymbolVendorELF.a lib/liblldbCore.a lib/liblldbUtilityHelpers.a -lpthread lib/liblldbHost.a lib/liblldbSymbol.a lib/liblldbTarget.a lib/liblldbBreakpoint.a lib/liblldbDataFormatters.a lib/liblldbExpression.a lib/liblldbInterpreter.a lib/liblldbPluginProcessUtility.a lib/liblldbPluginCPlusPlusLanguage.a lib/liblldbPluginObjCLanguage.a lib/liblldbHostMacOSXObjCXX.a lib/liblldbPluginExpressionParserClang.a lib/liblldbPluginExpressionParserGo.a lib/liblldbPluginSymbolFileDWARF.a lib/liblldbPluginSymbolFilePDB.a lib/liblldbPluginObjectFileJIT.a lib/liblldbCommands.a lib/liblldbPluginClangCommon.a lib/liblldbPluginAppleObjCRuntime.a lib/liblldbCore.a lib/liblldbHost.a lib/liblldbSymbol.a lib/liblldbTarget.a lib/liblldbBreakpoint.a lib/liblldbDataFormatters.a lib/liblldbExpression.a lib/liblldbInterpreter.a lib/liblldbPluginProcessUtility.a lib/liblldbPluginCPlusPlusLanguage.a lib/liblldbPluginObjCLanguage.a lib/liblldbHostMacOSXObjCXX.a lib/liblldbPluginExpressionParserClang.a lib/liblldbPluginExpressionParserGo.a lib/liblldbPluginSymbolFileDWARF.a lib/liblldbPluginSymbolFilePDB.a lib/liblldbPluginObjectFileJIT.a lib/liblldbCommands.a lib/liblldbPluginClangCommon.a lib/liblldbPluginAppleObjCRuntime.a lib/liblldbCore.a lib/liblldbHost.a lib/liblldbSymbol.a lib/liblldbTarget.a lib/liblldbBreakpoint.a lib/liblldbDataFormatters.a lib/liblldbExpression.a lib/liblldbInterpreter.a lib/liblldbPluginProcessUtility.a lib/liblldbPluginCPlusPlusLanguage.a lib/liblldbPluginObjCLanguage.a lib/liblldbHostMacOSXObjCXX.a lib/liblldbPluginExpressionParserClang.a lib/liblldbPluginExpressionParserGo.a lib/liblldbPluginSymbolFileDWARF.a lib/liblldbPluginSymbolFilePDB.a lib/liblldbPluginObjectFileJIT.a lib/liblldbCommands.a lib/liblldbPluginClangCommon.a lib/liblldbPluginAppleObjCRuntime.a lib/liblldbCore.a lib/liblldbHost.a lib/liblldbSymbol.a lib/liblldbTarget.a lib/liblldbBreakpoint.a lib/liblldbDataFormatters.a lib/liblldbExpression.a lib/liblldbInterpreter.a lib/liblldbPluginProcessUtility.a lib/liblldbPluginCPlusPlusLanguage.a lib/liblldbPluginObjCLanguage.a lib/liblldbHostMacOSXObjCXX.a lib/liblldbPluginExpressionParserClang.a lib/liblldbPluginExpressionParserGo.a lib/liblldbPluginSymbolFileDWARF.a lib/liblldbPluginSymbolFilePDB.a lib/liblldbPluginObjectFileJIT.a lib/liblldbCommands.a lib/liblldbPluginClangCommon.a lib/liblldbPluginAppleObjCRuntime.a lib/libclangCodeGen.a lib/libLLVMCoroutines.a lib/libLLVMCoverage.a lib/libLLVMLTO.a lib/libLLVMObjCARCOpts.a lib/libLLVMPasses.a lib/libLLVMCodeGen.a lib/libclangRewriteFrontend.a lib/libclangFrontend.a lib/libclangDriver.a lib/libclangParse.a lib/libLLVMOption.a lib/libclangSerialization.a lib/libclangSema.a lib/libclangEdit.a lib/libclangAnalysis.a lib/libclangASTMatchers.a lib/libclangRewrite.a lib/libLLVMipo.a lib/libLLVMBitWriter.a lib/libLLVMIRReader.a lib/libLLVMAsmParser.a lib/libLLVMInstrumentation.a lib/libLLVMLinker.a lib/libLLVMScalarOpts.a lib/libLLVMAggressiveInstCombine.a lib/libLLVMInstCombine.a lib/libLLVMVectorize.a lib/libLLVMTransformUtils.a lib/libLLVMMCJIT.a lib/libLLVMExecutionEngine.a lib/libLLVMRuntimeDyld.a lib/libLLVMTarget.a lib/libLLVMAnalysis.a lib/libLLVMProfileData.a lib/libLLVMDebugInfoDWARF.a lib/libLLVMDebugInfoPDB.a lib/libLLVMObject.a lib/libLLVMBitReader.a lib/libLLVMMCParser.a lib/liblldbBase.a lib/libclangAST.a lib/libclangLex.a lib/libclangBasic.a lib/libLLVMCore.a lib/libLLVMMC.a lib/libLLVMDebugInfoCodeView.a lib/libLLVMDebugInfoMSF.a lib/liblldbUtility.a lib/libLLVMBinaryFormat.a lib/libLLVMSupport.a -lz -lm lib/libLLVMDemangle.a -ledit /usr/lib/libpython2.7.dylib -lxml2 -framework Foundation -framework CoreFoundation -framework CoreServices -framework Security -framework DebugSymbols /usr/lib/libcurses.dylib /usr/lib/libform.d
Re: [Lldb-commits] [lldb] r337459 - ELF: Replace the header-extension unit test with a lit one
Nevermind, wrong commit. On Wed, Sep 19, 2018 at 2:26 PM Davide Italiano wrote: > > Pavel, I guess this one is yours. > http://green.lab.llvm.org/green/job/lldb-cmake-clang-6.0.1//484/console > > Mind to fix? > > FAILED: tools/lldb/unittests/ObjectFile/ELF/ObjectFileELFTests : && > /Users/buildslave/jenkins/workspace/lldb-cmake-clang-6.0.1/host-compiler/bin/clang++ > -fPIC -fvisibility-inlines-hidden -Werror=date-time > -Werror=unguarded-availability-new -std=c++11 -fmodules > -fmodules-cache-path=/Users/buildslave/jenkins/workspace/lldb-cmake-clang-6.0.1/lldb-build/module.cache > -fcxx-modules -Wall -Wextra -Wno-unused-parameter -Wwrite-strings > -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long > -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor > -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color > -Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-strict-aliasing > -Wno-deprecated-register -Wno-vla-extension -O3 > -Wl,-search_paths_first -Wl,-headerpad_max_install_names > -Wl,-dead_strip > tools/lldb/unittests/ObjectFile/ELF/CMakeFiles/ObjectFileELFTests.dir/TestObjectFileELF.cpp.o > -o tools/lldb/unittests/ObjectFile/ELF/ObjectFileELFTests > -F/System/Library/PrivateFrameworks lib/libLLVMSupport.a > lib/libgtest_main.a lib/libgtest.a lib/liblldbPluginObjectFileELF.a > lib/liblldbPluginSymbolVendorELF.a lib/liblldbCore.a > lib/liblldbUtilityHelpers.a -lpthread lib/liblldbHost.a > lib/liblldbSymbol.a lib/liblldbTarget.a lib/liblldbBreakpoint.a > lib/liblldbDataFormatters.a lib/liblldbExpression.a > lib/liblldbInterpreter.a lib/liblldbPluginProcessUtility.a > lib/liblldbPluginCPlusPlusLanguage.a lib/liblldbPluginObjCLanguage.a > lib/liblldbHostMacOSXObjCXX.a lib/liblldbPluginExpressionParserClang.a > lib/liblldbPluginExpressionParserGo.a > lib/liblldbPluginSymbolFileDWARF.a lib/liblldbPluginSymbolFilePDB.a > lib/liblldbPluginObjectFileJIT.a lib/liblldbCommands.a > lib/liblldbPluginClangCommon.a lib/liblldbPluginAppleObjCRuntime.a > lib/liblldbCore.a lib/liblldbHost.a lib/liblldbSymbol.a > lib/liblldbTarget.a lib/liblldbBreakpoint.a > lib/liblldbDataFormatters.a lib/liblldbExpression.a > lib/liblldbInterpreter.a lib/liblldbPluginProcessUtility.a > lib/liblldbPluginCPlusPlusLanguage.a lib/liblldbPluginObjCLanguage.a > lib/liblldbHostMacOSXObjCXX.a lib/liblldbPluginExpressionParserClang.a > lib/liblldbPluginExpressionParserGo.a > lib/liblldbPluginSymbolFileDWARF.a lib/liblldbPluginSymbolFilePDB.a > lib/liblldbPluginObjectFileJIT.a lib/liblldbCommands.a > lib/liblldbPluginClangCommon.a lib/liblldbPluginAppleObjCRuntime.a > lib/liblldbCore.a lib/liblldbHost.a lib/liblldbSymbol.a > lib/liblldbTarget.a lib/liblldbBreakpoint.a > lib/liblldbDataFormatters.a lib/liblldbExpression.a > lib/liblldbInterpreter.a lib/liblldbPluginProcessUtility.a > lib/liblldbPluginCPlusPlusLanguage.a lib/liblldbPluginObjCLanguage.a > lib/liblldbHostMacOSXObjCXX.a lib/liblldbPluginExpressionParserClang.a > lib/liblldbPluginExpressionParserGo.a > lib/liblldbPluginSymbolFileDWARF.a lib/liblldbPluginSymbolFilePDB.a > lib/liblldbPluginObjectFileJIT.a lib/liblldbCommands.a > lib/liblldbPluginClangCommon.a lib/liblldbPluginAppleObjCRuntime.a > lib/liblldbCore.a lib/liblldbHost.a lib/liblldbSymbol.a > lib/liblldbTarget.a lib/liblldbBreakpoint.a > lib/liblldbDataFormatters.a lib/liblldbExpression.a > lib/liblldbInterpreter.a lib/liblldbPluginProcessUtility.a > lib/liblldbPluginCPlusPlusLanguage.a lib/liblldbPluginObjCLanguage.a > lib/liblldbHostMacOSXObjCXX.a lib/liblldbPluginExpressionParserClang.a > lib/liblldbPluginExpressionParserGo.a > lib/liblldbPluginSymbolFileDWARF.a lib/liblldbPluginSymbolFilePDB.a > lib/liblldbPluginObjectFileJIT.a lib/liblldbCommands.a > lib/liblldbPluginClangCommon.a lib/liblldbPluginAppleObjCRuntime.a > lib/libclangCodeGen.a lib/libLLVMCoroutines.a lib/libLLVMCoverage.a > lib/libLLVMLTO.a lib/libLLVMObjCARCOpts.a lib/libLLVMPasses.a > lib/libLLVMCodeGen.a lib/libclangRewriteFrontend.a > lib/libclangFrontend.a lib/libclangDriver.a lib/libclangParse.a > lib/libLLVMOption.a lib/libclangSerialization.a lib/libclangSema.a > lib/libclangEdit.a lib/libclangAnalysis.a lib/libclangASTMatchers.a > lib/libclangRewrite.a lib/libLLVMipo.a lib/libLLVMBitWriter.a > lib/libLLVMIRReader.a lib/libLLVMAsmParser.a > lib/libLLVMInstrumentation.a lib/libLLVMLinker.a > lib/libLLVMScalarOpts.a lib/libLLVMAggressiveInstCombine.a > lib/libLLVMInstCombine.a lib/libLLVMVectorize.a > lib/libLLVMTransformUtils.a lib/libLLVMMCJIT.a > lib/libLLVMExecutionEngine.a lib/libLLVMRuntimeDyld.a > lib/libLLVMTarget.a lib/libLLVMAnalysis.a lib/libLLVMProfileData.a > lib/libLLVMDebugInfoDWARF.a lib/libLLVMDebugInfoPDB.a > lib/libLLVMObject.a lib/libLLVMBitReader.a lib/libLLVMMCParser.a > lib/liblldbBase.a lib/libclangAST.a lib/libclangLex.a > lib/libclangBasic.a lib/libLLVMCore.a lib/libLLVMMC.a > lib/libLLVMDebugInfoCodeView.a lib/libLLVMDebugInfoMSF.a > lib/liblldbUtility.a lib/libLLVMBinaryFormat.a lib/l
[Lldb-commits] [lldb] r318348 - [POSIX] Replace assert with llvm_unreachable(). NFCI.
Author: davide Date: Wed Nov 15 15:39:41 2017 New Revision: 318348 URL: http://llvm.org/viewvc/llvm-project?rev=318348&view=rev Log: [POSIX] Replace assert with llvm_unreachable(). NFCI. Modified: lldb/trunk/source/Host/posix/HostThreadPosix.cpp Modified: lldb/trunk/source/Host/posix/HostThreadPosix.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/posix/HostThreadPosix.cpp?rev=318348&r1=318347&r2=318348&view=diff == --- lldb/trunk/source/Host/posix/HostThreadPosix.cpp (original) +++ lldb/trunk/source/Host/posix/HostThreadPosix.cpp Wed Nov 15 15:39:41 2017 @@ -43,7 +43,7 @@ Status HostThreadPosix::Cancel() { if (IsJoinable()) { #ifndef __ANDROID__ #ifndef __FreeBSD__ -assert(false && "someone is calling HostThread::Cancel()"); +llvm_unreachable("someone is calling HostThread::Cancel()"); #endif int err = ::pthread_cancel(m_thread); error.SetError(err, eErrorTypePOSIX); ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits