From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 0543A3857695 for ; Mon, 31 Oct 2022 20:16:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0543A3857695 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=us.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=us.ibm.com Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29VIihJV019238 for ; Mon, 31 Oct 2022 20:16:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : subject : from : to : cc : date : content-type : mime-version : content-transfer-encoding; s=pp1; bh=0IEXqrqCbd4VRcMjo0ihv//5DTrumIZvVjYtQ9lC270=; b=XZxe2XJehlyG6TNr4VIy5Y0tGMsrt0/oqQqU9SJw7OyzMkSPGg1u869ab11KshHVbYsl LedHAkSl5AsHVlHPAz0quMZPqbD+D3bNmJm2RLzA2OnC2N5OucfjIXjQ+Fz6kndz9Mdx PV96NBaReskPBYnOgsz+5ychXJ5TVCM4hbXk1nrePNncgN/Uqr/UGUyDHLqyQZC1cGYV DRYSNuwQpcaQEGqAqCNJu4idH8O4bhjFHuYm0BMeafr5F1zKIUJNDTEmgfPkuWezXPB2 8gDZEXEPElpX/H9AdueQtOyniUMSLAqMSb03nArXPjREwmVR0Ypk822Px/rHmPdLytf5 Ew== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3kjkwek75s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 31 Oct 2022 20:16:24 +0000 Received: from m0098417.ppops.net (m0098417.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 29VIii3t019297 for ; Mon, 31 Oct 2022 20:16:24 GMT Received: from ppma03wdc.us.ibm.com (ba.79.3fa9.ip4.static.sl-reverse.com [169.63.121.186]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3kjkwek75k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 31 Oct 2022 20:16:24 +0000 Received: from pps.filterd (ppma03wdc.us.ibm.com [127.0.0.1]) by ppma03wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 29VK6Jex009970; Mon, 31 Oct 2022 20:16:23 GMT Received: from b03cxnp08025.gho.boulder.ibm.com (b03cxnp08025.gho.boulder.ibm.com [9.17.130.17]) by ppma03wdc.us.ibm.com with ESMTP id 3kgut9fs4e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 31 Oct 2022 20:16:23 +0000 Received: from smtpav03.dal12v.mail.ibm.com ([9.208.128.129]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 29VKGKGe5964404 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 31 Oct 2022 20:16:20 GMT Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4B83C58056; Mon, 31 Oct 2022 20:16:22 +0000 (GMT) Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D3D295805A; Mon, 31 Oct 2022 20:16:21 +0000 (GMT) Received: from li-e362e14c-2378-11b2-a85c-87d605f3c641.ibm.com (unknown [9.163.10.231]) by smtpav03.dal12v.mail.ibm.com (Postfix) with ESMTP; Mon, 31 Oct 2022 20:16:21 +0000 (GMT) Message-ID: Subject: Question: [PATCH] Change calculation of frame_id by amd64 epilogue unwinder From: Carl Love To: Bruno Larsen Cc: "gdb-patches@sourceware.org" , Ulrich Weigand , Will Schmidt , cel@us.ibm.com Date: Mon, 31 Oct 2022 13:16:21 -0700 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-18.el8) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: VwLajeYlaAc8kTac4awmf9DMVcsUm9Mz X-Proofpoint-ORIG-GUID: KUHIVmYvc27qeJ1rVvgJ7nCrsxkgmWAp X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-31_21,2022-10-31_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 clxscore=1015 phishscore=0 bulkscore=0 malwarescore=0 lowpriorityscore=0 priorityscore=1501 adultscore=0 suspectscore=0 impostorscore=0 mlxscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2210310121 X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,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: Bruno: Sorry for the slow response, I was out all of last week. It looks like you committed the patch: commit 49d7cd733a7f1b87aa1d40318b3d7c2b65aca5ac Author: Bruno Larsen Date: Fri Aug 19 15:11:28 2022 +0200 Change calculation of frame_id by amd64 epilogue unwinder When GDB is stopped at a ret instruction and no debug information is available for unwinding, GDB defaults to the amd64 epilogue unwinder, to be able to generate a decent backtrace. However, when calculating the frame id, the epilogue unwinder generates information as if the return instruction was the whole frame. This was an issue especially when attempting to reverse debug, as GDB would place a step_resume_breakpoint from the epilogue of a function if we were to attempt to skip that function, and this breakpoint should ideally have the current function's frame_id to avoid other problems such as PR record/16678. This commit changes the frame_id calculation for the amd64 epilogue, so that it is always the same as the dwarf2 unwinder's frame_id. It also adds a test to confirm that the frame_id will be the same, regardless of using the epilogue unwinder or not, thanks to Andrew Burgess. Co-Authored-By: Andrew Burgess a week or so ago. The test is generating hundreds of new errors on the various PowerPC processors. From the discussion above, it looks like you were trying to fix an issue with the amd64 epilogue. The patch introduced a new patch to test the amd64 epilogue changes. Do you expect this new test to run on all other platforms? In addition to the 575 new errors on Power 10, I see a lots of warnings: WARNING: While evaluating expression in gdb_assert: missing operand at _@_ in expression " _@_== 0x7fffffffc920" where the hex value changes for each warning. Still working on sorting out where the messages come from. The other thing I notice in the gdb/testsuite/gdb.base/unwind-on-each- insn.exp file is that you set a break point in function foo with the command: gdb_breakpoint "*foo" The use of breakpoint on *function is problematic on Power as discussed earlier. The use of *foo will set the breakpoint on the remote breakpoint which will not get hit in this test on PowerPC. I don't see why you chose to use *foo instead of foo? I don't see anything in the test that relies on the prolog where you would need the address of the function before the prolog. I only see references to the epilog of the function. Anyway, I am trying to figure out how to fix this test to work on PowerPC. Not sure if there needs to be some similar changes to the rs6000-tdep.c file similar to the changes in amd64-tdep.c? Any thoughts you have on the test that would be helpful to getting it to work on PowerPC, if that is appropriate, or having PowerPC skip this test would be appreciated. Thanks. Carl