Forum > Debugger

[SOLVED] Dwarf in Lazarus 2.2.0?

(1/2) > >>

Hopestation:
Hi.

I have just downloaded and installed Lazarus
Version:2.2.0
Date: 2022-01-02
FPC Version 3.2.2
Revision: Lazarus_2_2_0
x86_-win64-win32/win64.

I tried to compile a project produced in an earlier version of Lazarus and got a window I have never seen before saying:

Enable Dwarf (-gw)?

The project does not write debug info in Dwarf format. The "fpDebug internal Dwarf-debugger" supports only Dwarf.

There are 4 buttons:

Enable Dwarf with 2 sets, Enable Dwarf 2 (-gw), Enable Dwarf 3 (-gw), and Cancel.

I am completely mystified, I've never heard of Dwarf in any previous versions if Lazarus.

What is it?

How do I use it

Which button should I select?



howardpc:
There is a debugger board here, which you can browse to discover more.
But basically in order to debug any program the debugger needs lots and lots of information about it, such as its variables' names and addresses etc. etc. This data has to be produced by the compiler and stored in some  format or other, and Dwarf is one option. Like most data formats Dwarf has evolved over time.
Try Dwarf3.

Martin_fr:
https://forum.lazarus.freepascal.org/index.php/topic,58745.0.html

I promoted the existing thread on the topic.

Hopestation:
Thanks for your replies.

I tried howardpc's link but didn't find a dashboard. It took me to a query from rcmz, who had a similar question  to mine, and Martin_fr's reply. Martin_fr's link took me to the same page.

This compared Dwarf to GDB and it appears that at present GDB may be better.

I've used GDB since I first started using Lazarus. I know it does occaisionaly crash but I can live with it.

Do I have the option to change my debugger back to GDB?

Martin_fr:
At present GDB is better for some corner cases.

- Needing stack traces for functions in the OS kernel.
- debugging on "machine code" (assembler) level
- using old style objects: "type TFoo = object ..." (this is NOTHING to do with "type TFoo = class...")

Yes you can switch: Tools > Options > Debugger > Backend

You can also switch per project, in the project options

Navigation

[0] Message Index

[#] Next page

Go to full version