From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id C0DC23857C4B for ; Mon, 20 Nov 2023 13:09:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C0DC23857C4B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C0DC23857C4B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700485776; cv=none; b=iZe/9we9dCk01EU90DEQ68/YXPgXI3dcYsR+N8Jc4amXp/ReuV3R3vehkQQZs1BmMFersy0ougPzRTWdr0t4kx3n9Bl56V84hk+8JVXS1UP26a8V0HH2/L68zsskDTXWLxZ0N11cpJb3+iMj7JT4ZpyQDQWVKfRrJLXYlSpelS4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700485776; c=relaxed/simple; bh=Hocd7oFfrFH+L4GfFmdWhlhbviA9XtDRl0FbfCjWp3c=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=T9wA5LPDuARqRTNlbzWNUURt4wk4eykgx/PH7rd5Zs9jN0/ABHPE8lbStS32lV2IyrAX+D2SQC3P7hCMHmn9CeOs/p7AqXAkPBSkLSYQ7h2GChj6S/uoaN64PRNbpELkL6cpz2h2rsxPzZIxWpmkjCGj6h8ide4xZT6E1Nb+zAI= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700485773; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=j+mWFe99r7raHB06UXJdeAPrSdhHpoS41V2LtRmJixc=; b=SDz/ilBzSrkLDQ3WoqrxLFhkD5Uupqi0pJaCeLRqREUHEqawpUkCLVGivMN9eh0xT9KZHp W/0Wi8ILeSNrwljXijTxS+Cs1NriWTXc7SsEmwZZUaTHGOyUVQOylbsyWmVudE68sBwuy5 dGGMJ9sskHcCwSXzvmxQN7euvZYLjaA= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-527-fsPBZKuUMwWXyKoKSVYeqA-1; Mon, 20 Nov 2023 08:09:31 -0500 X-MC-Unique: fsPBZKuUMwWXyKoKSVYeqA-1 Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-50aa9e4f845so1560505e87.1 for ; Mon, 20 Nov 2023 05:09:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700485770; x=1701090570; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=j+mWFe99r7raHB06UXJdeAPrSdhHpoS41V2LtRmJixc=; b=JB9uE4CdrP48XxRDOFmYm+GcMINMhoc9ovFFChV+NtUgRZKAZd3PyqRJ0OsugU4Tt/ c+LSZXS78aXOxDrD4B1P3NAFwytv25iNnrB5EdTsfSmNkGASgvHT9b4oYGSgkoDvXRcq kKfvsg+yvCya8pFGO59+tK2N9gAmgrZagYK8tE0p0eCttW8HRZqWOzWsHWIU3ZfbJ1a0 S1/PSQ3AKFFXdZd26+KC5gC0OWgsb1iWAO/EN/Gs2ywG1lCXon0iFO+5NHr3EW45/h5T /2pNPgFmETp7qcU7NVWMc+lHBIGJN+uEmX+VTLJIbDW1E53ROQAhd46U5MmfqEcd500b hReg== X-Gm-Message-State: AOJu0Ywy1YeA3nJXJdEC6HG3xvX1nSghCnfj8hTZJ4IHTCfEEULyAziQ a3SgJ+5pRJ9cPkPt9bgcUr67U1CgnWs6/OhVG2U0GPRocb0Lsh41cs0woBB/VAOKx/4XcmgnPDF UJre8RlAn0XaMQPh2YQP0e6NLeZxGOw== X-Received: by 2002:a2e:3310:0:b0:2c5:1aae:400d with SMTP id d16-20020a2e3310000000b002c51aae400dmr4182293ljc.22.1700485770054; Mon, 20 Nov 2023 05:09:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IEyG19yQ//qnpKyM2kvQJ2NdFxihv90RNKSboxigLn/a+r9SrpawFr9I/QQREvPZnPHpn0kuA== X-Received: by 2002:a2e:3310:0:b0:2c5:1aae:400d with SMTP id d16-20020a2e3310000000b002c51aae400dmr4182279ljc.22.1700485769691; Mon, 20 Nov 2023 05:09:29 -0800 (PST) Received: from [192.168.0.129] (ip-94-112-227-180.bb.vodafone.cz. [94.112.227.180]) by smtp.gmail.com with ESMTPSA id z7-20020a05600c0a0700b003fc0505be19sm13658091wmp.37.2023.11.20.05.09.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Nov 2023 05:09:29 -0800 (PST) Message-ID: <05d3b3e1-fb3c-4a1d-c5c1-75975c2af367@redhat.com> Date: Mon, 20 Nov 2023 14:09:28 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH v2] Fix hardware watchpoints in replay mode To: Hannes Domani , gdb-patches@sourceware.org References: <20230914162732.2077-1-ssbssa.ref@yahoo.de> <20230914162732.2077-1-ssbssa@yahoo.de> From: Guinevere Larsen In-Reply-To: <20230914162732.2077-1-ssbssa@yahoo.de> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,RCVD_IN_BARRACUDACENTRAL,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,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 14/09/2023 18:27, Hannes Domani via Gdb-patches wrote: > Changes introduced by commit 9e8915c6cee5c37637521b424d723e990e06d597 > caused a regression that meant hardware watchpoint stops would not > trigger in reverse execution or replay mode. This was documented in > PR breakpoints/21969. > The problem is that record_check_stopped_by_breakpoint always overwrites > record_full_stop_reason, thus loosing the TARGET_STOPPED_BY_WATCHPOINT > value which would be checked afterwards. > > This commit fixes that by checking if record_full_stop_reason is > TARGET_STOPPED_BY_BREAKPOINT and, if so, not overriding it. > > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=21969 > --- I have sent a review to this patch. Your spam filter must have catched it or something similar. If you can't find it, here's the link for the public inbox: https://inbox.sourceware.org/gdb-patches/2eb65a2d-aa80-5930-3033-bfd82baa2ed9@redhat.com/ -- Cheers, Guinevere Larsen She/Her/Hers > gdb/record-full.c | 4 +++- > gdb/testsuite/gdb.reverse/watch-reverse.exp | 4 ++++ > 2 files changed, 7 insertions(+), 1 deletion(-) > > diff --git a/gdb/record-full.c b/gdb/record-full.c > index faf8b595d22..da785ef4b2a 100644 > --- a/gdb/record-full.c > +++ b/gdb/record-full.c > @@ -1382,7 +1382,9 @@ record_full_wait_1 (struct target_ops *ops, > > /* check breakpoint */ > tmp_pc = regcache_read_pc (regcache); > - if (record_check_stopped_by_breakpoint > + if (record_full_stop_reason > + != TARGET_STOPPED_BY_WATCHPOINT > + && record_check_stopped_by_breakpoint > (aspace, tmp_pc, &record_full_stop_reason)) > { > if (record_debug) > diff --git a/gdb/testsuite/gdb.reverse/watch-reverse.exp b/gdb/testsuite/gdb.reverse/watch-reverse.exp > index 6b81a6fdf88..a7126ac9b1d 100644 > --- a/gdb/testsuite/gdb.reverse/watch-reverse.exp > +++ b/gdb/testsuite/gdb.reverse/watch-reverse.exp > @@ -118,8 +118,12 @@ gdb_test "continue" \ > ".*\[Ww\]atchpoint.*ival3.*Old value = 0.*New value = -1.*ival3 = count; ival4 = count;.*" \ > "watchpoint hit in reverse, fifth time" > > +gdb_test_no_output "disable \$bpnum" "disable non-hw watchpoint" > + > gdb_test_no_output "set can-use-hw-watchpoints 1" "enable hw watchpoints" > > +gdb_test_no_output "enable \$bpnum" "enable hw watchpoint" > + > ### > ### > ###