[PATCH] D88715: [llvm-objdump] --source: drop the warning when there is no debug info

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 3 10:14:49 PST 2021


MaskRay marked 4 inline comments as done and an inline comment as not done.
MaskRay added a comment.

In D88715#2538614 <https://reviews.llvm.org/D88715#2538614>, @jhenderson wrote:

> One small comment, then LGTM.
>
> In D88715#2537636 <https://reviews.llvm.org/D88715#2537636>, @MaskRay wrote:
>
>> As of whether it is useful to only report the warning when the executable has debug info but one object file does not have debug info: I think the proposal is still controversial. 
>> (objdump -S does not have such a behavior and it could be argued that the behavior needs to be under an explicit option instead of being automatic).
>
> I think that's the opposite of what I proposed? I suggested warning if all the objects were missing debug info (which as you mentioned earlier boils down to an existance check for `.debug_line` or similar). I agree that warning if some objects are missing debug_info is impractical, since as you point out, most executables will include CRT files which don't contain debug data, if nothing else.

Made a mistake in my previous comment. I intended to mean whether it is useful to emit a warning if all the objects were missing debug info.

>> So I'll suggest we restore to the previous state where we don't warn for missing debug info. Note: we don't warn for malformed debug info. That hasn't been properly fixed by D62462 <https://reviews.llvm.org/D62462>.
>
> Perhaps we could reopen the original PR and suggest a better fix or two (i.e. add something to achieve the above/properly report invalid debug data). WDYT?

Reopened https://bugs.llvm.org/show_bug.cgi?id=41905 with problems (parsing failures are not actually reported as warnings).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88715/new/

https://reviews.llvm.org/D88715



More information about the llvm-commits mailing list