[PATCH] D123623: [Debuginfo][llvm-dwarfutil] Add check for unsupported debug sections.
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 13 01:17:35 PDT 2022
jhenderson added a comment.
In D123623#3447631 <https://reviews.llvm.org/D123623#3447631>, @avl wrote:
> To resolve that case with custom sections we can add option --keep-section=debug_custom.
I think this would be sensible. It would then be fairly easy to add downstream a more maintainable patch that always has that option enabled for the specific section.
>> 3. What determines what is a "critical" versus a "non-critical" section? Surely that depends upon the consumer as well as the structure of the DWARF?
>
> The difference is whether section might be safely dropped or not(in other words whether section is important for optimizations done by tool). f,e,
>
> a) the tool need to handle address ranges for garbage collection. Since the tool does not able to process .debug_rnglists section then it could not do garbage collection at all. This is critical section.
>
> b) .debug_cu_index is not used for garbage collection. But it references debug_info which rebuilt by tool. the tool does not update .debug_cu_index so it becomes invalid after garbage collection. Though it may be easily dropped. This is not critical section.
Thanks, I see.
================
Comment at: llvm/test/tools/llvm-dwarfutil/ELF/error-unsupported-types.test:4
+
+# RUN: llvm-dwarfutil --garbage-collection --tombstone=maxpc %p/Inputs/type-units.o %t1 2>&1 | FileCheck %s -DFILE=%p/Inputs/type-units.o
+
----------------
avl wrote:
> jhenderson wrote:
> > Why does this use a canned binary rather than yaml2obj?
> yaml2obj does not support debug_types.
Do you need a fully fledged .debug_types though, or could you just use a regular section called .debug_types (containing either garbage or is empty etc)?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123623/new/
https://reviews.llvm.org/D123623
More information about the llvm-commits
mailing list