public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
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	[thread overview]
Message-ID: <20240421222657.1052635-1-thiago.bauermann@linaro.org> (raw)

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

             reply	other threads:[~2024-04-21 22:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-21 22:26 Thiago Jung Bauermann [this message]
2024-04-21 22:26 ` [PATCH v2 1/2] gdb/testsuite: Add libc_has_debug_info require helper Thiago Jung Bauermann
2024-04-21 22:26 ` [PATCH v2 2/2] gdb/testsuite: Add gdb.base/memops-watchpoint.exp Thiago Jung Bauermann
2024-04-22 14:39   ` Luis Machado
2024-04-22 16:07     ` Thiago Jung Bauermann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240421222657.1052635-1-thiago.bauermann@linaro.org \
    --to=thiago.bauermann@linaro.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).