[PATCH] D72369: DWARFDebugLine.cpp: Format NULL as "(null)" to avoid UB
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 8 01:17:40 PST 2020
jhenderson added a comment.
I think a better solution is to print something more meaningful. For example, "DW_LNS_unknown_<value>" or something similar. You can see examples of that with the DW_AT_unknown_* printing in debug-abbrev.s. I don't think that will be significantly more complex and will provide more user-friendly output. See also my inline comment about where to put the fix.
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp:690
if (OS)
*OS << LNStandardString(Opcode);
switch (Opcode) {
----------------
If you put the fix in LNStandardString instead, this line will also print more user-friendly output in verbose mode (a test should be added for it, if you do).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72369/new/
https://reviews.llvm.org/D72369
More information about the llvm-commits
mailing list