[fpc-devel] Wrong debug info when using clang backend

Jonas Maebe jonas at freepascal.org
Wed Dec 6 22:57:39 CET 2023


On 06/12/2023 22:25, Jonas Maebe via fpc-devel wrote:
> https://releases.llvm.org/11.0.0/docs/SourceLevelDebugging.html#format-common-intrinsics states that llvm.dbg.declare is identical to llvm.dbg.addr, except that it works badly in the context of optimisations, and that as a result it is deprecated and will be removed.
> 
> Because of this reason, FPC only uses llvm.dbg.addr. But clang still 
> uses llvm.dbg.declare, and when I change FPC to use that one, the debug 
> info for the variables in your test program is correct. So I'll change 
> FPC to also use llvm.dbg.declare.

Done.


Jonas


More information about the fpc-devel mailing list