diff options
author | Andrew Burgess <aburgess@redhat.com> | 2023-02-06 13:04:16 +0000 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2023-02-12 05:46:44 +0000 |
commit | 0a9ccb9dd79384f3ba3f8cd75940e8868f3b526f (patch) | |
tree | 8cad3859bb521f71007902420dca89d2d89cf0be /gdb/i386-darwin-nat.c | |
parent | d088d944a038bf9ea23b8c938efbc8d125924cc6 (diff) | |
download | gdb-0a9ccb9dd79384f3ba3f8cd75940e8868f3b526f.zip gdb-0a9ccb9dd79384f3ba3f8cd75940e8868f3b526f.tar.gz gdb-0a9ccb9dd79384f3ba3f8cd75940e8868f3b526f.tar.bz2 |
gdb: only allow one of thread or task on breakpoints or watchpoints
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.
Approved-By: Pedro Alves <pedro@palves.net>
Diffstat (limited to 'gdb/i386-darwin-nat.c')
0 files changed, 0 insertions, 0 deletions