public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/8] Fix missing MI =breakpoint-deleted notifications
@ 2023-02-20 14:13 Andrew Burgess
  2023-02-20 14:13 ` [PATCH 1/8] gdb: remove an out of date comment about disp_del_at_next_stop Andrew Burgess
                   ` (8 more replies)
  0 siblings, 9 replies; 19+ messages in thread
From: Andrew Burgess @ 2023-02-20 14:13 UTC (permalink / raw)
  To: gdb-patches; +Cc: Andrew Burgess

This series all sprang from a single sentence in this patch review:

  https://sourceware.org/pipermail/gdb-patches/2023-February/196560.html

In this patch (adding inferior specific breakpoints), at one point, I
changed a breakpoints number to zero.  Pedro asks the very good question: 

 Doesn't this mess up MI breakpoint deleted notifications?

Clearly what I wrote was wrong.  But, confession: I copied the code in
question from the code to handle thread-specific breakpoints.  And if
Pedro's point was true for my inferior-speicifc b/p, then it must be
true for thread-specific b/p too, which means we have a bug.

Patch #1 is a trivial drive by clean up.

Patch #2 is an interesting issue I ran into relating to the MI output
while writing tests for this issue.  This patch is worth a review
because I'm proposing a slight change to the MI output.

Patches #3 to #7 are just testsuite cleanup.  There's no GDB changes
in here.  This is all about making it easier for me to write the tests
in the last patch.  You can probably skip these if you're short on
review time.

Patch #8 is the important one.  This adjusts how we handle
thread-specific breakpoints to avoid the issue Pedro pointed out
above.  This fix was mostly trivial, except for a nasty knock-on
problem in the Python FinishBreakpoints code.

---

Andrew Burgess (8):
  gdb: remove an out of date comment about disp_del_at_next_stop
  gdb: don't duplicate 'thread' field in MI breakpoint output
  gdb/testsuite: make more use of mi-support.exp
  gdb/testsuite: extend the use of mi_clean_restart
  gdb/testsuite introduce foreach_mi_ui_mode helper proc
  gdb/testsuite: introduce is_target_non_stop helper proc
  gdb/testsuite: fix failure in gdb.mi/mi-pending.exp with
    extended-remote
  gdb: fix mi breakpoint-deleted notifications for thread-specific b/p

 gdb/NEWS                                      |   8 +
 gdb/breakpoint.c                              |  10 +-
 gdb/python/py-breakpoint.c                    |   3 +
 gdb/python/py-finishbreakpoint.c              |  33 ++-
 gdb/python/python-internal.h                  |   1 +
 gdb/testsuite/gdb.base/access-mem-running.exp |  10 +-
 gdb/testsuite/gdb.base/fork-running-state.exp |  11 +-
 gdb/testsuite/gdb.mi/mi-break.exp             |  17 +-
 gdb/testsuite/gdb.mi/mi-exec-run.exp          |   1 -
 gdb/testsuite/gdb.mi/mi-multi-commands.exp    |   3 +-
 gdb/testsuite/gdb.mi/mi-nsmoribund.exp        |   7 +-
 gdb/testsuite/gdb.mi/mi-pending.exp           |  40 ++-
 gdb/testsuite/gdb.mi/mi-thread-bp-deleted.c   |  88 ++++++
 gdb/testsuite/gdb.mi/mi-thread-bp-deleted.exp | 268 ++++++++++++++++++
 gdb/testsuite/gdb.mi/mi-thread-specific-bp.c  |  44 +++
 .../gdb.mi/mi-thread-specific-bp.exp          |  49 ++++
 gdb/testsuite/gdb.mi/mi-watch.exp             |  17 +-
 gdb/testsuite/gdb.mi/new-ui-mi-sync.exp       |   8 +-
 .../gdb.mi/user-selected-context-sync.exp     |   8 +-
 .../access-mem-running-thread-exit.exp        |  10 +-
 .../gdb.threads/clone-attach-detach.exp       |  11 +-
 .../gdb.threads/detach-step-over.exp          |   8 +-
 gdb/testsuite/gdb.threads/thread-bp-deleted.c |  88 ++++++
 .../gdb.threads/thread-bp-deleted.exp         | 206 ++++++++++++++
 gdb/testsuite/lib/gdb.exp                     |  19 ++
 gdb/testsuite/lib/mi-support.exp              |  89 +++++-
 gdb/thread.c                                  |   2 +
 27 files changed, 935 insertions(+), 124 deletions(-)
 create mode 100644 gdb/testsuite/gdb.mi/mi-thread-bp-deleted.c
 create mode 100644 gdb/testsuite/gdb.mi/mi-thread-bp-deleted.exp
 create mode 100644 gdb/testsuite/gdb.mi/mi-thread-specific-bp.c
 create mode 100644 gdb/testsuite/gdb.mi/mi-thread-specific-bp.exp
 create mode 100644 gdb/testsuite/gdb.threads/thread-bp-deleted.c
 create mode 100644 gdb/testsuite/gdb.threads/thread-bp-deleted.exp


base-commit: c9802aca6d152c4a47252f69ad81556dbc24e312
-- 
2.25.4


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2023-02-28 11:10 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-20 14:13 [PATCH 0/8] Fix missing MI =breakpoint-deleted notifications Andrew Burgess
2023-02-20 14:13 ` [PATCH 1/8] gdb: remove an out of date comment about disp_del_at_next_stop Andrew Burgess
2023-02-20 14:13 ` [PATCH 2/8] gdb: don't duplicate 'thread' field in MI breakpoint output Andrew Burgess
2023-02-20 14:47   ` Eli Zaretskii
2023-02-22 15:18   ` Pedro Alves
2023-02-20 14:13 ` [PATCH 3/8] gdb/testsuite: make more use of mi-support.exp Andrew Burgess
2023-02-20 14:13 ` [PATCH 4/8] gdb/testsuite: extend the use of mi_clean_restart Andrew Burgess
2023-02-20 14:13 ` [PATCH 5/8] gdb/testsuite introduce foreach_mi_ui_mode helper proc Andrew Burgess
2023-02-22 15:18   ` Pedro Alves
2023-02-20 14:13 ` [PATCH 6/8] gdb/testsuite: introduce is_target_non_stop " Andrew Burgess
2023-02-22 15:19   ` Pedro Alves
2023-02-27 14:58     ` Andrew Burgess
2023-02-27 16:18       ` Pedro Alves
2023-02-20 14:13 ` [PATCH 7/8] gdb/testsuite: fix failure in gdb.mi/mi-pending.exp with extended-remote Andrew Burgess
2023-02-22 15:19   ` Pedro Alves
2023-02-20 14:13 ` [PATCH 8/8] gdb: fix mi breakpoint-deleted notifications for thread-specific b/p Andrew Burgess
2023-02-22 15:20   ` Pedro Alves
2023-02-22 15:23 ` [PATCH 0/8] Fix missing MI =breakpoint-deleted notifications Pedro Alves
2023-02-28 11:09   ` Andrew Burgess

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).