[PATCH] D102829: Add --quiet option to llvm-gsymutil to suppress output of warnings.

Greg Clayton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 26 11:44:21 PDT 2021


clayborg added a comment.

In D102829#2781201 <https://reviews.llvm.org/D102829#2781201>, @simon.giesecke wrote:

> @clayborg I am not sure what it means you now accepted the revision? I am still not sure what to do about the tests.

I will need to add tests for these warnings since they don't already exist. These kinds of tests require a deep knowledge of making DWARF that contains each of these warnings, so I won't have you do this.

> One more thing is that I suppress everything that's called a "warning" here. I tested it, and on our release/optimized binaries (built with gcc) we get lots of "errors" such as:
>
>   00:10:57.048 error: DIE has a start address whose LowPC is between the line table Row[9006] with address 0x00000000033aaf17 and the next one.
>   00:10:57.048 
>   00:10:57.048 0x0ca2fa30: DW_TAG_subprogram
>   00:10:57.048               DW_AT_abstract_origin	(0x0ca2fa0b "_ZN5boost15program_options20invalid_option_valueC4ERKSbIwSt11char_traitsIwESaIwEE")
>   00:10:57.048               DW_AT_MIPS_linkage_name	("_ZN5boost15program_options20invalid_option_valueC2ERKSbIwSt11char_traitsIwESaIwEE")
>   00:10:57.048               DW_AT_object_pointer	(0x0ca2fa49)
>   00:10:57.048               DW_AT_ranges	(0x009bbe70
>   00:10:57.048                  [0x000000000ae3a740, 0x000000000ae3ab29)
>   00:10:57.048                  [0x00000000033aaf20, 0x00000000033aaff5))
>   00:10:57.048               DW_AT_frame_base	(DW_OP_call_frame_cfa)
>   00:10:57.048               DW_AT_GNU_all_call_sites	(0x01)
>   00:10:57.048               DW_AT_sibling	(0x0ca3288d)
>   00:10:57.048 error: DIE has a start address whose LowPC is between the line table Row[9368] with address 0x00000000033ab1fb and the next one.
>
> I am not sure if this was just accidentally called "error" instead of "warning", and we should suppress that as well with `--quiet`, or if this is rather a more severe issue, which should not be silenced. I guess in that case, we would probably update the compiler version to fix that (assuming it is fixed in a more recent gcc version).

This is an valid error. The compiler or linker has messed up and the DWARF is broken and this really should remain an error. Normally when you have a function, you should have a line entry for the first address in function. So if you have a function named "A" whose address range is [0x1000-0x2000) you would expect an line table entry for address 0x1000. In this error case we have a line table that looks like:

  0x0000FFF0: main.cpp:12
  0x00001010: main.cpp:13

So something serious went wrong in the compiler, LTO, or linker where they didn't modify the DWARF correctly. So this really should remain an error so that compiler and linker people can see this and really try to fix it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102829



More information about the llvm-commits mailing list