From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by sourceware.org (Postfix) with ESMTPS id 83C2B3858D38 for ; Tue, 21 Mar 2023 13:10:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 83C2B3858D38 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f43.google.com with SMTP id v1so7511946wrv.1 for ; Tue, 21 Mar 2023 06:10:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679404216; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=UwYzR4LAOGy+qp9VxbZ1EaiK8f+Tgdc2lXTKpnnv23s=; b=6wAYhxcQ+ea9bpN0MWQOoEPiX0yqdGFWsS2IQPrSykR4SD+XL+GB2FAqiUf7uJpMbW 5uC17jR5SdrRysVAunIp+LmTf5sahpO1PuujXgvEd7DC1a729IYbEJY6FHHv9IrA33fU Y5MZKEWMChwzM/fEYhXTRWGLZVlucBMpYnoVAYlnYyCbo7AULN5k+xdFyxyxFty5k3Ks JYKwHYUe/fsO1IHTQIi6B/3lxX69cQHX7ygaR71HSpEcfj4YMgnqbyyzuxP5f8CLsQ+7 +qZf+ZXCz8CDST2E2pXAsL4sMnbJBhkuLeA4saiPPdgrd5AfIGNZjtICBS2nXQn2Pj3I BSRg== X-Gm-Message-State: AO0yUKWC5IfcpFtzPs0LyffwdwePk2EiEthNKRJFJyTmCc1+FjSzr5YL UTMpCAsBAN4CSlkcgPZYZbnRXOIrrmy3cA== X-Google-Smtp-Source: AK7set/iJ6v669lgjJEuIgYHeRqiq2931XQdaRofVzdg7j3p0Bfqq5wzM4PSDo8cGxwJxXjSW7c9Lg== X-Received: by 2002:a05:6000:7:b0:2ce:a0b9:cda8 with SMTP id h7-20020a056000000700b002cea0b9cda8mr2395809wrx.37.1679404215988; Tue, 21 Mar 2023 06:10:15 -0700 (PDT) Received: from ?IPv6:2001:8a0:f93c:5900::1fe? ([2001:8a0:f93c:5900::1fe]) by smtp.gmail.com with ESMTPSA id l5-20020adfe585000000b002cea9d931e6sm11348482wrm.78.2023.03.21.06.10.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Mar 2023 06:10:15 -0700 (PDT) Subject: Re: [PATCHv2 2/4] gdb: remove gdbarch_displaced_step_fixup_p To: Andrew Burgess , gdb-patches@sourceware.org References: From: Pedro Alves Message-ID: Date: Tue, 21 Mar 2023 13:10:23 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,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 2023-03-16 4:39 p.m., Andrew Burgess via Gdb-patches wrote: > The comment on the gdbarch_displaced_step_fixup gdbarch method > indicates that this method is optional and that GDB will perform some > default if this method is not supplied. As such we define a predicate > gdbarch_displaced_step_fixup_p. > > It may have been true at one point that the fixup method was optional, > but it is no longer true. If this method is not defined and GDB tries > to complete a displaced step, then GDB is going to crash. > > Additionally the gdbarch_displaced_step_fixup_p predicate is not used > anywhere in GDB. > > In this commit I have removed the gdbarch_displaced_step_fixup_p > predicate, and I have updated the validation check for the > gdbarch_displaced_step_fixup method; if the > gdbarch_displaced_step_copy_insn method is defined then the fixup > method must also be defined. > > I believe I've manually checked all the current places where > gdbarch_displaced_step_copy_insn is defined and they all also define > the fixup method, so this change should cause no problems for anyone. > > There should be no user visible changes after this commit. Approved-By: Pedro Alves