[Lldb-commits] [PATCH] D61942: DWARFContext: Return empty data extractors instead of null pointers
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed May 15 06:29:36 PDT 2019
labath created this revision.
labath added reviewers: JDevlieghere, clayborg, aprantl.
There are several reasons for doing this:
- generally, there's no reason to differentiate between a section being absent and it being present, but empty
- it matches more closely what llvm DWARF parser is doing (which also doesn't differentiate the two cases)
- SymbolFileDWARF also doesn't differentiate the two cases, which makes porting the rest of sections easier
- it fixes a bug in how the return-null-if-empty logic was implemented (it returned nullptr only the second time we tried to get the debug_aranges section), which meant that we hit an assert when trying to parse an empty-but-present section
https://reviews.llvm.org/D61942
Files:
lit/SymbolFile/DWARF/debug_aranges-empty-section.s
source/Plugins/SymbolFile/DWARF/DWARFContext.cpp
source/Plugins/SymbolFile/DWARF/DWARFContext.h
source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp
source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61942.199597.patch
Type: text/x-patch
Size: 6631 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190515/592c8166/attachment-0001.bin>
More information about the lldb-commits
mailing list