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.133.124]) by sourceware.org (Postfix) with ESMTPS id 32A823858D1E for ; Sun, 21 Apr 2024 21:20:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 32A823858D1E 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 32A823858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713734427; cv=none; b=XMW88Kl9lLBigxn+86CKfId4S3VKYcm4AdH2HwX6SOsFqj6nFeyKXO0a0UR1L8RSC0QX83fLcrRF1l1I9ZnAd5d2jpIFc6v7HQ0yEDbLQadM6EUGiGzh/RsR5mh4s1Wen+AYAdkL2IV5TeuujyI8hofbJ5/LMl5xY7gCMovzj+I= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713734427; c=relaxed/simple; bh=ScbzMAqMY5cKQtQXbi9eVjiKNoIobaiwWuRe3pG+0QM=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=soMq68arAW1EB1uEvacRxHj5aD6g2QlHwtZmFUw1fpVD+2ID6gVLoxYxhvNOa1zPKhdP/G2iObZOk2jqIkro1A0kvwU/5x6py6ckyqxDh6SNZJwZUmfsrekhvwQCIEmivcHMOzfwOGBFzkRSjXjzVRJ7VDkDiU5wmon6eL8pF2s= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1713734424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sdL1a1xSCmWR0pvH3Aub2BEIfKWA6l8WELm6h+YCaAQ=; b=WG07C9k5GEYNtDO2Bqv4mjesufu005EF5nOqUEJ3vIJH15OsZkj4zrDi+e8vgAH7y2K8sL hOXU0+WUIrjjAFy6Sw8xr7Me9AvK5A9goA0KZqqUQbguIzzIZ/4lukYhZtx8hXK7RsrfmV 3q9r15GBU24yYbFXdbacEyuX3JEZByw= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-82-nUxjVqQmNHmXbhi5nH79Lw-1; Sun, 21 Apr 2024 17:20:21 -0400 X-MC-Unique: nUxjVqQmNHmXbhi5nH79Lw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 30A1C8884A0; Sun, 21 Apr 2024 21:20:21 +0000 (UTC) Received: from f39-zbm-amd (unknown [10.22.16.14]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E19732026D0A; Sun, 21 Apr 2024 21:20:20 +0000 (UTC) Date: Sun, 21 Apr 2024 14:20:19 -0700 From: Kevin Buettner To: Thiago Jung Bauermann Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 2/2] gdb/testsuite: Add gdb.base/memops-watchpoint.exp Message-ID: <20240421142019.0f6d75d0@f39-zbm-amd> In-Reply-To: <20240420213307.976401-3-thiago.bauermann@linaro.org> References: <20240420213307.976401-1-thiago.bauermann@linaro.org> <20240420213307.976401-3-thiago.bauermann@linaro.org> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,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: On Sat, 20 Apr 2024 18:33:07 -0300 Thiago Jung Bauermann wrote: > diff --git a/gdb/testsuite/gdb.base/memops-watchpoint.exp b/gdb/testsuite/gdb.base/memops-watchpoint.exp > new file mode 100644 > index 000000000000..6fc84eb469c4 > --- /dev/null > +++ b/gdb/testsuite/gdb.base/memops-watchpoint.exp > @@ -0,0 +1,83 @@ > +# Copyright 2024 Free Software Foundation, Inc. > + > +# This program is free software; you can redistribute it and/or modify > +# it under the terms of the GNU General Public License as published by > +# the Free Software Foundation; either version 3 of the License, or > +# (at your option) any later version. > +# > +# This program is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +# GNU General Public License for more details. > +# > +# You should have received a copy of the GNU General Public License > +# along with this program. If not, see . > + > +# Test a binary that uses standard libc memory operation functions. They are > +# frequently optimized with specialized instructions, so make sure GDB behaves > +# correctly in their presence. > + > +# It's not possible to check in which libc function the watchpoint triggers > +# without its debug info. > +require libc_has_debug_info I'm wondering about the need for this requirement. When I comment it out and run it on a machine without libc debuginfo, I do see 3 FAILs, but it seems to me that those could be turned into PASSes by changing the regular expressions for the "continue until..." tests. E.g. for the first one, with libc debuginfo, I see: continue Continuing. Hardware watchpoint 2: -location a[31] Old value = 101 'e' New value = 0 '\000' __memset_avx2_unaligned () at ../sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S:146 146 VMOVU %VMM(0), (%rdi) (gdb) PASS: gdb.base/memops-watchpoint.exp: continue until memset watchpoint hits But, without libc debuginfo, the watchpoint still works: continue Continuing. Hardware watchpoint 2: -location a[31] Old value = 101 'e' New value = 0 '\000' 0x00007ffff7e3553a in __memset_avx2_unaligned () from /lib64/libc.so.6 (gdb) FAIL: gdb.base/memops-watchpoint.exp: continue until memset watchpoint hits As stated earlier, this could be turned into a PASS by tweaking the RE. In both cases, we know that it's in a "memset" function. (The presence of minimal symbols provides GDB with this information.) Kevin