[PATCH] D84825: [release/11.x only][ELF] Change tombstone value -1 to 0

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 5 01:12:48 PDT 2020


psmith added a comment.

My apologies for not commenting earlier. I haven't had a lot of spare time and I only have a weak opinion, certainly far weaker than the other commenters.

There is a lot of info here, just summarising to confirm I've understood:
 LLD with this patch:

| Section                   | Tombstone |
| .debug_loc, .debug_ranges | -2        |
| .debug_*                  | 0         |
|

BFD

| Section                   | Tombstone |
| .debug_loc, .debug_ranges | 1         |
| .debug_*                  | 0         |
|

Future desired values for LLD

| Section                   | Tombstone |
| .debug_loc, .debug_ranges | -2        |
| .debug_*                  | -1        |
|

LLD currently has, for better or worse, a flexible way of setting the tombstone value for different section types.

As I understand it the desired behaviour from reviewers is the BFD behaviour by default and a coarser grained command line option. With the argument for being that LLD could conform to any dwarf consumer's preference and the argument against that dwarf consumers would prefer not to handle users arbitrary choices of tombstones.

My weak opinion:
I'm not qualified to say whether -2 is better or worse than 1 for the tombstone value. I'll have to leave that to the debug experts. In the general case I think that in an ecosystem where people mix compilers, linkers and debuggers, consistency between tools is often more important than the best solution. I'd tend towards staying compatible with BFD without a good case for doing something different, but as I'm not a Dwarf expert I don't think my opinion carries much weight here.

I agree with MaskRay that we should move the discussion of a command line flag to another patch. It is difficult to follow the discussion here. I also think that the vast majority of users will never touch a command line option unless their program exhibits a problem with a debug processing tool. Getting the default behaviour changed is the most important thing.

In my experience from embedded systems it is usually something like the vector table that goes at address 0, the most important thing I've seen users complain about is source file locations as the vector table is usually written in assembly and there isn't much (symbols/types) to debug.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84825



More information about the llvm-commits mailing list