From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by sourceware.org (Postfix) with ESMTPS id E70113858D1E for ; Sun, 21 Apr 2024 22:27:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E70113858D1E 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 E70113858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::52f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713738425; cv=none; b=MzaN9Gmmpk+JCxITUhLhq/F0oTcj71r01ftD5h5502kcROviTW06Pv7o6UsnsxkXQlCaO6oF8kRekoGHavK5Skvw3bc3RtNux6Js2MwN/2FueiiSLcfxc/cTKv1PngnAOiYTjtHEY+3oeX/pPLDaZRqd6rhKC0kgF6zNGplzvgs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713738425; c=relaxed/simple; bh=CjSeLBW/y2tNurryxY6z2opzqtEifSrcRUo4curKwyg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=gEE+pJUNi4yHlhTQhZ4heh7NS2wGiRC0UtuoZF4f/hl6Ff1J44vjR+QbAvLNxJwJYtmZNKZRA2j6Zag/c9FaYuBZGbfqU7gesSxiwozKn4hsmUAI0EHiJzXRngndTuJ3XQHSBaor51vqoOIDvnGGdPyb+LCta46xDXQJ7iqt/F4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-5e4f79007ffso2423869a12.2 for ; Sun, 21 Apr 2024 15:27:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713738422; x=1714343222; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=ZubvdS+ASGZ4b3PEfsI6lL4fWXUAfqMrkdtsq0REhfY=; b=t+FYPvgPp997vySfn9PIVc3oUGEIDhQV1wMX6kqsq3IG5d7l/gc0AWfsR0wdI/jZfm kpbVOqwrf/WZpKag8bUBUhazCTD7WXpzEONrWnqEmRvTsbLdDENXUYpEQr4mI2h4bS0Y rTutpM4BpvNtIZQ4e/RDA7itZ1UiztESDVu0DhJ6WeuWMCcUBDygRmMhgyMzd0jhWXG/ /gC9Iqbj4vXww0b9kTlVp7B0Yfcq+/xUZQt818o+SlR5f/uE9Dww9yc7t8HrtXWUMRPQ 3sJLzTmImwew2GtwCLs+FGppsVm0C/B9slf1St+bvoj53ervrA/LWbKRbx4paS8XgEU8 fAQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713738422; x=1714343222; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ZubvdS+ASGZ4b3PEfsI6lL4fWXUAfqMrkdtsq0REhfY=; b=uhRzj5j460p1dBDgr2t3LZ11mXlpVo6/dH0HfNYSlzR7Bq4OFZW2fJjuYF1av2M3iJ tsi1HsJY37jcEXHSdb7+MB2SGDojzdNXwNtIRS/mXb/t9INrYYbxIe94T79NsoF0pdKC Rhu7dFq4jLzay0/a589it/37e6BZ8TqTlIVWp9PwaSrm2GGguHdF+PtEC20UC1b8QaXy ji/Qsjc/Q9hTiZ9XSOfcSbBOXpccY0iAXAajLWE886lMc96owkh6Xg2IXYSvgPuheUE9 Al4/5g5XcrQKa+n0qUkRg6Fa0yopbDn1Ic9JwHWQU9K3ZXrq7CuM9qTLJB+F60+OGhmv oWug== X-Gm-Message-State: AOJu0Yw1Ym8F9RhaJACfVHCSd2a5ZuHISQnJNpuWu2ZeXZgxilxtdyOl 4knX9ujePVpxHDmdwpSLa105LnwE49xOl93liUuYaaKf9+XE1aKgKJsV9RimGBZ/+pKODVFkMB5 i X-Google-Smtp-Source: AGHT+IEiwjjYgljJKN7Q837ufo7CACmKUf0KiSdZXzfOridRvL6sPYvAv3oUB51uhSbJgJdotQr6dQ== X-Received: by 2002:a17:902:e890:b0:1e4:53b6:6cf with SMTP id w16-20020a170902e89000b001e453b606cfmr11370553plg.50.1713738421594; Sun, 21 Apr 2024 15:27:01 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8470:3224:7231:e42f:1da5]) by smtp.gmail.com with ESMTPSA id g4-20020a170902f74400b001e24988b99asm6760966plw.250.2024.04.21.15.27.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Apr 2024 15:27:01 -0700 (PDT) From: Thiago Jung Bauermann To: gdb-patches@sourceware.org Subject: [PATCH v2 0/2] Add testcase for libc memory operations Date: Sun, 21 Apr 2024 19:26:55 -0300 Message-ID: <20240421222657.1052635-1-thiago.bauermann@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 List-Id: Hello, v2 addresses a test failure on armv8l-linux-gnueabihf found by the Linaro CI (I forgot to try the testcase on that platform...). The problem was that the machine used by the CI needs hardware watchpoints to be aligned to 4 bytes, or else GDB fails with: (gdb) watch -location c[31] Hardware watchpoint 4: -location c[31] (gdb) continue Continuing. Unexpected error setting watchpoint: Invalid argument. (gdb) After fixing this problem, the testcase uncovered a real bug, filed as PR breakpoints/31665 and kfailed in the testcase. Patch 1 is the same as v1, only patch 2 has changes. Original cover letter below: In PR testsuite/31484, Tom de Vries suggests adding testcases that excercise memset/memcpy/memmove and set watchpoints. Patch 2 adds such testcase. See its description for a bit more on the motivation. Patch 1 factors out code to check whether libc debug info is available, which is needed for the new testcase. Thiago Jung Bauermann (2): gdb/testsuite: Add libc_has_debug_info require helper gdb/testsuite: Add gdb.base/memops-watchpoint.exp gdb/testsuite/gdb.base/memops-watchpoint.c | 45 ++++++++++ gdb/testsuite/gdb.base/memops-watchpoint.exp | 86 ++++++++++++++++++++ gdb/testsuite/gdb.base/relativedebug.exp | 13 +-- gdb/testsuite/lib/gdb.exp | 54 ++++++++++++ 4 files changed, 186 insertions(+), 12 deletions(-) create mode 100644 gdb/testsuite/gdb.base/memops-watchpoint.c create mode 100644 gdb/testsuite/gdb.base/memops-watchpoint.exp base-commit: 20eee7540b9f2615f7661393756fec0bb62a1495