public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug tdep/29868] [gdb/tdep, s390x] breakpoint.c:5784: internal-error: bpstat_stop_status_nowatch: Assertion `!target_stopped_by_watchpoint ()'
Date: Mon, 12 Dec 2022 09:48:02 +0000	[thread overview]
Message-ID: <bug-29868-4717-W94tqPxccA@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29868-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=29868

--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
I found this bit of code in aarch64_linux_nat_target::stopped_data_address:
...
diff --git a/gdb/s390-linux-nat.c b/gdb/s390-linux-nat.c
index 96833e804e9..02b797e422f 100644
--- a/gdb/s390-linux-nat.c
+++ b/gdb/s390-linux-nat.c
@@ -673,6 +673,13 @@ s390_linux_nat_target::stopped_by_watchpoint ()
   if (state->watch_areas.empty ())
     return false;

+  siginfo_t siginfo;
+  if (!linux_nat_get_siginfo (inferior_ptid, &siginfo))
+    return false;
+  if (siginfo.si_signo != SIGTRAP
+      || (siginfo.si_code & 0xffff) != TRAP_HWBKPT)
+    return false;
+
   parea.len = sizeof (per_lowcore);
   parea.process_addr = (addr_t) & per_lowcore;
   parea.kernel_addr = offsetof (struct user_regs_struct, per_info.lowcore);
...
and it fixes the test-case.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2022-12-12  9:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-10  8:18 [Bug gdb/29868] New: [gdb, s390x -m31] " vries at gcc dot gnu.org
2022-12-10 11:25 ` [Bug gdb/29868] [gdb, s390x] " vries at gcc dot gnu.org
2022-12-12  3:14 ` [Bug tdep/29868] [gdb/tdep, " vries at gcc dot gnu.org
2022-12-12  9:46 ` vries at gcc dot gnu.org
2022-12-12  9:48 ` vries at gcc dot gnu.org [this message]
2022-12-12 12:08 ` vries at gcc dot gnu.org
2022-12-12 13:51 ` uweigand at gcc dot gnu.org
2022-12-12 15:08 ` vries at gcc dot gnu.org
2023-01-11  9:26 ` vries at gcc dot gnu.org

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=bug-29868-4717-W94tqPxccA@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@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).