Summary: | -gdwarf-{3,4,5} command line arguments | ||
---|---|---|---|
Product: | binutils | Reporter: | Nick Desaulniers <ndesaulniers> |
Component: | gas | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | nickc |
Priority: | P2 | ||
Version: | 2.35 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
Nick Desaulniers
2020-02-28 21:52:56 UTC
Hi Nick,
> Thoughts on implementing -gdwarf-{3,4,5} in GNU as? This would match the
> behavior of `gcc -gdwarf-{3,4,5}` and `clang -gdwarf-{3,4,5}`.
I think that it would make sense to support this, and to ensure that setting one of these options would set the relevant version value in any debug information generated by the assembler. We should be careful however to ensure that the documentation clearly states that using a higher dwarf version value will not necessarily cause any extra debug information to be generated. (Well not until such generation is available).
Are you offering to develop a patch ?
Cheers
Nick
The master branch has been updated by Nick Clifton <nickc@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=31bf18645d98b4d3d7357353be840e320649a67d commit 31bf18645d98b4d3d7357353be840e320649a67d Author: Nick Clifton <nickc@redhat.com> Date: Fri Mar 6 14:52:14 2020 +0000 Add support for --dwarf-[3|4|5] to assembler command line. PR 25612 * as.c (dwarf_level): Define. (show_usage): Add --gdwarf-3, --gdwarf-4 and --gdwarf-5. (parse_args): Add support for the new options. as.h (dwarf_level): Prototype. * dwarf2dbg.c (DWARF2_VERSION): Use dwarf_level as default version value. * config/tc-ia64.h (DWARF2_VERISION): Update definition. (DWARF2_LINE_VERSION): Remove definition. * doc/as.texi: Document the new options. I have gone ahead and created a patch to add support for these command line options. They do not do anything more than setting the version value stored in the header of the .debug_info section. At least for now. Great, thanks Nick! The master branch has been updated by Nick Clifton <nickc@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=84d9ab33f3dc542c5f20abb9026240cfd48ccd97 commit 84d9ab33f3dc542c5f20abb9026240cfd48ccd97 Author: Nick Clifton <nickc@redhat.com> Date: Fri Mar 6 17:13:22 2020 +0000 Add support for a ".file 0" directive if supporting DWARF 5 or higher. PR 25614 * dwarf2dbg.c (dwarf2_directive_filename): Allow a file number of 0 if the dwarf_level is 5 or more. Complain if a filename follows a file 0. * testsuite/gas/elf/dwarf-5-file0.s: New test. * testsuite/gas/elf/dwarf-5-file0.d: New test driver. * testsuite/gas/elf/elf.exp: Run the new test. PR 25612 * config/tc-ia64.h (DWARF2_VERISION): Fix typo. * doc/as.texi: Fix another typo. |