[Lldb-commits] [PATCH] D46810: 3/3: Fix DWARFUnit::GetUnitDIEPtrOnly stale pointer

Jan Kratochvil via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue May 29 09:52:08 PDT 2018


jankratochvil marked an inline comment as done.
jankratochvil added inline comments.


================
Comment at: source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp:86
   // Keep a flat array of the DIE for binary lookup by DIE offset
-  if (!cu_die_only) {
+  {
     Log *log(
----------------
clayborg wrote:
> Do we need this empty scope? Remove?
There is now enclosed:
```Log *log(LogChannelDWARF::GetLogIfAny(DWARF_LOG_DEBUG_INFO | DWARF_LOG_LOOKUPS));
```
While lower (currently moved into `DWARFUnit::ExtractDIEsEndCheck()`) there was:
```Log *log(LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_INFO));
```
So those two did conflict while being a different variable. I am not sure which way is right but I have removed the empty scope as it is no longer required. Then also I am not sure the log in `DWARFUnit::ExtractDIEsEndCheck()` should not also have `| DWARF_LOG_LOOKUPS` but that would be out of the scope of this patch topic.



https://reviews.llvm.org/D46810





More information about the lldb-commits mailing list