[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
Fri Oct 9 10:18:16 PDT 2020


MaskRay marked an inline comment as done.
MaskRay added a comment.

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

>> If sources are not available, it should be obvious as the output will have no interleaved source lines.
>
> I'm not entirely convinced that this is a fair statement. I've had a number of occasions in the past where I've tried to dump the source for an object and then got confused why there was no source displayed. Often, it was because I'd forgotten to build with -g, but that wasn't always immediately obvious.

Seems like we may have disagreement. Let me rephrase things:

(1) When -g is not used for the object, do you expect a warning?

I am a bit on the fence. If for places where you *could* have had source if only the right command line options (-g) were used, a warning might be useful.

There are also situations where a binary has some hand-written assembly components which normally do not attached debug info. If the noise ratio is low, I think I will be fine if there is a warning for each such component.
I will be on board if @mmpozulp	or @jhenderson can enhance this in a non-confusing way.

(2) When -g is not used, do you expect a warning "failed to parse debug info"?

This looks very confusing to me. I really want to get rid of it despite some value losing for (1), and hence this patch.


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