From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 3A05C385841E for ; Wed, 18 Jan 2023 22:26:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3A05C385841E 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 (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30IMI7Bc030581; Wed, 18 Jan 2023 22:26:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : from : to : cc : date : in-reply-to : references : content-type : content-transfer-encoding : mime-version : subject; s=pp1; bh=y3jo0UlhHarpZxjIyUGSVoRy8FPmfHY3B5YXNd0K6IU=; b=S2VMmILw7tBpfwKasTD5RAdtOAkS4OWbY51gW1w2Qx854KfJ9o00NIfClp4v9kJOhwQd wPdZlSo0Xfrsq6cjKu1Ue2xzla3fyjS/tlwIHenSnxYHFC57BwGxOtMuPVvo4T+cKZKL 3xTpxPYDUfVHetBZkRTENFMuydb4QV3viNBu5DUpUpNQbE7LtAQzwYccu5QAyteVFgbG vuMQ7QStx9rU/VzNz7NoHxobyWWp0QCUAyXfyz7bN5UQYHLNCGD+BQEoVXOYMXciGolG sv3HgV6iUwWcYbliRORB6Aq/F8x7MmpxTYvwuhKszq3qsC7JnvpRxQNJWryfIjDVpHKA yg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3n6hem4wfh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 18 Jan 2023 22:26:36 +0000 Received: from m0098399.ppops.net (m0098399.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 30IM8I6t019088; Wed, 18 Jan 2023 22:26:36 GMT Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3n6hem4wf7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 18 Jan 2023 22:26:36 +0000 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 30IK0JJT018968; Wed, 18 Jan 2023 22:26:35 GMT Received: from smtprelay04.wdc07v.mail.ibm.com ([9.208.129.114]) by ppma04wdc.us.ibm.com (PPS) with ESMTPS id 3n3m17gb91-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 18 Jan 2023 22:26:35 +0000 Received: from smtpav06.wdc07v.mail.ibm.com (smtpav06.wdc07v.mail.ibm.com [10.39.53.233]) by smtprelay04.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 30IMQYTK54657458 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 18 Jan 2023 22:26:34 GMT Received: from smtpav06.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 26FAA5804E; Wed, 18 Jan 2023 22:26:34 +0000 (GMT) Received: from smtpav06.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8322D5803F; Wed, 18 Jan 2023 22:26:33 +0000 (GMT) Received: from li-e362e14c-2378-11b2-a85c-87d605f3c641.ibm.com (unknown [9.163.12.142]) by smtpav06.wdc07v.mail.ibm.com (Postfix) with ESMTP; Wed, 18 Jan 2023 22:26:33 +0000 (GMT) Message-ID: From: Carl Love To: Tom de Vries , Bruno Larsen , Ulrich Weigand , gdb-patches@sourceware.org Cc: cel@us.ibm.com Date: Wed, 18 Jan 2023 14:26:32 -0800 In-Reply-To: References: <89331c26795e3f7743e1e068dce43b3c2dd53008.camel@us.ibm.com> <071f24ecf9b3a2bbbe8fee7db77492eb55c5f3ff.camel@us.ibm.com> <1d9b21914354bef6a290ac30673741e722e11757.camel@de.ibm.com> <3e3c9c40f07ab01c79fe10915e76ffa187c42ad9.camel@us.ibm.com> <122f5d2d3db9ef1979b0f8da927d005f32bba82c.camel@us.ibm.com> <011768e8-2b76-f8ed-1174-fbaa020b15e7@redhat.com> <78b464a1-e32e-c3da-85e4-7bfc322cc29f@redhat.com> <7848e9858b54e33e399b871774ffc0b5058c1736.camel@us.ibm.com> <65d44121-65f7-a212-79ec-07ce53c15ecb@suse.de> <9fe94c0979cb40979b0dea7693a901c2d9f66164.camel@us.ibm.com> <59417813-eb4a-baf8-4e5d-e225d6732f71@suse.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-18.el8) X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 4LetWh-QPIvFkRAFDS0h_d_UeNw52-zU X-Proofpoint-GUID: scF8aQwiEuyYPYDfCHkT6T2x6MB_pLSv Content-Transfer-Encoding: 7bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 Subject: RE: [PATCH 2/2 version 2] fix for gdb.reverse/finish-precsave.exp and gdb.reverse/finish-reverse.exp X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.923,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-18_05,2023-01-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 priorityscore=1501 spamscore=0 mlxscore=0 malwarescore=0 bulkscore=0 mlxlogscore=903 impostorscore=0 clxscore=1015 phishscore=0 lowpriorityscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301180185 X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,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: Tom and Bruno: On Wed, 2023-01-18 at 11:55 +0100, Tom de Vries wrote: > > I've run into regressions due to the first patch: > ... > FAIL: gdb.btrace/rn-dl-bind.exp: test: reverse-next > FAIL: gdb.btrace/tailcall.exp: reverse-next.1 > FAIL: gdb.btrace/tailcall.exp: step.1 > ... I am looking into these failures. I tried running the rn-dl-bind.exp test on my PowerPC and X86 box. On both systems, I get the error: UNSUPPORTED: gdb.btrace/rn-dl-bind.exp: target does not support record-btrace testcase /../binutils-gdb-finish-precsave/gdb/testsuite/gdb.btrace/rn-dl-bind.exp completed in 0 seconds I tried compiling the source code and running gdb by hand on my PowerPC machine. When I try the command record btrace, I get the message: You can't do that when your target is `multi-thread'. Digging into the GDB manual I see it says the following about btrace: Hardware-supported instruction recording, supported on Intel processors. This method does not record data. Further, the data is collected in a ring buffer so old data will be overwritten when the buffer is full. It allows limited reverse execution. Variables and registers are not available during reverse execution. In remote debugging, recording continues on disconnect. Recorded data can be inspected after reconnecting. The recording may be stopped using record stop. >From this I am assuming you saw the error on and Intel box not a PowerPC box. I tried to run the rn-dl-bind.exp test on my X66 box by hand and got the messages: Breakpoint 1, main () at rn-dl-bind.c:35 35 ret = test (); /* main.1 */ (gdb) record btrace pt Intel Processor Trace support was disabled at compile time. (gdb) record btrace bts Could not enable branch tracing for Thread 0x7ffff7d85740 (LWP 3087787): BTS support has been disabled for the target cpu. I found on the web page: https://gdb-patches.sourceware.narkive.com/Y1ypJmWj/patch-btrace-diagnose-record-bt race-pt-without-libipt says record btrace pt neds: This requires a system with Linux kernel 4.1 or later running on a 5th Generation Intel Core processor or later. Since I couldn't get the test to run on an IBM machine, I built GDB on my personal Linux laptop. Initially, I was not able to get the test to run. The log file had the error message: (gdb) record btrace Could not enable branch tracing for process 3941218: You do not have permission to record the process. Try setting /proc/sys/kernel/perf_event_paranoid to 2 or less. I changed /proc/sys/kernel/perf_event_paranoid from 4 to 2. Now the test runs. (gdb) PASS: gdb.btrace/rn-dl-bind.exp: test: reverse-next testcase /home/carll/GDB/binutils- build/gdb/testsuite/../../../binutils- gdb/gdb/testsuite/gdb.btrace/rn-dl-bind.exp completed in 0 seconds === gdb Summary === # of expected passes 9 The test works fine without my patches, with just the X86 patch and with both the X86 patch and the PPC patch. Unfortunately, I wasn't able to run the tests on the IBM machine but I can on my personal laptop. However, I am still not seeing any errors as a result of my patches. Not sure what more I can do at this point. If you have some time, can you take a look at the failures on your machine and let me know what you are seeing. Maybe we can figure out what is going on. Perhaps Bruno can also check to see if the two tests were ran on his machine. If not, hopefully the info above will help Bruno to get the tests to run on his machine and we can see if they fail there as well. Thanks for the help with this patch. Carl