Sign in Join

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

Mailing lists / fpc-devel / 2011-09

which compile cmmand line switches imply debug info?

6 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Martin

Before I go and test each of them myself, maybe someone already has the answer?

if using swithches like -gl (lineinfo) -gh (heaptrc) -gv (valgrind) -pg (GProf)

do they automatically add debug info (stabs if no other specified)? or do only the -g? do that

For lineinfo, I assume yes, since the unit has nothing to report on if not.

heaptrc could live without, couldn't it?

-pg isn't even a -g switch....

Reply by email

Florian Klämpfl
to Martin
Martin wrote
For lineinfo, I assume yes, since the unit has nothing to report on if not. heaptrc could live without, couldn't it?

Yes, in this case just add the heaptrc unit to the uses clause.

Reply by email

Martin
to Florian Klämpfl
Florian Klämpfl wrote 6 lines
Am 17.09.2011 11:58, schrieb Martin: > For lineinfo, I assume yes, since the unit has nothing to report on if not. > > heaptrc could live without, couldn't it? Yes, in this case just add the heaptrc unit to the uses clause.

Does that mean -gh does add debug info? (stabs, unless others specified)?

Reply by email

Jonas Maebe
to Martin
Martin wrote
Does that mean -gh does add debug info?

As the compiler help specifies, -g enables debug information. -gh is the same as -g -gh. You can use -g-h to enable heaptrc without debug information.

(stabs, unless others specified)?

The default debug format depends on the target platform.

Jonas

Reply by email

Martin
to Jonas Maebe
Jonas Maebe wrote
On 17 Sep 2011, at 15:39, Martin wrote: > Does that mean -gh does add debug info? As the compiler help specifies, -g enables debug information. -gh is the same as -g -gh. You can use -g-h to enable heaptrc without debug information.

thanks for the tip

> (stabs, unless others specified)? The default debug format depends on the target platform.

Is there documentation anywhere?
http://www.freepascal.org/docs-html/user/usersu15.html#x38-450005.1.4 says only:
-g Generate debugging information for debugging with gdb.

After you wrote this, I did see that the compiler prints (-h) -g Generate debug information (default format for target)

but I found nothing about which platform has which default format?

Reply by email

Jonas Maebe
to Martin
Martin wrote 5 lines
On 17/09/2011 14:43, Jonas Maebe wrote: > > The default debug format depends on the target platform. > Is there documentation anywhere?

No. And the default can also change over time.

Jonas

Reply by email