[PATCH] D86539: [Debuginfo][llvm-dwarfutil] llvm-dwarfutil dsymutil-like tool for ELF.
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 29 03:38:22 PDT 2022
jhenderson added inline comments.
================
Comment at: llvm/docs/CommandGuide/llvm-dwarfutil.rst:31-38
+ Removes pieces of debug information related to the discarded sections.
+ When the linker does garbage collection the abandoned debug info is left
+ behind. That abandoned debug info references address ranges using
+ tombstone value. Thus, when this option is specified, the tool removes
+ debug info which marked with the tombstone value. That cures
+ "overlapping address ranges" errors reported by :program:`llvm-dwarfdump`.
+
----------------
avl wrote:
> jhenderson wrote:
> > jhenderson wrote:
> > > I don't think you need the deleted sentence. Also, if it is enabled by default, how is it disabled, and why does the option actually need to exist?
> > There's no need for such massive indentation. A couple of spaces is sufficient. Same applies throughout.
> It might be disabled in this way:
>
> ```
> --do-garbage-collection=0
>
> ```
>
> So the option assumed to be used to disable the behavior or to enable it explicitly.
This is one of those cl::opt oddities. It's basically undocumented too, so I don't think we should aim to support this approach if switching to tablegen style instead. I would instead add `--no-...` style options to explicitly disable things (there are some good examples of this.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86539/new/
https://reviews.llvm.org/D86539
More information about the llvm-commits
mailing list