[Lldb-commits] [PATCH] D40133: elf-core: Convert remaining register context to use register set maps
labath added a comment. In https://reviews.llvm.org/D40133#927655, @krytarowski wrote: > I'm just thinking whether change code like `CoreRegset::PPC_VMX` to > `CoreRegset::PPC::VMX`. I'm planning to add `CoreRegset::X86_64::XSAVE` in > future. That's an interesting idea, but I don't see how would that be possible -- enum values can't have nested names. I suppose we could fake that by making `CoreRegset` and `CoreRegset::X86_64` namespaces, but then the name of the enum type would have to be something different (`CoreRegset::Type`?). I am not sure if that's worth the trouble. I don't think we will have that many register sets, so it's probably fine to have flat namespaces for arch/regset combinations. https://reviews.llvm.org/D40133 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D40133: elf-core: Convert remaining register context to use register set maps
clayborg added inline comments. Comment at: source/Plugins/Process/elf-core/elf-core-enums.h:58 +enum class CoreRegset : uint8_t { GPR, FPR, PPC_VMX, PPC_VSX }; + Seems weird to have PPC_VMX and PPC_VSX define in a CoreRegSet? Do these need to be specific for each arch? Why is everyone trying to use these? https://reviews.llvm.org/D40133 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D40133: elf-core: Convert remaining register context to use register set maps
It would be great if we could eventually just use llvm-tblgen to generate all these register definitions. On Fri, Nov 17, 2017 at 9:54 AM Greg Clayton via Phabricator via lldb-commits wrote: > clayborg added inline comments. > > > > Comment at: source/Plugins/Process/elf-core/elf-core-enums.h:58 > > +enum class CoreRegset : uint8_t { GPR, FPR, PPC_VMX, PPC_VSX }; > + > > Seems weird to have PPC_VMX and PPC_VSX define in a CoreRegSet? Do these > need to be specific for each arch? Why is everyone trying to use these? > > > > > https://reviews.llvm.org/D40133 > > > > ___ > 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] r318554 - [lldb] Ensure that dwo/dwp are not double-indexed
Author: alexshap Date: Fri Nov 17 12:50:54 2017 New Revision: 318554 URL: http://llvm.org/viewvc/llvm-project?rev=318554&view=rev Log: [lldb] Ensure that dwo/dwp are not double-indexed DWO/DWP should not be indexed directly. Instead, the corresponding base file should be used. This diff adds an assert to DWARFCompileUnit::Index and adjusts the methods SymbolFileDWARF::FindCompleteObjCDefinitionTypeForDIE, SymbolFileDWARF::GetObjCMethodDIEOffsets accordingly. Differential revision: https://reviews.llvm.org/D39825 Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp?rev=318554&r1=318553&r2=318554&view=diff == --- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp (original) +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp Fri Nov 17 12:50:54 2017 @@ -620,6 +620,10 @@ void DWARFCompileUnit::Index(NameToDIE & NameToDIE &objc_class_selectors, NameToDIE &globals, NameToDIE &types, NameToDIE &namespaces) { + assert(!m_dwarf2Data->GetBaseCompileUnit() && + "DWARFCompileUnit associated with .dwo or .dwp " + "should not be indexed directly"); + Log *log(LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS)); if (log) { Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=318554&r1=318553&r2=318554&view=diff == --- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original) +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Fri Nov 17 12:50:54 2017 @@ -209,6 +209,10 @@ static const char *resolveCompDir(const return nullptr; } +DWARFCompileUnit *SymbolFileDWARF::GetBaseCompileUnit() { + return nullptr; +} + void SymbolFileDWARF::Initialize() { LogChannelDWARF::Initialize(); PluginManager::RegisterPlugin(GetPluginNameStatic(), Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h?rev=318554&r1=318553&r2=318554&view=diff == --- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h (original) +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h Fri Nov 17 12:50:54 2017 @@ -276,8 +276,8 @@ public: GetCompUnitForDWARFCompUnit(DWARFCompileUnit *dwarf_cu, uint32_t cu_idx = UINT32_MAX); - size_t GetObjCMethodDIEOffsets(lldb_private::ConstString class_name, - DIEArray &method_die_offsets); + virtual size_t GetObjCMethodDIEOffsets(lldb_private::ConstString class_name, + DIEArray &method_die_offsets); bool Supports_DW_AT_APPLE_objc_complete_type(DWARFCompileUnit *cu); @@ -299,6 +299,11 @@ public: GetDwoSymbolFileForCompileUnit(DWARFCompileUnit &dwarf_cu, const DWARFDebugInfoEntry &cu_die); + // For regular SymbolFileDWARF instances the method returns nullptr, + // for the instances of the subclass SymbolFileDWARFDwo + // the method returns a pointer to the base compile unit. + virtual DWARFCompileUnit *GetBaseCompileUnit(); + protected: typedef llvm::DenseMap DIEToTypePtr; @@ -392,7 +397,7 @@ protected: virtual lldb::TypeSP FindDefinitionTypeForDWARFDeclContext(const DWARFDeclContext &die_decl_ctx); - lldb::TypeSP FindCompleteObjCDefinitionTypeForDIE( + virtual lldb::TypeSP FindCompleteObjCDefinitionTypeForDIE( const DWARFDIE &die, const lldb_private::ConstString &type_name, bool must_be_implementation); Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp?rev=318554&r1=318553&r2=318554&view=diff == --- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp (original) +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp Fri Nov 17 12:50:54 2017 @@ -99,6 +99,12 @@ SymbolFileDWARFDwo::GetForwardDeclClangT return GetBaseSymbolFile()->GetForwardDeclClangTypeTo
[Lldb-commits] [PATCH] D39825: [lldb] Ensure that dwo/dwp are not double-indexed
This revision was automatically updated to reflect the committed changes. Closed by commit rL318554: [lldb] Ensure that dwo/dwp are not double-indexed (authored by alexshap). Changed prior to commit: https://reviews.llvm.org/D39825?vs=122389&id=123403#toc Repository: rL LLVM https://reviews.llvm.org/D39825 Files: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp === --- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -209,6 +209,10 @@ return nullptr; } +DWARFCompileUnit *SymbolFileDWARF::GetBaseCompileUnit() { + return nullptr; +} + void SymbolFileDWARF::Initialize() { LogChannelDWARF::Initialize(); PluginManager::RegisterPlugin(GetPluginNameStatic(), Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp === --- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp @@ -620,6 +620,10 @@ NameToDIE &objc_class_selectors, NameToDIE &globals, NameToDIE &types, NameToDIE &namespaces) { + assert(!m_dwarf2Data->GetBaseCompileUnit() && + "DWARFCompileUnit associated with .dwo or .dwp " + "should not be indexed directly"); + Log *log(LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS)); if (log) { Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h === --- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h @@ -276,8 +276,8 @@ GetCompUnitForDWARFCompUnit(DWARFCompileUnit *dwarf_cu, uint32_t cu_idx = UINT32_MAX); - size_t GetObjCMethodDIEOffsets(lldb_private::ConstString class_name, - DIEArray &method_die_offsets); + virtual size_t GetObjCMethodDIEOffsets(lldb_private::ConstString class_name, + DIEArray &method_die_offsets); bool Supports_DW_AT_APPLE_objc_complete_type(DWARFCompileUnit *cu); @@ -299,6 +299,11 @@ GetDwoSymbolFileForCompileUnit(DWARFCompileUnit &dwarf_cu, const DWARFDebugInfoEntry &cu_die); + // For regular SymbolFileDWARF instances the method returns nullptr, + // for the instances of the subclass SymbolFileDWARFDwo + // the method returns a pointer to the base compile unit. + virtual DWARFCompileUnit *GetBaseCompileUnit(); + protected: typedef llvm::DenseMap DIEToTypePtr; @@ -392,7 +397,7 @@ virtual lldb::TypeSP FindDefinitionTypeForDWARFDeclContext(const DWARFDeclContext &die_decl_ctx); - lldb::TypeSP FindCompleteObjCDefinitionTypeForDIE( + virtual lldb::TypeSP FindCompleteObjCDefinitionTypeForDIE( const DWARFDIE &die, const lldb_private::ConstString &type_name, bool must_be_implementation); Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp === --- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp @@ -99,6 +99,12 @@ return GetBaseSymbolFile()->GetForwardDeclClangTypeToDie(); } +size_t SymbolFileDWARFDwo::GetObjCMethodDIEOffsets( +lldb_private::ConstString class_name, DIEArray &method_die_offsets) { + return GetBaseSymbolFile()->GetObjCMethodDIEOffsets( + class_name, method_die_offsets); +} + UniqueDWARFASTTypeMap &SymbolFileDWARFDwo::GetUniqueDWARFASTTypeMap() { return GetBaseSymbolFile()->GetUniqueDWARFASTTypeMap(); } @@ -109,6 +115,17 @@ die_decl_ctx); } +lldb::TypeSP SymbolFileDWARFDwo::FindCompleteObjCDefinitionTypeForDIE( +const DWARFDIE &die, const lldb_private::ConstString &type_name, +bool must_be_implementation) { + return GetBaseSymbolFile()->FindCompleteObjCDefinitionTypeForDIE( + die, type_name, must_be_implementation); +} + +DWARFCompileUnit *SymbolFileDWARFDwo::GetBaseCompileUnit() { + return m_base_dwarf_cu; +} + SymbolFileDWARF *SymbolFileDWARFDwo::GetBaseSymbolFile() { return m_base_dwarf_cu->GetSymbolFileDWARF(); } Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h === --- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h +++ lldb/trunk/source/Pl
[Lldb-commits] [PATCH] D40133: elf-core: Convert remaining register context to use register set maps
labath added inline comments. Comment at: source/Plugins/Process/elf-core/elf-core-enums.h:58 +enum class CoreRegset : uint8_t { GPR, FPR, PPC_VMX, PPC_VSX }; + clayborg wrote: > Seems weird to have PPC_VMX and PPC_VSX define in a CoreRegSet? Do these need > to be specific for each arch? Why is everyone trying to use these? > > This enum represents all possible register sets that we can find in the elf core files. Not all register contexts are expected to use all of them -- each register context just plucks out those that he knows about (if they were present in the core file). The enum (and the corresponding map) are intended as a replacement for the list of member variable register sets in the ThreadData struct. `vregset` (and the previous ppc64 patch was about to add one more) is already quite architecture-specific. While I do think that this is an improvement over the list-of-members solution, I am also not entirely happy with having these arch-specific sets in the enum. The alternative I thought of just now is to have a a plain vector instead of a map for register set data. Then, at the generic level, we will just be dealing with "register set 0", "register set 1", etc.. and when we consult the RegisterInfoInterface class, it will tell us that "register set 0" is in fact GPR, register set 2 is VMX, etc. What do you think? https://reviews.llvm.org/D40133 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r316800 - [CMake] Build clang as dependency when using in-tree clang for tests.
A few notes on this change. > On Oct 27, 2017, at 2:22 PM, Davide Italiano via lldb-commits > wrote: > > Author: davide > Date: Fri Oct 27 14:22:57 2017 > New Revision: 316800 > > URL: http://llvm.org/viewvc/llvm-project?rev=316800&view=rev > Log: > [CMake] Build clang as dependency when using in-tree clang for tests. > > Discussed with Zachary Turner and Pavel Labath on lldb-dev. > Let's hope this doesn't break anything :) > > Modified: >lldb/trunk/lit/CMakeLists.txt >lldb/trunk/test/CMakeLists.txt > > Modified: lldb/trunk/lit/CMakeLists.txt > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/CMakeLists.txt?rev=316800&r1=316799&r2=316800&view=diff > == > --- lldb/trunk/lit/CMakeLists.txt (original) > +++ lldb/trunk/lit/CMakeLists.txt Fri Oct 27 14:22:57 2017 > @@ -54,6 +54,12 @@ add_lit_testsuite(check-lldb-lit "Runnin > > set_target_properties(check-lldb-lit PROPERTIES FOLDER "LLDB tests") > > +# If we're building with an in-tree clang, then list clang as a dependency > +# to run tests. > +if (TARGET clang) > + add_dependencies(check-lldb-lit clang) > +endif() This is unnecessary. Higher up in the file clang is added to LLDB_TEST_DEPS, which gets setup correctly. > + > add_lit_testsuites(LLDB ${CMAKE_CURRENT_SOURCE_DIR} > PARAMS lldb_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg > lldb_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg > > Modified: lldb/trunk/test/CMakeLists.txt > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/test/CMakeLists.txt?rev=316800&r1=316799&r2=316800&view=diff > == > --- lldb/trunk/test/CMakeLists.txt (original) > +++ lldb/trunk/test/CMakeLists.txt Fri Oct 27 14:22:57 2017 > @@ -109,6 +109,12 @@ add_python_test_target(check-lldb > "Testing LLDB (parallel execution, with a separate subprocess per test)" > ) > > +# If we're building with an in-tree clang, then list clang as a dependency > +# to run tests. > +if (TARGET clang) > + add_dependencies(check-lldb clang) > +endif() This is only necessary because Pavel's change (r316728) broke it. Prior to Pavel's change we specified the in-tree compiler using a generator expression which is more robust and properly sets up a dependency. It would be much better to remove this and fix Pavel's patch to use generator expressions for finding the compiler. The fix for Pavel's patch would be to set `LLDB_DEFAULT_TEST_C_COMPILER` to `$` instead of trying to hand munge the path. We also should derive the CXX compiler from the C compiler as it is pretty unnecessary to define them separately. -Chris > + > add_custom_target(lldb-test-depends DEPENDS ${LLDB_TEST_DEPENDS}) > # This will add LLDB's test dependencies to the depenednecies for check-all > and > # include them in the test-depends target. > > > ___ > 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] [PATCH] D40133: elf-core: Convert remaining register context to use register set maps
clayborg added inline comments. Comment at: source/Plugins/Process/elf-core/elf-core-enums.h:58 +enum class CoreRegset : uint8_t { GPR, FPR, PPC_VMX, PPC_VSX }; + labath wrote: > clayborg wrote: > > Seems weird to have PPC_VMX and PPC_VSX define in a CoreRegSet? Do these > > need to be specific for each arch? Why is everyone trying to use these? > > > > > This enum represents all possible register sets that we can find in the elf > core files. Not all register contexts are expected to use all of them -- each > register context just plucks out those that he knows about (if they were > present in the core file). > > The enum (and the corresponding map) are intended as a replacement for the > list of member variable register sets in the ThreadData struct. `vregset` > (and the previous ppc64 patch was about to add one more) is already quite > architecture-specific. > > While I do think that this is an improvement over the list-of-members > solution, I am also not entirely happy with having these arch-specific sets > in the enum. > > The alternative I thought of just now is to have a a plain vector instead of > a map for register set data. Then, at the generic level, we will just be > dealing with "register set 0", "register set 1", etc.. and when we consult > the RegisterInfoInterface class, it will tell us that "register set 0" is in > fact GPR, register set 2 is VMX, etc. > > What do you think? I like the vector idea a bit better and I like the idea of the RegisterInfoInterface telling us that "register set at index 0" is GPR, etc. https://reviews.llvm.org/D40133 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r316800 - [CMake] Build clang as dependency when using in-tree clang for tests.
The issue with the generator expressions is that they are expanded in only in specific target properties, and here we need them to be expanded in configure_lit_site_cfg. If you know the right incantation to make that happen, then please let me know. Deriving the c++ compiler name is a bit tricky, because the name is very variable (sometimes it has a version suffix, sometimes it has a triple prefix), but it is doable. On 17 November 2017 at 21:44, Chris Bieneman wrote: > A few notes on this change. > >> On Oct 27, 2017, at 2:22 PM, Davide Italiano via lldb-commits >> wrote: >> >> Author: davide >> Date: Fri Oct 27 14:22:57 2017 >> New Revision: 316800 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=316800&view=rev >> Log: >> [CMake] Build clang as dependency when using in-tree clang for tests. >> >> Discussed with Zachary Turner and Pavel Labath on lldb-dev. >> Let's hope this doesn't break anything :) >> >> Modified: >>lldb/trunk/lit/CMakeLists.txt >>lldb/trunk/test/CMakeLists.txt >> >> Modified: lldb/trunk/lit/CMakeLists.txt >> URL: >> http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/CMakeLists.txt?rev=316800&r1=316799&r2=316800&view=diff >> == >> --- lldb/trunk/lit/CMakeLists.txt (original) >> +++ lldb/trunk/lit/CMakeLists.txt Fri Oct 27 14:22:57 2017 >> @@ -54,6 +54,12 @@ add_lit_testsuite(check-lldb-lit "Runnin >> >> set_target_properties(check-lldb-lit PROPERTIES FOLDER "LLDB tests") >> >> +# If we're building with an in-tree clang, then list clang as a dependency >> +# to run tests. >> +if (TARGET clang) >> + add_dependencies(check-lldb-lit clang) >> +endif() > > This is unnecessary. Higher up in the file clang is added to LLDB_TEST_DEPS, > which gets setup correctly. > >> + >> add_lit_testsuites(LLDB ${CMAKE_CURRENT_SOURCE_DIR} >> PARAMS lldb_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg >> lldb_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg >> >> Modified: lldb/trunk/test/CMakeLists.txt >> URL: >> http://llvm.org/viewvc/llvm-project/lldb/trunk/test/CMakeLists.txt?rev=316800&r1=316799&r2=316800&view=diff >> == >> --- lldb/trunk/test/CMakeLists.txt (original) >> +++ lldb/trunk/test/CMakeLists.txt Fri Oct 27 14:22:57 2017 >> @@ -109,6 +109,12 @@ add_python_test_target(check-lldb >> "Testing LLDB (parallel execution, with a separate subprocess per test)" >> ) >> >> +# If we're building with an in-tree clang, then list clang as a dependency >> +# to run tests. >> +if (TARGET clang) >> + add_dependencies(check-lldb clang) >> +endif() > > This is only necessary because Pavel's change (r316728) broke it. Prior to > Pavel's change we specified the in-tree compiler using a generator expression > which is more robust and properly sets up a dependency. > > It would be much better to remove this and fix Pavel's patch to use generator > expressions for finding the compiler. The fix for Pavel's patch would be to > set `LLDB_DEFAULT_TEST_C_COMPILER` to `$` instead of > trying to hand munge the path. We also should derive the CXX compiler from > the C compiler as it is pretty unnecessary to define them separately. > > -Chris > >> + >> add_custom_target(lldb-test-depends DEPENDS ${LLDB_TEST_DEPENDS}) >> # This will add LLDB's test dependencies to the depenednecies for check-all >> and >> # include them in the test-depends target. >> >> >> ___ >> 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] r318576 - [Core] Garbage collect dead code untouched in years. NFCI.
Author: davide Date: Fri Nov 17 16:34:09 2017 New Revision: 318576 URL: http://llvm.org/viewvc/llvm-project?rev=318576&view=rev Log: [Core] Garbage collect dead code untouched in years. NFCI. This sketching can be resurrected if anybody needs it, although I doubt is relevant these days. Modified: lldb/trunk/source/Core/FileSpecList.cpp Modified: lldb/trunk/source/Core/FileSpecList.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/FileSpecList.cpp?rev=318576&r1=318575&r2=318576&view=diff == --- lldb/trunk/source/Core/FileSpecList.cpp (original) +++ lldb/trunk/source/Core/FileSpecList.cpp Fri Nov 17 16:34:09 2017 @@ -147,36 +147,5 @@ size_t FileSpecList::GetSize() const { r size_t FileSpecList::GetFilesMatchingPartialPath(const char *path, bool dir_okay, FileSpecList &matches) { -#if 0 // FIXME: Just sketching... -matches.Clear(); -using namespace llvm::sys::fs; -file_status stats; -if (status(path, stats, false)) - return 0; -if (exists(stats)) { - if (is_symlink_file(stats)) { -// Shouldn't there be a method that realpath's a file? - } - if (is_regular_file(stats) || (is_directory(stats) && dir_okay)) { -matches.Append(FileSpec(path)); -return 1; - } else if (is_directory(stats)) { -// Fill the match list with all the files in the directory: - } else { -return 0; - } -} else { -ConstString dir_name = path_spec.GetDirectory(); -ConstString file_name = GetFilename(); -if (dir_name == nullptr) -{ -// Match files in the CWD. -} -else -{ -// Match files in the given directory: -} -} -#endif return 0; } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r318577 - [ABI/SysV] Remove more dead code. NFCI.
Author: davide Date: Fri Nov 17 16:35:27 2017 New Revision: 318577 URL: http://llvm.org/viewvc/llvm-project?rev=318577&view=rev Log: [ABI/SysV] Remove more dead code. NFCI. Modified: lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp Modified: lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp?rev=318577&r1=318576&r2=318577&view=diff == --- lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp (original) +++ lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp Fri Nov 17 16:35:27 2017 @@ -1161,48 +1161,6 @@ bool ABISysV_x86_64::PrepareTrivialCall( ProcessSP process_sp(thread.GetProcess()); RegisterValue reg_value; - -#if 0 -// This code adds an extra frame so that we don't lose the function that we came from -// by pushing the PC and the FP and then writing the current FP to point to the FP value -// we just pushed. It is disabled for now until the stack backtracing code can be debugged. - -// Save current PC -const RegisterInfo *fp_reg_info = reg_ctx->GetRegisterInfo (eRegisterKindGeneric, LLDB_REGNUM_GENERIC_FP); -if (reg_ctx->ReadRegister(pc_reg_info, reg_value)) -{ -if (log) -log->Printf("Pushing the current PC onto the stack: 0x%" PRIx64 ": 0x%" PRIx64, (uint64_t)sp, reg_value.GetAsUInt64()); - -if (!process_sp->WritePointerToMemory(sp, reg_value.GetAsUInt64(), error)) -return false; - -sp -= 8; - -// Save current FP -if (reg_ctx->ReadRegister(fp_reg_info, reg_value)) -{ -if (log) -log->Printf("Pushing the current FP onto the stack: 0x%" PRIx64 ": 0x%" PRIx64, (uint64_t)sp, reg_value.GetAsUInt64()); - -if (!process_sp->WritePointerToMemory(sp, reg_value.GetAsUInt64(), error)) -return false; -} -// Setup FP backchain -reg_value.SetUInt64 (sp); - -if (log) -log->Printf("Writing FP: 0x%" PRIx64 " (for FP backchain)", reg_value.GetAsUInt64()); - -if (!reg_ctx->WriteRegister(fp_reg_info, reg_value)) -{ -return false; -} - -sp -= 8; -} -#endif - if (log) log->Printf("Pushing the return address onto the stack: 0x%" PRIx64 ": 0x%" PRIx64, ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r318579 - [Module] Throw away some more commented code. NFCI.
Author: davide Date: Fri Nov 17 16:52:29 2017 New Revision: 318579 URL: http://llvm.org/viewvc/llvm-project?rev=318579&view=rev Log: [Module] Throw away some more commented code. NFCI. Modified: lldb/trunk/source/Core/Module.cpp Modified: lldb/trunk/source/Core/Module.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Module.cpp?rev=318579&r1=318578&r2=318579&view=diff == --- lldb/trunk/source/Core/Module.cpp (original) +++ lldb/trunk/source/Core/Module.cpp Fri Nov 17 16:52:29 2017 @@ -129,43 +129,6 @@ Module *Module::GetAllocatedModuleAtInde return nullptr; } -#if 0 -// These functions help us to determine if modules are still loaded, yet don't require that -// you have a command interpreter and can easily be called from an external debugger. -namespace lldb { - -void -ClearModuleInfo (void) -{ -const bool mandatory = true; -ModuleList::RemoveOrphanSharedModules(mandatory); -} - -void -DumpModuleInfo (void) -{ -Mutex::Locker locker (Module::GetAllocationModuleCollectionMutex()); -ModuleCollection &modules = GetModuleCollection(); -const size_t count = modules.size(); -printf ("%s: %" PRIu64 " modules:\n", LLVM_PRETTY_FUNCTION, (uint64_t)count); -for (size_t i = 0; i < count; ++i) -{ - -StreamString strm; -Module *module = modules[i]; -const bool in_shared_module_list = ModuleList::ModuleIsInCache (module); -module->GetDescription(&strm, eDescriptionLevelFull); -printf ("%p: shared = %i, ref_count = %3u, module = %s\n", -module, -in_shared_module_list, -(uint32_t)module->use_count(), -strm.GetString().c_str()); -} -} -} - -#endif - Module::Module(const ModuleSpec &module_spec) : m_object_offset(0), m_file_has_changed(false), m_first_file_changed_log(false) { ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r318580 - [ABI] Remove dead code that was copy-pasted all around. NFCI.
Author: davide Date: Fri Nov 17 16:54:31 2017 New Revision: 318580 URL: http://llvm.org/viewvc/llvm-project?rev=318580&view=rev Log: [ABI] Remove dead code that was copy-pasted all around. NFCI. Modified: lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp Modified: lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp?rev=318580&r1=318579&r2=318580&view=diff == --- lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp (original) +++ lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp Fri Nov 17 16:54:31 2017 @@ -291,47 +291,6 @@ bool ABISysV_ppc::PrepareTrivialCall(Thr RegisterValue reg_value; -#if 0 -// This code adds an extra frame so that we don't lose the function that we came from -// by pushing the PC and the FP and then writing the current FP to point to the FP value -// we just pushed. It is disabled for now until the stack backtracing code can be debugged. - -// Save current PC -const RegisterInfo *fp_reg_info = reg_ctx->GetRegisterInfo (eRegisterKindGeneric, LLDB_REGNUM_GENERIC_FP); -if (reg_ctx->ReadRegister(pc_reg_info, reg_value)) -{ -if (log) -log->Printf("Pushing the current PC onto the stack: 0x%" PRIx64 ": 0x%" PRIx64, (uint64_t)sp, reg_value.GetAsUInt64()); - -if (!process_sp->WritePointerToMemory(sp, reg_value.GetAsUInt64(), error)) -return false; - -sp -= 8; - -// Save current FP -if (reg_ctx->ReadRegister(fp_reg_info, reg_value)) -{ -if (log) -log->Printf("Pushing the current FP onto the stack: 0x%" PRIx64 ": 0x%" PRIx64, (uint64_t)sp, reg_value.GetAsUInt64()); - -if (!process_sp->WritePointerToMemory(sp, reg_value.GetAsUInt64(), error)) -return false; -} -// Setup FP backchain -reg_value.SetUInt64 (sp); - -if (log) -log->Printf("Writing FP: 0x%" PRIx64 " (for FP backchain)", reg_value.GetAsUInt64()); - -if (!reg_ctx->WriteRegister(fp_reg_info, reg_value)) -{ -return false; -} - -sp -= 8; -} -#endif - if (log) log->Printf("Pushing the return address onto the stack: 0x%" PRIx64 ": 0x%" PRIx64, Modified: lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp?rev=318580&r1=318579&r2=318580&view=diff == --- lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp (original) +++ lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp Fri Nov 17 16:54:31 2017 @@ -291,47 +291,6 @@ bool ABISysV_ppc64::PrepareTrivialCall(T RegisterValue reg_value; -#if 0 -// This code adds an extra frame so that we don't lose the function that we came from -// by pushing the PC and the FP and then writing the current FP to point to the FP value -// we just pushed. It is disabled for now until the stack backtracing code can be debugged. - -// Save current PC -const RegisterInfo *fp_reg_info = reg_ctx->GetRegisterInfo (eRegisterKindGeneric, LLDB_REGNUM_GENERIC_FP); -if (reg_ctx->ReadRegister(pc_reg_info, reg_value)) -{ -if (log) -log->Printf("Pushing the current PC onto the stack: 0x%" PRIx64 ": 0x%" PRIx64, (uint64_t)sp, reg_value.GetAsUInt64()); - -if (!process_sp->WritePointerToMemory(sp, reg_value.GetAsUInt64(), error)) -return false; - -sp -= 8; - -// Save current FP -if (reg_ctx->ReadRegister(fp_reg_info, reg_value)) -{ -if (log) -log->Printf("Pushing the current FP onto the stack: 0x%" PRIx64 ": 0x%" PRIx64, (uint64_t)sp, reg_value.GetAsUInt64()); - -if (!process_sp->WritePointerToMemory(sp, reg_value.GetAsUInt64(), error)) -return false; -} -// Setup FP backchain -reg_value.SetUInt64 (sp); - -if (log) -log->Printf("Writing FP: 0x%" PRIx64 " (for FP backchain)", reg_value.GetAsUInt64()); - -if (!reg_ctx->WriteRegister(fp_reg_info, reg_value)) -{ -return false; -} - -sp -= 8; -} -#endif - if (log) log->Printf("Pushing the return address onto the stack: 0x%" PRIx64 ": 0x%" PRIx64, ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits