Recent

Author Topic: Line Numbers, own System Module and DWARF  (Read 1778 times)

paule32

  • Hero Member
  • *****
  • Posts: 646
  • One in all. But, not all in one.
Line Numbers, own System Module and DWARF
« on: July 15, 2025, 09:29:49 pm »
Hello,
I was faced with a little Problem:
- when I don't use the Compand Line Option -gl in combination with -n I get the Error, that dwarf Module can not be found.

I was thinking that FPC produce all these Debug and Meta Information's itself ...
MS-IIS - Internet Information Server, Apache, PHP/HTML/CSS, MinGW-32/64 MSys2 GNU C/C++ 13 (-stdc++20), FPC 3.2.2
A Friend in need, is a Friend indeed.

PascalDragon

  • Hero Member
  • *****
  • Posts: 6403
  • Compiler Developer
Re: Line Numbers, own System Module and DWARF
« Reply #1 on: July 15, 2025, 09:45:31 pm »
- when I don't use the Compand Line Option -gl in combination with -n I get the Error, that dwarf Module can not be found.

If you don't use the -gl option then the compiler won't generate debug information.

paule32

  • Hero Member
  • *****
  • Posts: 646
  • One in all. But, not all in one.
Re: Line Numbers, own System Module and DWARF
« Reply #2 on: July 15, 2025, 09:48:36 pm »
that is right.

But FPC tries to make Things alone - in a fast way ...
So, I wonder why I need a Module for Bootstrap compiling my own System.pas
MS-IIS - Internet Information Server, Apache, PHP/HTML/CSS, MinGW-32/64 MSys2 GNU C/C++ 13 (-stdc++20), FPC 3.2.2
A Friend in need, is a Friend indeed.

PascalDragon

  • Hero Member
  • *****
  • Posts: 6403
  • Compiler Developer
Re: Line Numbers, own System Module and DWARF
« Reply #3 on: July 15, 2025, 10:02:24 pm »
The compiler does not load the lnfodwrf unit for units, only for programs and libraries, so you're simply not compiling correctly.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12513
  • Debugger - SynEdit - and more
    • wiki
Re: Line Numbers, own System Module and DWARF
« Reply #4 on: July 15, 2025, 10:05:31 pm »
Hello,
I was faced with a little Problem:
- when I don't use the Compand Line Option -gl in combination with -n I get the Error, that dwarf Module can not be found.

-gl does 2 things

1) adds debug info (in most case dwarf / older compiler versions may do stabs)

2) include the unit infodwarf or lineinfo (the latter if stabs were generated) // name may be slightly different.

So maybe the error is, that it can't find that unit?

E.g. IIRC you get that error if you compile for WinCE/arm => because no such unit exists for that target.

----

That unit installs a handler, so traces are printed with info from the debug info.

 

TinyPortal © 2005-2018