Sign in Join

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

Mailing lists / fpc-devel / 2010-03

dward debug info - someone promiced more compact debug info than stabs

8 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Paul Ishenin

Hello, FPC developers' list

Why dwarf information has so big debug files (comparing with stabs) on windows?

lazarus.exe: 11MB
lazarus.dbg: 219Mb

As I remember with stabs I had something about 100MB for debug info. And as I remember dwarf debug info must be less fat as stabs.

Best regards,
Paul Ishenin.

Reply by email

Jonas Maebe
to Paul Ishenin
Paul Ishenin wrote
Why dwarf information has so big debug files (comparing with stabs) on windows?

Because Windows (just like Darwin) does not support referring to DWARF debug info from one object file to another, so a lot of debug information is duplicated in multiple units.

Jonas

Reply by email

Jonas Maebe
to Jonas Maebe
Jonas Maebe wrote 8 lines
On 16 Mar 2010, at 15:58, Paul Ishenin wrote: > Why dwarf information has so big debug files (comparing with stabs) > on windows? Because Windows (just like Darwin) does not support referring to DWARF debug info from one object file to another, so a lot of debug information is duplicated in multiple units.

We also encode more information when using DWARF than when using Stabs (e.g. properties, absolute variables, public/private/protected information, calling convention, virtuality of methods).

Jonas

Reply by email

Flávio Etrusco
to Jonas Maebe: Because Windows (just like Darwin) does not support referring to DWARF debug info from…
Jonas Maebe wrote 12 lines
On 16 Mar 2010, at 15:58, Paul Ishenin wrote: > Why dwarf information has so big debug files (comparing with stabs) on > windows? Because Windows (just like Darwin) does not support referring to DWARF debug info from one object file to another, so a lot of debug information is duplicated in multiple units. Jonas

Out of curiosity, is this a limitation of gdb, the library loader, or the dwarf/library format?

Many thanks,
Flávio

Reply by email

Paul Ishenin
to Jonas Maebe: We also encode more information when using DWARF than when using Stabs (e.g. properties,…
Jonas Maebe wrote 11 lines
> >> Why dwarf information has so big debug files (comparing with stabs) >> on windows? > > Because Windows (just like Darwin) does not support referring to > DWARF debug info from one object file to another, so a lot of debug > information is duplicated in multiple units. We also encode more information when using DWARF than when using Stabs (e.g. properties, absolute variables, public/private/protected information, calling convention, virtuality of methods).

But 200 Mb of info for 10Mb executable is too much. How do you think? I don't believe that other compilers on windows generates so fat output for dwarf. Do you know any similar numbers for gcc?

Best regards,
Paul Ishenin.

Reply by email

Jonas Maebe
to Flávio Etrusco: Out of curiosity, is this a limitation of gdb, the library loader, or the dwarf/library…
Flávio Etrusco wrote 17 lines
On Tue, Mar 16, 2010 at 12:22 PM, Jonas Maebe < > wrote: > > On 16 Mar 2010, at 15:58, Paul Ishenin wrote: > >> Why dwarf information has so big debug files (comparing with >> stabs) on >> windows? > > Because Windows (just like Darwin) does not support referring to > DWARF debug > info from one object file to another, so a lot of debug information > is > duplicated in multiple units. Out of curiosity, is this a limitation of gdb, the library loader, or the dwarf/library format?

On Mac OS X, it's a limitation of the linker (done on purpose, to making linking much faster and less memory intensive). I don't know about Windows.

Jonas

Reply by email

Jonas Maebe
to Paul Ishenin: But 200 Mb of info for 10Mb executable is too much. How do you think? I don't believe…
Paul Ishenin wrote
But 200 Mb of info for 10Mb executable is too much. How do you think?

I personally don't care at all.

I don't believe that other compilers on windows generates so fat output for dwarf. Do you know any similar numbers for gcc?

No, since I don't use Windows.

It's hard to compare with Mac OS X, because there
a) the DWARF debug info is not linked into the final binary, it just remains in the original object files (and the application contains references to the object files)
b) you can use a (closed source) utility called dsymutil that goes through all object files of a program, collects the DWARF information, removes the duplicate information and then generates an external file that contains the unified debug information for the entire application

GDB on Mac OS X can work with the debug information in both cases a) and b)

Jonas

Reply by email

Flávio Etrusco
to Paul Ishenin: But 200 Mb of info for 10Mb executable is too much. How do you think? I don't believe…
Paul Ishenin wrote 19 lines
16.03.2010 22:33, Jonas Maebe wrote: >> >>> Why dwarf information has so big debug files (comparing with stabs) on >>> windows? >> >> Because Windows (just like Darwin) does not support referring to DWARF >> debug info from one object file to another, so a lot of debug information is >> duplicated in multiple units. > > We also encode more information when using DWARF than when using Stabs > (e.g. properties, absolute variables, public/private/protected information, > calling convention, virtuality of methods). But 200 Mb of info for 10Mb executable is too much. How do you think? I don't believe that other compilers on windows generates so fat output for dwarf. Do you know any similar numbers for gcc? Best regards, Paul Ishenin.

Haven't you ever used MSVC++? ;)

-Flávio

Reply by email