public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Andrew Burgess <aburgess@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] gdb: only allow one of thread or task on breakpoints or watchpoints
Date: Wed, 08 Feb 2023 17:52:13 +0200	[thread overview]
Message-ID: <83fsbgnoia.fsf@gnu.org> (raw)
In-Reply-To: <aa72f1a455d432fd1d2b8d58d3a532227f81fb69.1675869267.git.aburgess@redhat.com> (message from Andrew Burgess via Gdb-patches on Wed, 8 Feb 2023 15:16:16 +0000)

> Cc: Andrew Burgess <aburgess@redhat.com>
> Date: Wed,  8 Feb 2023 15:16:16 +0000
> From: Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org>
> 
> After this mailing list posting:
> 
>   https://sourceware.org/pipermail/gdb-patches/2023-February/196607.html
> 
> it seems to me that in practice an Ada task maps 1:1 with a GDB
> thread, and so it doesn't really make sense to allow uses to give both
> a thread and a task within a single breakpoint or watchpoint
> condition.
> 
> This commit updates GDB so that the user will get an error if both
> are specified.
> 
> I've added new tests to cover the CLI as well as the Python and Guile
> APIs.  For the Python and Guile testing, as far as I can tell, this
> was the first testing for this corner of the APIs, so I ended up
> adding more than just a single test.
> 
> For documentation I've added a NEWS entry, but I've not added anything
> to the docs themselves.  Currently we document the commands with a
> thread-id or task-id as distinct command, e.g.:
> 
>   'break LOCSPEC task TASKNO'
>   'break LOCSPEC task TASKNO if ...'
>   'break LOCSPEC thread THREAD-ID'
>   'break LOCSPEC thread THREAD-ID if ...'
> 
> As such, I don't believe there is any indication that combining 'task'
> and 'thread' would be expected to work; it seems clear to me in the
> above that those four options are all distinct commands.
> 
> I think the NEWS entry is enough that if someone is combining these
> keywords (it's not clear what the expected behaviour would be in this
> case) then they can figure out that this was a deliberate change in
> GDB, but for a new user, the manual doesn't suggest combining them is
> OK, and any future attempt to combine them will give an error.
> ---
>  gdb/NEWS                        |  6 +++
>  gdb/breakpoint.c                | 36 ++++++++++++--
>  gdb/breakpoint.h                | 10 ++++
>  gdb/guile/scm-breakpoint.c      | 10 ++++
>  gdb/python/py-breakpoint.c      | 14 ++++++
>  gdb/testsuite/gdb.ada/tasks.exp | 85 +++++++++++++++++++++++++++++++--
>  6 files changed, 153 insertions(+), 8 deletions(-)

OK for the NEWS part, thanks.

  reply	other threads:[~2023-02-08 15:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-08 15:16 [PATCH 0/2] Prevent combining 'task' and 'thread' keywords Andrew Burgess
2023-02-08 15:16 ` [PATCH 1/2] gdb: only allow one of thread or task on breakpoints or watchpoints Andrew Burgess
2023-02-08 15:52   ` Eli Zaretskii [this message]
2023-02-08 18:10   ` Pedro Alves
2023-02-12  5:50     ` Andrew Burgess
2023-02-12 22:58       ` Tom Tromey
2023-02-13 11:26         ` Andrew Burgess
2023-02-08 15:16 ` [PATCH 2/2] gdb: use -1 for breakpoint::task default value Andrew Burgess
2023-02-08 18:10   ` Pedro Alves
2023-02-12  7:23     ` Andrew Burgess

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=83fsbgnoia.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=aburgess@redhat.com \
    --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).