public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "uweigand 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 13:51:01 +0000	[thread overview]
Message-ID: <bug-29868-4717-KTYXWnbR1S@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29868-4717@http.sourceware.org/bugzilla/>

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

Ulrich Weigand <uweigand at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |uweigand at gcc dot gnu.org

--- Comment #6 from Ulrich Weigand <uweigand at gcc dot gnu.org> ---
Thanks for the investigation!

The GDB code to "Do not report this watchpoint again" was added back in 2007 as
part of this patch series:
https://sourceware.org/pipermail/gdb-patches/2007-September/052502.html
https://sourceware.org/pipermail/gdb-patches/2007-September/052503.html
and back then, it probably worked as expected.

The kernel ptrace implementation was changed to prohibit modifying those bits
only in 2011 as part of some generic cleanup and tightening of access rules. 
At that point, we probably missed that it broke GDB.

I agree that the TRAP_HWBKPT check looks correct - several other platforms have
an equivalent check, so I think the patch is fine.  (Longer term, I'm wondering
if this check shouldn't move to Linux generic code then?)

However, I think we should then *also* remove the "Do not report this
watchpoint again" ptrace call - no sense in having this in if it doesn't work
anyway; it just wastes time and confuses anyone reading that code.

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

  parent reply	other threads:[~2022-12-12 13:51 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
2022-12-12 12:08 ` vries at gcc dot gnu.org
2022-12-12 13:51 ` uweigand at gcc dot gnu.org [this message]
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-KTYXWnbR1S@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).