From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 62406 invoked by alias); 7 Sep 2017 19:24:58 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 62348 invoked by uid 89); 7 Sep 2017 19:24:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 07 Sep 2017 19:24:52 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1E47883F45; Thu, 7 Sep 2017 19:24:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1E47883F45 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jan.kratochvil@redhat.com Received: from host1.jankratochvil.net (ovpn-117-118.ams2.redhat.com [10.36.117.118]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 66C7F729D6; Thu, 7 Sep 2017 19:24:50 +0000 (UTC) Date: Thu, 07 Sep 2017 19:24:00 -0000 From: Jan Kratochvil To: Eli Zaretskii Cc: gdb@sourceware.org Subject: Re: GDB and -gdwarf-5 Message-ID: <20170907192447.GA25323@host1.jankratochvil.net> References: <83inguz5cz.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83inguz5cz.fsf@gnu.org> User-Agent: Mutt/1.8.3 (2017-05-23) X-SW-Source: 2017-09/txt/msg00018.txt.bz2 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