This is the mail archive of the
mailing list for the binutils project.
Re: [email@example.com: Re: PATCH: Output dwarf debug info only when needed]
> Oops, that's right. How about:
> /* We don't need to do anything unless:
> - Some debug information was recorded via .file/.loc
> - or, we are generating DWARF2 information ourself (--gdwarf2)
> - or, there is a user-provided .debug_info section which could
> reference the file table in the .debug_line section we generate
> below. */
> if (all_segs == NULL
> && debug_type != DEBUG_DWARF2
> && )
> Where the bit after the last && is "there is no user .debug_info"
> section (which I can't figure out how to say in gas).
bfd_get_section_by_name (stdoutput, ".debug_info") == NULL