You are not logged in.
Pages: 1
To compile the LoggingTest.dpr project with debug information and generate a .map file with the FPC, followed by executing the program, a .mab debug file will be created. The log file will display the source line number during the initial execution. However, upon running the program a second time, it loads the .mab file but does not include the line numbers in the log file. This suggests there may be an issue with the .mab file. I have traced the problem for some time but have not found anything conclusive; the following statement consistently returns -1:
u := debug.FindUnit(offset, Line)
Online
Yeah, you're right! I tried it on Linux and it worked fine. The issue only popped up on my Windows 11.
But I'm curious, why did it work the first time I ran it?
Last edited by zen010101 (2025-01-30 11:56:45)
Online
Supplementary Note:
The information I provided earlier was incorrect. Through today's testing, I found that whether on Windows or Linux, only the first run can obtain the program's line number information. As long as the .mab file is generated, in subsequent runs, the program will not be able to find the line number information as long as the .mab is loaded.
Online
Wired.
Here is my environment:
OS: Windows 11
Compiler: Free Pascal Compiler version 3.2.3-1404-g57e84ef714 [2024/11/20] for aarch64
Target: Linux aarch64 (and Dwarf3 debug info)
Every time I delete the .mab file, I can see line number information in the Log.
How can I find some more useful information?
Online
Pages: 1