From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 98651 invoked by alias); 2 May 2019 19:13:08 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 98642 invoked by uid 89); 2 May 2019 19:13:08 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1738 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, 02 May 2019 19:13:07 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D90FC3082E0F; Thu, 2 May 2019 19:13:05 +0000 (UTC) Received: from f29-4.lan (ovpn-116-84.phx2.redhat.com [10.3.116.84]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A8F27608A5; Thu, 2 May 2019 19:13:05 +0000 (UTC) Date: Thu, 02 May 2019 19:13:00 -0000 From: Kevin Buettner To: Eli Zaretskii Cc: gdb-patches@sourceware.org, simark@simark.ca Subject: Re: The 'cold' function attribute and GDB Message-ID: <20190502121305.111b5fdc@f29-4.lan> In-Reply-To: <83zho4ofkh.fsf@gnu.org> References: <83wojaovbp.fsf@gnu.org> <077aee8c-7bef-bad6-a6a1-e69f116cc18b@simark.ca> <20190501195113.69aea752@f30-4.lan> <20190502003849.6759d177@f29-4.lan> <83muk4q3rr.fsf@gnu.org> <20190502112517.64b6fa20@f29-4.lan> <83zho4ofkh.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-05/txt/msg00052.txt.bz2 On Thu, 02 May 2019 21:51:26 +0300 Eli Zaretskii wrote: > > Date: Thu, 2 May 2019 11:25:17 -0700 > > From: Kevin Buettner > > Cc: gdb-patches@sourceware.org, simark@simark.ca > > > > (gdb) x/i 0x000000000041fed1 > > 0x41fed1 : callq 0x41cca5 > > (gdb) b *0x41fed1 > > Breakpoint 6 at 0x41fed1: file /ironwood1/emacs-git/f30/bld/../../emacs/src/print.c, line 1824. > > (gdb) info line *0x41fed1 > > Line 1824 of "/ironwood1/emacs-git/f30/bld/../../emacs/src/print.c" > > starts at address 0x41fed1 > > and ends at 0x5873b0 . > > > > These look okay to me too. On Linux, I think we're lacking the minimal > > symbol which Eli is seeing on Windows. > > Don't you see print_vectorlike.cold in the debug info, with objdump or > elfread? If not, perhaps ELF binaries record cold sections in some > different way from PE-COFF. > > I also see a lot of *.cold symbols with "nm -A" on the Emacs binary. > Do you? I hadn't checked before, but I do see .cold symbols... emacs:000000000058cab0 t print_vectorlike emacs:000000000041fed1 t print_vectorlike.cold The address for print_vectorlike.cold is exactly the address for the second address range for print_vectorlike: Address range 0x41fed1 to 0x41fed6: 0x000000000041fed1 <+-1493983>: callq 0x41cca5 It's interesting that this _doesn't_ show up when doing the following: (gdb) x/i 0x000000000041fed1 0x41fed1 : callq 0x41cca5 What do you see when you issue a similar command for your build of emacs on Windows? (Apologies if you've already shown this to me.) Kevin