From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id 49A7D3858D28; Fri, 17 Mar 2023 17:00:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 49A7D3858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 32HGw8ck005305; Fri, 17 Mar 2023 11:58:08 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 32HGw5Wd005303; Fri, 17 Mar 2023 11:58:05 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Fri, 17 Mar 2023 11:58:05 -0500 From: Segher Boessenkool To: Tom Tromey Cc: Alexandre Oliva , gcc-patches@gcc.gnu.org, David Edelsohn , Kewen Lin , Jason Merrill , Cary Coutant , Jakub Jelinek Subject: Re: [PATCH] [rs6000] adjust return_pc debug attrs Message-ID: <20230317165805.GE25951@gate.crashing.org> References: <20230313143043.GA25951@gate.crashing.org> <87fsa3ibhp.fsf@tromey.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87fsa3ibhp.fsf@tromey.com> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no 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 Fri, Mar 17, 2023 at 10:33:22AM -0600, Tom Tromey wrote: > >>>>> "Segher" == Segher Boessenkool writes: > > Segher> Yes. On most architectures you can get multiple machine instructions of > Segher> course (for long calls for example), but on rs6000 (with some ABIs, in > Segher> some circumstances) we generate a nop insn after calls, so that the > Segher> linker has a spot to insert fixup code after calls (typically to restore > Segher> the r2 contents, but it could be anything). > > FWIW I sent a gdb patch to work around this bug. However, in my > examples, I only ever saw a nop following the call instruction -- so I > had gdb check for this. GCC inserts just a nop in most cases, but the linker or dynamic linker can replace it. > Patch is here: > > https://sourceware.org/pipermail/gdb-patches/2023-March/197951.html > > ... but I suppose I should change it to drop the nop check? > > It would of course be better not to have to have gdb work around this > problem. Yup. Segher