[PATCH] D61184: [Salvage] Change salvage debug info implementation to use new DW_OP_LLVM_convert where needed
Markus Lavin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 26 06:17:10 PDT 2019
markus added a comment.
Have you verified that this results in the desired `DW_OP`s being emitted in the end and that the (or a) debugger makes sense out of it?
Since the expression stack is a bit sloppy about types it defaults to the `generic type` (size of address on the target machine), so without having previously set the type to something else a single `DW_OP_LLVM_convert` does not mean much. This is the reason that `llvm::replaceAllDbgUsesWith` in `lib/Transforms/Utils/Local.cpp` inserts a pair (the first one is simply used to set the type of the current stack element and the second one performs the actual conversion).
For now inserting a pair would probably be the easiest way forward. A bit prettier would be to introduce a `DW_OP_LLVM_reinterpret` op to do that job. Longer term it would be helpful if all values had a specified type immediately when they are put on the stack.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61184/new/
https://reviews.llvm.org/D61184
More information about the llvm-commits
mailing list