From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by sourceware.org (Postfix) with ESMTPS id B760C3858C54 for ; Thu, 11 Jan 2024 13:07:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B760C3858C54 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B760C3858C54 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704978473; cv=none; b=X68v2hpVSOG9L4nuL6XTIEBK+4wXVMAk9fekq/fwTMo/hf+uOCJiQkWp2+h+gYZOS9IS+6We0AYOp1hzs4J2STwKywUTbcUqlJPhFhGyOpYf32d3jCh2ioOoPTspfppLkUxBGh/NlC5bS+cLNgT2ystf+g+wulsIW0a6Tj+xynM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704978473; c=relaxed/simple; bh=vyczq+q+PC3avapeLhu4UFfhQEgA3sFbWeepIQRKnXM=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature: Message-ID:Date:MIME-Version:Subject:To:From; b=QrEE9GK5k89wfTBCBZ5kR5RSvpAcjxT+3D390oBI6ZCUK6rN3N5PK7IqpNpdvZhoHLjQRbQ5bDWeHygNzYjnd9zeWc+0MYh8RgoDaeg+VXfblN6X8MZRfXMbgOqHMvLgMSzCDvwJKdlInF+ARPDa7KbN9izCgSk1q3A9CWtVQVQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 892BF2209F; Thu, 11 Jan 2024 13:07:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1704978470; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZXgkEX1wMkrrUNzwcePe4I5ukk5CIeqeYSVnEifiiek=; b=ePnpSfu5aLJt39m5HndQpFScvDybJokVeaZlz8RhBFbBRUpyZ/an4oPaeNg/Dzwcyp8R0A Dtigbn0phNp91xUJt3plrqlZLxjv5szoDrm4TBfCISQuOvHMQy+83x0lK9rwGvIfNV13Up 3To6AS+ROZ+TBxcnZUfF+S5n9KFsyY0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1704978470; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZXgkEX1wMkrrUNzwcePe4I5ukk5CIeqeYSVnEifiiek=; b=d5lCTzoU8ZirAZXqLa8ITsKT48w0NCa6yFjbE2TfsoAcarfRmoUVEgGeA6FK2wEPNm+ONs Moc/ofa6ZmcXWQCQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1704978470; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZXgkEX1wMkrrUNzwcePe4I5ukk5CIeqeYSVnEifiiek=; b=ePnpSfu5aLJt39m5HndQpFScvDybJokVeaZlz8RhBFbBRUpyZ/an4oPaeNg/Dzwcyp8R0A Dtigbn0phNp91xUJt3plrqlZLxjv5szoDrm4TBfCISQuOvHMQy+83x0lK9rwGvIfNV13Up 3To6AS+ROZ+TBxcnZUfF+S5n9KFsyY0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1704978470; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZXgkEX1wMkrrUNzwcePe4I5ukk5CIeqeYSVnEifiiek=; b=d5lCTzoU8ZirAZXqLa8ITsKT48w0NCa6yFjbE2TfsoAcarfRmoUVEgGeA6FK2wEPNm+ONs Moc/ofa6ZmcXWQCQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 697FC132CF; Thu, 11 Jan 2024 13:07:50 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id FlR5GCbon2WCLAAAD6G6ig (envelope-from ); Thu, 11 Jan 2024 13:07:50 +0000 Message-ID: <078a03f2-791b-4860-ace0-e4cff4677654@suse.de> Date: Thu, 11 Jan 2024 14:08:29 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] [gdb/testsuite] Fix gdb.dwarf2/dw2-entry-points.exp on ppc64le Content-Language: en-US To: Guinevere Larsen , gdb-patches@sourceware.org Cc: Ulrich Weigand , Carl Love References: <20240111124211.19244-1-tdevries@suse.de> From: Tom de Vries In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Authentication-Results: smtp-out1.suse.de; none X-Spamd-Result: default: False [-3.09 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; XM_UA_NO_VERSION(0.01)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BAYES_HAM(-3.00)[100.00%]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Level: X-Spam-Score: -3.09 X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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 1/11/24 13:55, Guinevere Larsen wrote: > On 11/01/2024 13:42, Tom de Vries wrote: >> On ppc64le-linux, I run into: >> ... >> (gdb) bt^M >>   #0  0x00000000100006dc in foobar (J=2)^M >>   #1  0x000000001000070c in prog ()^M >> (gdb) FAIL: gdb.dwarf2/dw2-entry-points.exp: bt foo >> ... >> >> The test-case attemps to emulate additional entry points of a >> function, with >> function bar having entry points foo and foobar: >> ... >> (gdb) p bar >> $1 = {void (int, int)} 0x1000064c >> (gdb) p foo >> $2 = {void (int, int)} 0x10000698 >> (gdb) p foobar >> $3 = {void (int)} 0x100006d0 >> ... >> >> However, when setting a breakpoint on the entry point foo: >> ... >> (gdb) b foo >> Breakpoint 1 at 0x100006dc >> ... >> it ends up in foobar instead of in foo, due to prologue skipping, and >> consequently the backtrace show foobar instead foo. >> >> The problem is that the test-case does not emulate an actual prologue >> at each >> entry point. >> >> Fix this by disabling the prologue skipping when setting a breakpoint, >> using >> "break *foo". > > Sorry if my question doesn't make sense, but wouldn't we also want to > verify that prologue skipping works correctly in a function with > multiple entrypoints? > Agreed, ideally we'd also verify it in this test-case. However, the commit introducing support for this also adds a test-case gdb.fortran/entry-point.exp which does verify that part of the functionality with compiler-generated entry points and prologues. > I agree that this looks like a testsuite fail rather than a real GDB > bug, but I feel like we'll be losing a valuable test if we don't try it > at any point, especially now that it is easy to explicitly mark an > instruction as EPILOGUE_END in the dwarf assembler. > I suppose you mean prologue_end (and I hadn't thought of that, thanks for the suggestion), but yes, we could do this. It would require adding a .debug_line section in the dwarf assembly, something that is currently missing. But given that the other test-case already tests this functionality, I'm not sure if it's worth the effort. Thanks, - Tom