From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 60A81386EC08 for ; Wed, 7 Jul 2021 15:08:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 60A81386EC08 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 167F3Arl049001; Wed, 7 Jul 2021 11:08:42 -0400 Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0b-001b2d01.pphosted.com with ESMTP id 39mkpvuske-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 07 Jul 2021 11:08:42 -0400 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 167EstMF032045; Wed, 7 Jul 2021 15:08:40 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma04ams.nl.ibm.com with ESMTP id 39jfh8stjy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 07 Jul 2021 15:08:40 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 167F8bG628115444 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 7 Jul 2021 15:08:37 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 61EB3AE05D; Wed, 7 Jul 2021 15:08:37 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4325BAE068; Wed, 7 Jul 2021 15:08:37 +0000 (GMT) Received: from oc0404454431.ibm.com (unknown [9.152.222.42]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Wed, 7 Jul 2021 15:08:37 +0000 (GMT) From: Andreas Arnez To: Simon Marchi via Gdb-patches Subject: Re: [PATCH master + 11] gdb: don't set Linux-specific displaced stepping methods in s390_gdbarch_init Organization: IBM Deutschland Research & Development GmbH References: <20210707125736.2829336-1-simon.marchi@polymtl.ca> Date: Wed, 07 Jul 2021 17:08:36 +0200 In-Reply-To: <20210707125736.2829336-1-simon.marchi@polymtl.ca> (Simon Marchi via Gdb-patches's message of "Wed, 7 Jul 2021 08:57:36 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: VlYGI8wj47oWnjbb-GhzGmGB93fl6ihD X-Proofpoint-GUID: VlYGI8wj47oWnjbb-GhzGmGB93fl6ihD X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-07_08:2021-07-06, 2021-07-07 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 adultscore=0 malwarescore=0 spamscore=0 suspectscore=0 impostorscore=0 phishscore=0 mlxlogscore=999 lowpriorityscore=0 priorityscore=1501 clxscore=1011 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107070088 X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jul 2021 15:08:54 -0000 On Wed, Jul 07 2021, Simon Marchi via Gdb-patches wrote: [...] > The Linux-specific callback was used > even for non-Linux system. Maybe that was on purpose, because it would > also happen to work in some other non-Linux case, or maybe it was simply > a mistake. I'll assume that this was a small mistake when > s390-tdep.{h,c} where factored out of s390-linux-tdep.c, in d6e589456475 > ("s390: Split up s390-linux-tdep.c into two files"). I agree that this is probably a mistake. It didn't cause any trouble right away, because GDB doesn't really support any other s390 OSs. One possible additional "OS" would have been the Linux kernel runtime, but that hasn't manifested yet. > Fix this by removing the setting of these displaced step callbacks from > s390_gdbarch_init. Instead, pass num_disp_step_buffers=1 to > linux_init_abi, in s390_linux_init_abi_any. Doing so will cause > linux_init_abi to register these same callbacks. It will also mean that > when debugging a bare-metal s390 executable or an executable on another > OS that GDB doesn't know about, gdbarch_displaced_step_prepare won't be > set, so displaced stepping won't be used. Sounds good to me, and the patch looks good as well. Thanks! -- Andreas