From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id fYfAARvtJmZOvTgAWB0awg (envelope-from ) for ; Mon, 22 Apr 2024 19:04:59 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=AbiEH7xt; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id E81B61E0C0; Mon, 22 Apr 2024 19:04:58 -0400 (EDT) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id D0EAB1E030 for ; Mon, 22 Apr 2024 19:04:56 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 78D4F3858C41 for ; Mon, 22 Apr 2024 23:04:56 +0000 (GMT) Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by sourceware.org (Postfix) with ESMTPS id AD8E23858D35 for ; Mon, 22 Apr 2024 23:04:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AD8E23858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org AD8E23858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713827078; cv=none; b=Abu3pXYpWZn0wTliRoF/GtMFf28fZ+1c95/Hdo+B2tU3rYBR4/bi7C04z3vlJFm/e8IAa8nCDu464sK+1wRmH5iqKW9wUklq3y8w8o6goE/ytIgD+e0s314vO7lAf25f/X0DMWIaircF5FgeU7YIG+YEwk0hq+O80BHAzwrKUUU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713827078; c=relaxed/simple; bh=WXgCZHqFjPbIdBh278FYDA5ODTiXSaHrQGW3FkynpLg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=dSvznRGYohq6rWIiFFuMfAeqyQWtS5DzPj4ju1Q7HSqihAhJSFQBOZMJEmOjDWQizXdmvMNw7UkbeAG9R34vUhZroaCPr0dmuTqpJfCfHY5XIBo7aU5z2NGARSnV2bHi8vWjHyBbWLjTAW4INVT5SsndTYLEBYN0sF2uRTFX/VM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1e36b7e7dd2so43668885ad.1 for ; Mon, 22 Apr 2024 16:04:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713827076; x=1714431876; darn=sourceware.org; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=l8L03GB+6ueGCp8Y6/K31FSPZaQbH14cq2kAj+HZHzk=; b=AbiEH7xt9My50PgwDl1ibfTlexMhfWkOx8q6UX/51Mdn4VNoV5zetP4JbpmFPsPqKw dfNJohd+BnwPK/fQl9fJZOjbr7iXhm7MXOjMLkYJXlKnTuBRbQ/cVY2RD8ULPchDthXe Ue2zBbbK1GbTk4D2AmZNpuAh6ZUlHC7R7Nf9McUGdu22LzStrZbjXy8ZRZ7puvRELG8k dXSSMznYJOjGx44iPfOKYAR/lwnY5TmXeq3TOt1WpxGlI8XiFkkV7A4O1AnG2QnKRbfF U5tkstz4kjsLJoXk9at6TZzoEUXjr72nygpL7mPev6Ybex2WFBtR7xWJ9PMbQ+6i74PJ rJ7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713827076; x=1714431876; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=l8L03GB+6ueGCp8Y6/K31FSPZaQbH14cq2kAj+HZHzk=; b=ViL0zDORgjSYAn7Lspt8p1tsutJ8hErWBtsMDEXPkXKthXmlZK1d87QpAZY/8IqpQd 2J9yEVImPEmjyDalkdegQxmJ5Q0RQXNJP+9pkNxWZUEav2cJ521iiF8Q2jRgU/CpTdQb qirBjrXESBzmlTxBtCIcxq5DvhkHYH7XQOzUGtJnFX30ztYGNEDRmFBVFVDfYvZDsR4z RPMcTbK9HgNVkGg5HQh4SKbL0C4FscO4ZuwRKZB2v+3DqFEE2+PjCB7fiohI9fX2rDSJ 1/0eALa6VtKYqu0I2itV+bNvxAYkJFKyAULNhffUrER8x1P64XTA+zW9iI9qHazPkfxL ZiEw== X-Gm-Message-State: AOJu0YyHwoO+KS0/P/oLbHFASRlnGB6vrD9yGuWz9giCfAn7Ismr1Csy 9f/vQ/w7wdXptxqdBCdAvbjrvXwuWAoDrXMnWsv8ZZ8EH3wUeM+Q4NTZkgo07N97vCUFD1emqHF c X-Google-Smtp-Source: AGHT+IEU4JN9e4JrL3n+Zur8OWqZm40HBgye7iu5cYC0NFpvjGRprm5CFX4MoEIloaXAl1BmelOSwQ== X-Received: by 2002:a17:902:ecc1:b0:1e5:b82:3c24 with SMTP id a1-20020a170902ecc100b001e50b823c24mr14477362plh.53.1713827075550; Mon, 22 Apr 2024 16:04:35 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8470:25e4:a74b:cf9:5423]) by smtp.gmail.com with ESMTPSA id kw4-20020a170902f90400b001e0fdc6e4ebsm8694654plb.175.2024.04.22.16.04.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 16:04:35 -0700 (PDT) From: Thiago Jung Bauermann To: Kevin Buettner Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 2/2] gdb/testsuite: Add gdb.base/memops-watchpoint.exp In-Reply-To: <87wmoq2qid.fsf@linaro.org> (Thiago Jung Bauermann's message of "Sun, 21 Apr 2024 21:24:42 -0300") References: <20240420213307.976401-1-thiago.bauermann@linaro.org> <20240420213307.976401-3-thiago.bauermann@linaro.org> <20240421142019.0f6d75d0@f39-zbm-amd> <87wmoq2qid.fsf@linaro.org> User-Agent: mu4e 1.12.4; emacs 29.3 Date: Mon, 22 Apr 2024 20:04:32 -0300 Message-ID: <87a5ll2e4f.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Thiago Jung Bauermann writes: > Kevin Buettner writes: > >> On Sat, 20 Apr 2024 18:33:07 -0300 >> Thiago Jung Bauermann wrote: >> >>> +# 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.) > > I added the requirement because in my aarch64-linux system without libc6 > debug info I get: > > continue > Continuing. > > Hardware watchpoint 2: -location a[28] > > Old value = 104 'h' > New value = 0 '\000' > 0x0000fffff7e90664 in ?? () from /lib/aarch64-linux-gnu/libc.so.6 > (gdb) FAIL: gdb.base/memops-watchpoint.exp: continue until memset watchpoint hits > So it depends on the system. > > One alternative would be to not use the require statement and run the > test until the watchpoint hits, and have a case in gdb_test_multiple to > mark as UNRESOLVED if the function name is '??'. I was able to do this in v3. But I mark the test as UNSUPPORTED rather than UNRESOLVED. The difference between them isn't always clear in my mind, but I think UNSUPPORTED is better in this case. -- Thiago