Re: GDB and -gdwarf-5
Jan Kratochvil <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 07 Sep 2017 21:16:44 +0200, Eli Zaretskii wrote: > I have GCC 6.3.0 installed, and it seems to support DWARF2 version 5 > via the -gdwarf-5 switch. But I wanted to make sure I really get that > version of debug info, so I tried "info source" in GDB. But that > command doesn't tell the version of DWARF2. Is there a GDB command > which does? > > I also tried "objdump --dwarf=info" (Binutils 2.29), but that says the > DWARF2 version is 4. So now I'm confused. Here gcc-6.3.1-1.fc25.x86_64 really accepts -gdwarf-5 but still it does produce only DWARF 4. I do not know why. gcc-7.1.1-3.fc26.x86_64 does produce DWARF 5. You should really see from objdump/readelf: Compilation Unit @ offset 0x0: Length: 0x13c (32-bit) Version: 5 Jan