GetLineInfo reports wrong func/ line values

Summary

Calling GetLineInfo(ExceptAddr,func,source,line) returns a wrong line value. Calling GetLineInfo(Get_pc_addr,func,source,line) returns a wrong func value.

System Information

  • Operating system: Windows
  • Processor architecture: x86-64
  • Compiler version: 3.99
  • FPC version: 3.3.1
  • Device: Computer

Steps to reproduce

Example project: Press "Test"

Example Project

(https://drive.google.com/file/d/14P3lr_n73uKRIJVNPm8qbYk9joEAzoMW/view?usp=sharing)

Debugging: Dwarf2 with sets Target OS: Win64 Target CPU: x86_64

What is the current bug behavior?

  1. GetLineInfo(ExceptAddr,func,source,line) gives line=52 (Screenshot: Item 2: ...)
  2. GetLineInfo(Get_pc_addr,func,source,line) gives func=SPEEDBUTTONTESTCLICK (Screenshot: Item 3: ...)

What is the expected (correct) behavior?

  1. line should be 54
  2. func should be TEST2

Relevant logs and/or screenshots

Form1.png in the example project archive

Possible fixes