[Lldb-commits] [PATCH] D77327: [nfc] [lldb] 2/2: Introduce DWARF callbacks

2020-04-09 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil added a comment. In D77327#1971435 , @labath wrote: > The `bool` return value on all of these methods, is that here just to > implement the `fallback` mechanism in DebugNamesDWARFIndex? Most of them yes. There are still some functions need

[Lldb-commits] [PATCH] D77327: [nfc] [lldb] 2/2: Introduce DWARF callbacks

2020-04-09 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil updated this revision to Diff 256259. jankratochvil marked an inline comment as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77327/new/ https://reviews.llvm.org/D77327 Files: lldb/include/lldb/Core/UniqueCStringMap.h lldb/so

[Lldb-commits] [PATCH] D77327: [nfc] [lldb] 2/2: Introduce DWARF callbacks

2020-04-09 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. I just had one more idea. The `bool` return value on all of these methods, is that here just to implement the `fallback` mechanism in DebugNamesDWARFIndex? Could it be avoided if debug_names index calls the "fallback" *after* it has done its own processing? Repository:

[Lldb-commits] [PATCH] D77327: [nfc] [lldb] 2/2: Introduce DWARF callbacks

2020-04-08 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil marked 2 inline comments as done. jankratochvil added inline comments. Comment at: lldb/include/lldb/Core/UniqueCStringMap.h:190-195 +const_iterator left = llvm::lower_bound(m_map, unique_cstr, Compare()); +if (left != m_map.end() && left->cstring != unique_

[Lldb-commits] [PATCH] D77327: [nfc] [lldb] 2/2: Introduce DWARF callbacks

2020-04-08 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil updated this revision to Diff 255923. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77327/new/ https://reviews.llvm.org/D77327 Files: lldb/include/lldb/Core/UniqueCStringMap.h lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cp

[Lldb-commits] [PATCH] D77327: [nfc] [lldb] 2/2: Introduce DWARF callbacks

2020-04-07 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lldb/include/lldb/Core/UniqueCStringMap.h:190-195 +const_iterator left = llvm::lower_bound(m_map, unique_cstr, Compare()); +if (left != m_map.end() && left->cstring != unique_cstr) + left = m_map.end(); +const_iterator ri

[Lldb-commits] [PATCH] D77327: [nfc] [lldb] 2/2: Introduce DWARF callbacks

2020-04-07 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil updated this revision to Diff 255815. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77327/new/ https://reviews.llvm.org/D77327 Files: lldb/include/lldb/Core/UniqueCStringMap.h lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cp

[Lldb-commits] [PATCH] D77327: [nfc] [lldb] 2/2: Introduce DWARF callbacks

2020-04-07 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil marked 6 inline comments as done. jankratochvil added inline comments. Comment at: lldb/include/lldb/Core/UniqueCStringMap.h:102 + // Helper iterator for the 'equal_range' method. + class CString_iterator { aprantl wrote: > /// I am sorry but al

[Lldb-commits] [PATCH] D77327: [nfc] [lldb] 2/2: Introduce DWARF callbacks

2020-04-07 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil updated this revision to Diff 255766. jankratochvil marked 2 inline comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77327/new/ https://reviews.llvm.org/D77327 Files: lldb/include/lldb/Core/UniqueCStringMap.h lldb/so

[Lldb-commits] [PATCH] D77327: [nfc] [lldb] 2/2: Introduce DWARF callbacks

2020-04-07 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil updated this revision to Diff 255761. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77327/new/ https://reviews.llvm.org/D77327 Files: lldb/include/lldb/Core/UniqueCStringMap.h lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cp

[Lldb-commits] [PATCH] D77327: [nfc] [lldb] 2/2: Introduce DWARF callbacks

2020-04-07 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil added a comment. In D77327#1967060 , @labath wrote: > I can't say I have tried this, but ummm.. why is there a need for a separate > iterator class for this equal_range stuff? Couldn't this be implemented via > an iterator_pair of the itera

[Lldb-commits] [PATCH] D77327: [nfc] [lldb] 2/2: Introduce DWARF callbacks

2020-04-07 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. I can't say I have tried this, but ummm.. why is there a need for a separate iterator class for this equal_range stuff? Couldn't this be implemented via an iterator_pair of the iterators of the underlying container (found via lower/upper_bound) ? Repository: rG LLVM

[Lldb-commits] [PATCH] D77327: [nfc] [lldb] 2/2: Introduce DWARF callbacks

2020-04-07 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lldb/include/lldb/Core/UniqueCStringMap.h:130-163 + bool GetValues(ConstString unique_cstr, + std::function callback) const { +for (const Entry &entry : llvm::make_range(std::equal_range( + m_map.begin(),

[Lldb-commits] [PATCH] D77327: [nfc] [lldb] 2/2: Introduce DWARF callbacks

2020-04-06 Thread Shafik Yaghmour via Phabricator via lldb-commits
shafik added inline comments. Comment at: lldb/include/lldb/Core/UniqueCStringMap.h:103 + // Helper iterator for the 'equal_range' method. + class CString_iterator { + public: `CStringIterator`? Comment at: lldb/include/lldb/Core/UniqueCStr

[Lldb-commits] [PATCH] D77327: [nfc] [lldb] 2/2: Introduce DWARF callbacks

2020-04-06 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl added inline comments. Comment at: lldb/include/lldb/Core/UniqueCStringMap.h:102 + // Helper iterator for the 'equal_range' method. + class CString_iterator { /// Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[Lldb-commits] [PATCH] D77327: [nfc] [lldb] 2/2: Introduce DWARF callbacks

2020-04-06 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil marked 2 inline comments as done. jankratochvil added inline comments. Comment at: lldb/include/lldb/Core/UniqueCStringMap.h:130-163 + bool GetValues(ConstString unique_cstr, + std::function callback) const { +for (const Entry &entry : llvm::mak

[Lldb-commits] [PATCH] D77327: [nfc] [lldb] 2/2: Introduce DWARF callbacks

2020-04-06 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil updated this revision to Diff 255463. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77327/new/ https://reviews.llvm.org/D77327 Files: lldb/include/lldb/Core/UniqueCStringMap.h lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cp

[Lldb-commits] [PATCH] D77327: [nfc] [lldb] 2/2: Introduce DWARF callbacks

2020-04-06 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil updated this revision to Diff 255340. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77327/new/ https://reviews.llvm.org/D77327 Files: lldb/include/lldb/Core/UniqueCStringMap.h lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cp

[Lldb-commits] [PATCH] D77327: [nfc] [lldb] 2/2: Introduce DWARF callbacks

2020-04-06 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil marked 2 inline comments as done. jankratochvil added inline comments. Comment at: lldb/include/lldb/Core/UniqueCStringMap.h:130-163 + bool GetValues(ConstString unique_cstr, + std::function callback) const { +for (const Entry &entry : llvm::mak

[Lldb-commits] [PATCH] D77327: [nfc] [lldb] 2/2: Introduce DWARF callbacks

2020-04-06 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. Thanks for doing this. This looks more-or-less like what I was expecting. The need for the "bool" return value from the index functions is unfortunate (I did not anticipate that), but it does seem unavoidable. Since none of these functions (I guess) are storing the callb

[Lldb-commits] [PATCH] D77327: [nfc] [lldb] 2/2: Introduce DWARF callbacks

2020-04-04 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil updated this revision to Diff 255013. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77327/new/ https://reviews.llvm.org/D77327 Files: lldb/include/lldb/Core/UniqueCStringMap.h lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cp

[Lldb-commits] [PATCH] D77327: [nfc] [lldb] 2/2: Introduce DWARF callbacks

2020-04-03 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil updated this revision to Diff 254931. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77327/new/ https://reviews.llvm.org/D77327 Files: lldb/include/lldb/Core/UniqueCStringMap.h lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cp

[Lldb-commits] [PATCH] D77327: [nfc] [lldb] 2/2: Introduce DWARF callbacks

2020-04-03 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil marked an inline comment as done. jankratochvil added inline comments. Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:2387 // dsymutil. - if (num_die_matches < max_matches) { + if (types.GetSize() < max_matches) { UpdateExternalModule

[Lldb-commits] [PATCH] D77327: [nfc] [lldb] 2/2: Introduce DWARF callbacks

2020-04-03 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil updated this revision to Diff 254900. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77327/new/ https://reviews.llvm.org/D77327 Files: lldb/include/lldb/Core/UniqueCStringMap.h lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cp

[Lldb-commits] [PATCH] D77327: [nfc] [lldb] 2/2: Introduce DWARF callbacks

2020-04-02 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil marked an inline comment as done. jankratochvil added inline comments. Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:2387 // dsymutil. - if (num_die_matches < max_matches) { + if (types.GetSize() < max_matches) { UpdateExternalModule