[Lldb-commits] [PATCH] D73921: Assert that a subprogram should have a name when parsing DWARF
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Feb 3 14:54:31 PST 2020
JDevlieghere added inline comments.
================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:833
+ LLDB_LOGF(log, "Parsing a Subprogram that has no name");
+ assert(false && "Subprograms require a name");
+ }
----------------
aprantl wrote:
> "Subprograms require a name" raises more questions than it answers:
> - does that mean that LLDB will crash when this happens?
> - since there is an assertion it definitely means that this code path is untested ...
>
> If LLDB doesn't crash, then perhaps say something like:
>
> "this is a bug in the producer"
>
> In any case you need to be prepared for the possibility that somebody will find a compiler out in the wild that produces this kind of DWARF and will ask you to remove the assertion again. So it's probably better to leave this out.
Using an assertion for invalid input goes against the assertion manifesto on https://lldb.llvm.org/resources/contributing.html
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73921/new/
https://reviews.llvm.org/D73921
More information about the lldb-commits
mailing list