From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id CC73B3858CDA for ; Sat, 11 Mar 2023 19:13:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CC73B3858CDA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca Received: from [10.0.0.11] (unknown [217.28.27.60]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 565901E0D3; Sat, 11 Mar 2023 14:13:15 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1678561995; bh=CCCINZbcvnEtcbyiGVQhzRI9x1Js6GI+t6LVmSDtIRo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=tY/MYLyGkwe/GZ7Oi/gp5bW9XMl3YRjgEVNO1WL00u3kvpNg5yXRkJ7VeITodQJce NebEYaLu2xrGH2F2FIIVZNHQ0AimW9/fjq1MkwcnLf2o90qY/rp0P96YBw8CIWT0A2 jEaajfD1TRbG1k/Mmo9Bn5ELXsLc3g5wvGgbRIZ4= Message-ID: Date: Sat, 11 Mar 2023 14:13:14 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH 2/5] Change linetables to be objfile-independent Content-Language: en-US To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20230308-submit-constify-linetable-v1-0-ca4057478141@tromey.com> <20230308-submit-constify-linetable-v1-2-ca4057478141@tromey.com> <87jzzne1vo.fsf@tromey.com> From: Simon Marchi In-Reply-To: <87jzzne1vo.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 3/11/23 10:36, Tom Tromey wrote: > Simon> It's nice to see the objfile_relocate1 function shrinking, it's > Simon> like a progress meter of your project :). > > Yeah... though this one is a refresh of some ancient patches. > The other remaining parts are super hard, I've made several failed > attempts already :( > >>> gdb_printf (outfile, " line %d at ", l->item[i].line); >>> - gdb_puts (paddress (gdbarch, l->item[i].pc), outfile); >>> + gdb_puts (paddress (gdbarch, l->item[i].raw_pc ()), outfile); > > Simon> Here, do we want to see the raw of the relocated PC? Maybe both, if > Simon> different? The one you want depends if you are trying to match this > Simon> information against addresses from the ELF file (unrelocated) or against > Simon> addresses from the inferior (relocated). > > Now that you mention it, I see that minsym printing relocates the > address, so I'll change this one to match. That way it will also match > blocks. > >>> + /* Set the (unrelocated) PC for this entry. */ >>> + void set_pc (CORE_ADDR pc) >>> + { m_pc = pc; } > > Simon> For symmetry with the getter, should this one be named "set_raw_pc"? > > I'll change it. Hi Tom, I see these regressions: FAIL: gdb.base/async.exp: stepi& FAIL: gdb.base/async.exp: nexti& FAIL: gdb.base/async.exp: finish& FAIL: gdb.base/consecutive.exp: stopped at bp, 2nd instr (missing hex prefix) FAIL: gdb.base/disasm-optim.exp: Disassemble main with source (pattern 2) FAIL: gdb.dwarf2/dw2-disasm-over-non-stmt.exp: opt=s: disassemble /s main FAIL: gdb.dwarf2/dw2-disasm-over-non-stmt.exp: opt=s: check_disassembly_results 16 line_label_1 (no disassembly for 16) FAIL: gdb.dwarf2/dw2-disasm-over-non-stmt.exp: opt=s: check_disassembly_results 16 line_label_2 (no disassembly for 16) FAIL: gdb.dwarf2/dw2-disasm-over-non-stmt.exp: opt=s: check_disassembly_results 17 line_label_3 (no disassembly for 17) FAIL: gdb.dwarf2/dw2-disasm-over-non-stmt.exp: opt=s: check_disassembly_results 17 line_label_4 (no disassembly for 17) FAIL: gdb.dwarf2/dw2-disasm-over-non-stmt.exp: opt=s: check_disassembly_results 17 line_label_5 (no disassembly for 17) FAIL: gdb.dwarf2/dw2-disasm-over-non-stmt.exp: opt=s: check_disassembly_results 18 line_label_6 (no disassembly for 18) FAIL: gdb.reverse/consecutive-precsave.exp: stopped at bp, 2nd instr (missing hex prefix) FAIL: gdb.reverse/consecutive-reverse.exp: stopped at bp, 2nd instr (missing hex prefix) Simon