[PATCH] D68465: [DebugInfo] Trim call-clobbered location list entries when tuning for GDB

David Stenberg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 4 07:53:01 PDT 2019


dstenb added a comment.

I'm uploading this to see it there is any interest for it. On the DWARF-discuss mailing list it was argued that the producer should be able to know which registers are preserved by the call, and that it is undesirable that the producer makes these sorts of assumptions about the consumer. I think that both of those points are fair.

On the other hand, I think that the incompatibility between Clang and GDB is quite nasty, as it requires the end user to be aware of how variables are described (e.g. by using `info addr var`) before trusting the values of variables in outer frames. That can be time consuming, and is perhaps easy to forget sometimes, e.g. when looking at backtraces.

As this can be implemented as a GDB-specific tuning with not too much impact on the rest of the code, except for the `MCSymbol` -> `SymbolWithOffset` rewrites, I think it may be worth considering, but I totally understand if you don't want this, and then we'll just keep it downstream.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D68465





More information about the llvm-commits mailing list