[PATCH] D51908: [DebugInfo] Do not generate debug info for removed labels.

Edd Barrett via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 13 02:32:37 PDT 2018


vext01 added a comment.

Hi,

It seems to me that the correct thing to do with unreachable labels is to emit a label with no `low_pc` attribute and fix gdb to accept such labels. Instead of crashing, it should print a message like "label was optimised out".

(It also shouldn't crash if a label has a zero `low_pc` value. I guess that zero could (in esoteric scenarios) be a valid code address. Perhaps for raw (headerless) binaries on some system which doesn't relocate code at load time?).

If you guys agree, I don't mind raising the bug, but we'd need an easily reproducible crash case to show them.


Repository:
  rL LLVM

https://reviews.llvm.org/D51908





More information about the llvm-commits mailing list