From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id C81443858C2C for ; Fri, 1 Oct 2021 12:37:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C81443858C2C Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 0F45F2267E; Fri, 1 Oct 2021 12:37:03 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id E37D613C59; Fri, 1 Oct 2021 12:37:02 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id +49mNu4AV2EfYQAAMHmgww (envelope-from ); Fri, 01 Oct 2021 12:37:02 +0000 Subject: Re: [PATCH][gdb/symtab] Relocate call_site_htab From: Tom de Vries To: Simon Marchi , gdb-patches@sourceware.org Cc: Tom Tromey References: <20210930095608.GA11467@delia> <5940137d-6a6f-2309-673f-d9491ed654b5@polymtl.ca> <9a605b9e-267b-e9f5-4122-c407913e92f7@suse.de> <80671fa7-d3cf-d518-a53b-f3ed8e453576@polymtl.ca> <2d6504fb-4a2d-4a01-b637-7c90cea92a6e@suse.de> Message-ID: <0e17f5f7-07c4-260f-207b-6d6ae1a3c693@suse.de> Date: Fri, 1 Oct 2021 14:37:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <2d6504fb-4a2d-4a01-b637-7c90cea92a6e@suse.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Oct 2021 12:37:05 -0000 On 10/1/21 10:25 AM, Tom de Vries wrote: > n 10/1/21 3:15 AM, Simon Marchi wrote: >>> Ack, thanks. I've put this through testing and ran into only two >>> regressions (so, this used to pass for me with unix/-fPIE/-pie): >>> ... >>> FAIL: gdb.trace/entry-values.exp: bt (1) (pattern 1) >>> FAIL: gdb.trace/entry-values.exp: bt (2) (pattern 1) >>> ... >>> while still fixing all the unix/-fno-PIE/-no-pie vs unix/-fPIE/-pie >>> regressions. >>> >>> Fixed by: >>> ... >>> diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c >>> index bb5767aae67..fa775722afb 100644 >>> --- a/gdb/dwarf2/read.c >>> +++ b/gdb/dwarf2/read.c >>> @@ -13517,7 +13517,8 @@ read_call_site_scope >>> sect_offset_str (die->sect_off), objfile_name >>> (objfile)); >>> else >>> { >>> - lowpc = gdbarch_adjust_dwarf2_addr (gdbarch, lowpc + >>> baseaddr); >>> + lowpc = (gdbarch_adjust_dwarf2_addr (gdbarch, lowpc + >>> baseaddr) >>> + - baseaddr); >>> SET_FIELD_PHYSADDR (call_site->target, lowpc); >>> } >>> } >> I've split this up into a patch series: - [gdb/symtab] Fix htab_find_slot call in read_call_site_scope - [gdb/symtab] Remove COMPUNIT_CALL_SITE_HTAB - [gdb/symtab] Add call_site::pc () - [gdb/symtab] Use unrelocated addresses in call_site Patch series was submitted, first one at https://sourceware.org/pipermail/gdb-patches/2021-October/182325.html . Thanks, - Tom