Hi Cary!

On Thu, 16 May 2013 16:58:12 -0000, GCC Wiki <nore...@gcc.gnu.org> wrote:
> The "DebugFission" page has been changed by CaryCoutant:
> http://gcc.gnu.org/wiki/DebugFission?action=diff&rev1=18&rev2=19
> 
>   = DWARF Extensions for Separate Debug Information Files =
>   
>   Updated January 24, 2013
> + 
> + The "Fission" project was started in response to the problems caused by 
> huge amounts of debug information in large applications. By splitting the 
> debug information into two parts at compile time -- one part that remains in 
> the .o file and another part that is written to a parallel .dwo ("DWARF 
> object") file -- we can reduce the total size of the object files processed 
> by the linker.

Yay, a quite noticeable link-time speedup!  \o/

> + Fission is implemented in GCC 4.7, and requires support from recent 
> versions of objcopy and the gold linker.

Is my understanding correct that the gold linker is not actually a
requirement -- at least nowadays?  In my (very limited, so far) testing,
this also seems to work with ld.bfd.  (I do see objcopy's --extract-dwo
and --split-dwo options being used in gcc/gcc.c:ASM_FINAL_SPEC, so I
suspect that's what "recent versions of objcopy" hints at?)

> + Use the {{{-gsplit-dwarf}}} option to enable the generation of split DWARF 
> at compile time. This option must be used in conjunction with {{{-c}}}; 
> Fission cannot be used when compiling and linking in the same step.

According to the following -- admittedly very minimal -- testing, this is
not actually (no longer?) true?

    $ [gcc] [...] -gsplit-dwarf
    $ ls *.dwo
    ccF9JYjE.dwo  subroutines.dwo
    $ gdb -q a.out 
    Reading symbols from a.out...done.
    (gdb) list main
    [...]
    (gdb) quit
    $ rm *.dwo
    $ gdb -q a.out 
    Reading symbols from a.out...
    warning: Could not find DWO CU subroutines.dwo(0x2d85cdd539df6900) 
referenced by CU at offset 0x0 [in module [...]/a.out]
    
    warning: Could not find DWO CU ccF9JYjE.dwo(0xa6936555a636518) referenced 
by CU at offset 0x35 [in module [...]/a.out]
    done.
    (gdb) list main
    warning: Could not find DWO CU subroutines.dwo(0x2d85cdd539df6900) 
referenced by CU at offset 0x0 [in module [...]/a.out]

Have I been testing the wrong thing?

> + Use the gold linker's {{{--gdb-index}}} option ({{{-Wl,--gdb-index}}} when 
> linking with gcc or g++) at link time to create the .gdb_index section that 
> allows GDB to locate and read the .dwo files as it needs them.

Unless told otherwise, I'll re-word that to the effect that gold, and
usage of its --gdb-index option are optional.


Grüße
 Thomas

Attachment: signature.asc
Description: PGP signature

Reply via email to