From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id 50FF23858C5F for ; Thu, 11 May 2023 15:50:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 50FF23858C5F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-643a6f993a7so5254105b3a.1 for ; Thu, 11 May 2023 08:50:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683820222; x=1686412222; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=A93z6NZKXyl2oLDUD1L0aPpxcrwnrIkVs4zrHKLvlHQ=; b=sFb959vnbBDkq6VF6KO/wTkTu+NaoY3zrwlypBUSkYH4TuaIUDsRg96z6jP0NuwNQo i6mHrwmLOkqa/Ydn6e3QDJ9h6ycECvHOb1flr9mCNN5Ao+XxjmPDNRYHn7NON0MxYmji sd/Hp0pe437KDOrt1ZNIKpRtvfTrajxlbYivS7mLn+2hAFQiS1oLkkD1vt0o5wQiglZI M5cpz6kswYVZWK64gZ/lpxq8xiGpG07Rjep/MNF/pUlc6ajm5Hq03Dd0yIaUuE65viUq QPvEgugsay1lVhcWN6UCIaFRn+cWQfol2Y3Fwh5S8Ntmj78JsZcnj5kgd2KQ+VvIbkGX Y8DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683820222; x=1686412222; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=A93z6NZKXyl2oLDUD1L0aPpxcrwnrIkVs4zrHKLvlHQ=; b=erzrVfvFZdEMMzUdpQUWHQfDgXJUfk/f3f47dwPGPaQTNTAns2UBg1W+KPIIJjd0Re nRkMHFK3KVDPh9Te3ezs9ithCB/FpPihlxtTuk1pslBw5/+kmtGquvDbCxazFjwK2I11 JZSOFUKotNrHNUsPQ6wLf5pbBchfS/GAOmnEecnY3b+n/1vhvEDe6kcv0Wc5JaWP/T+m xhdzzAO/R87AtkJKtK72ahbPQp/4m3brkXCtR64ve7sr7l1aQUwtIs0pcx69EDWSmK0p Ybx9uaeCOdXjUSxlMaFhp8ulf95B6Mf3cCVQbdnx0qBItdp4Oomn/fttn+Pv9pbh87C1 3oZQ== X-Gm-Message-State: AC+VfDxNtJLeUhwOl0kgFLU/C4Op7bmscdiN604xzxvxDfb5fJUtxFtU xQZha8HNENSHIM8+oNwN15MZQtmxWs6YGQ== X-Google-Smtp-Source: ACHHUZ6cCU7+srLM7KSu6YIWHCNRnv5r5W1g3QyuvBp+ulZWKR7oPO4TFcZNjFhTzwjdSpyNRViFZQ== X-Received: by 2002:a05:6a20:9389:b0:ff:e397:cb7e with SMTP id x9-20020a056a20938900b000ffe397cb7emr23802215pzh.33.1683820222074; Thu, 11 May 2023 08:50:22 -0700 (PDT) Received: from [192.168.117.3] (sd237023.ching-de.ab.nthu.edu.tw. [140.114.237.23]) by smtp.gmail.com with ESMTPSA id b1-20020aa78101000000b0063b8f33cb81sm5647350pfi.93.2023.05.11.08.50.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 11 May 2023 08:50:21 -0700 (PDT) Message-ID: Date: Thu, 11 May 2023 23:50:18 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [PATCH v5] [PR python/29603] Disable out-of-scope watchpoints To: SimonMarchi , JohnsonSun , LancelotSIX , gdb-patches@sourceware.org References: <1b60c407-1406-ed3c-7d64-a79c786ae9b7@gmail.com> <20230423095408.7638-1-j3.soon777@gmail.com> <1b0edc1f-0783-e262-2138-6982a18ddf97@gmail.com> Content-Language: en-US From: Johnson Sun In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,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 5/11/2023 10:08 AM, SimonMarchi wrote: > On 5/10/23 13:22, Johnson Sun wrote: >> Hi, >> >> I just applied the patch to commit 39453f9d8cf03b382d34f3548706f1ae5916e34e, and tested with the following commands on a clean Ubuntu 22.04 LTS machine: >> >> make check TESTS="gdb.python/py-watchpoint.exp" >> make check TESTS="gdb.python/py-watchpoint.exp" RUNTESTFLAGS="--target_board=native-gdbserver" >> make check TESTS="gdb.python/py-watchpoint.exp" RUNTESTFLAGS="--target_board=native-extended-gdbserver" >> >> all 3 commands above passed the tests (10/10) on my machine. >> >> I'm unsure why the test times out on your machine. Could you provide information regarding the base commit that was used and the operating system installed? > I just retested on latest master as of now (38b95a529385). > > Looking at the output of "set debug infrun", it looks like the program > is making progress, just that it's really slow, since GDB is single > stepping all instructions due to the software watchpoint. > > Is the printf necessary for the test? If not, we can remove it. If the > loop executes just a few instructions, the program should execute > relatively quickly, even if single stepping all the way through. > > Simon Hi, The `printf` statement is not necessary. The tests will still pass after removing the `printf` statement and declaring the variable `i` as volatile. I just sent an updated patch: Thank you, Johnson