Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2011-09

more question on -g commandline switches / -gv valgind

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin

Trying to improve the lazarus user-interface for selecting what debug info to generate, I try to understand the relations between settings. (as for example, indicating to the user, that -gl causes the same debug info than -g does)

Valgrind requires debug info too so -g-v is nonsnes.. It also understand stabs and dwarf, according to it's docs

The question is what does fpc do, if -gv is specified.

Does -gv :
- force either stabs or dwarf
- work with both, and add extend info (never mind if stabs or dwarf)
- observe stabs or dwarf setting (-gs / -gw) but only add info for one of the 2 formats?

In other words, does it make sense in Lazarus, to allow the user to choose explicit stab or dwarf; and then on top of that optionally add -gv ? Will it work as expected in any combination? Or should lazarus, only allow stabs, or only dwarf, if the user gives -gv. Or should Lazarus prevent the user from chosing stabs/dwarf at all, if -gv is selected? so it simply gives -g -gv (or just -gv) to fpc, but NOT -gs / -gw ?

Reply by email

Jonas Maebe
to Martin
Martin wrote
Does -gv : - force either stabs or dwarf

-gv by itself enables the default debug format, just like -g, -gh, -gt, -gc, ...

- work with both, and add extend info (never mind if stabs or dwarf)

It works with both.

- observe stabs or dwarf setting (-gs / -gw) but only add info for one of the 2 formats?

It mainly removes debug information with which Valgrind cannot deal, in addition to including the cmem unit. And yes, -gw -gv will force DWARF in combination with Valgrind provisions, and -gs -gv will force Stabs in combination with Valgrind provisions.

Jonas

Reply by email