public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@redhat.com>
To: gdb-patches@sourceware.org
Cc: Andrew Burgess <aburgess@redhat.com>
Subject: [PATCHv3 0/7] gdb: fix target_ops reference count for some cases
Date: Fri, 18 Nov 2022 16:42:51 +0000	[thread overview]
Message-ID: <cover.1668789658.git.aburgess@redhat.com> (raw)
In-Reply-To: <cover.1664729721.git.aburgess@redhat.com>

Changes in v3:

  - Rebase onto current upstream/master, resolve merge conflicts.
  - Updated the test in patch 7 to fix a failure when using the
    native-extended-gdbserver board.

Changes in v2:

  A complete rewrite (and expansion) of this patch after Simon's
  feedback.
  
  The original idea (from v1) is really covered by patches #3 and #5.
  There's still (maybe) an open question about the use of
  scoped_restore_pspace_and_thread vs scoped_restore_thread, but I hope
  I've addressed this question in the v1 thread.  Do let me know if
  there's still any questions on this though.
  
  Patches #1 and #2 are target_ops ref-count related cleanups that I
  spotted while working on this updated series.
  
  Patch #4 is also a cleanup, moving some global functions to become
  member functions on the inferior class.
  
  Patch #6 is a completely random addition to add some extra maintenance
  output, I ended up using this while debugging patch #7, but this
  change isn't actually required at all.
  
  Patch #7 does relate to target_ops, and target_ops sharing, which is
  kind-of related to reference counting... maybe?  I can easily drop
  this patch from the series if it turns out the idea in here is not
  taking GDB in the right direction.

Thanks,
Andrew

---

Andrew Burgess (7):
  gdb/remote: remove some manual reference count handling
  gdb: remove decref_target
  gdb: have target_stack automate reference count handling
  gdb: remove the pop_all_targets (and friends) global functions
  gdb: ensure all targets are popped before an inferior is destructed
  gdb/maint: add core file name to 'maint info program-spaces' output
  gdb: some process_stratum_target should not be shared

 gdb/NEWS                                      |  11 ++
 gdb/corelow.c                                 |   5 +
 gdb/doc/gdb.texinfo                           |  45 ++++-
 gdb/event-top.c                               |   3 +-
 gdb/inferior.c                                |  70 +++++++
 gdb/inferior.h                                |  26 ++-
 gdb/progspace.c                               |  18 +-
 gdb/remote.c                                  |  40 ++--
 gdb/scoped-mock-context.h                     |   2 +-
 gdb/target.c                                  |  99 ++++------
 gdb/target.h                                  |  33 ++--
 gdb/testsuite/gdb.multi/multi-core-files-1.c  |  37 ++++
 gdb/testsuite/gdb.multi/multi-core-files-2.c  |  31 ++++
 gdb/testsuite/gdb.multi/multi-core-files.exp  | 172 ++++++++++++++++++
 .../gdb.python/py-connection-removed.exp      |  92 ++++++++++
 gdb/top.c                                     |   3 +-
 16 files changed, 578 insertions(+), 109 deletions(-)
 create mode 100644 gdb/testsuite/gdb.multi/multi-core-files-1.c
 create mode 100644 gdb/testsuite/gdb.multi/multi-core-files-2.c
 create mode 100644 gdb/testsuite/gdb.multi/multi-core-files.exp
 create mode 100644 gdb/testsuite/gdb.python/py-connection-removed.exp


base-commit: f9f88aede3bb84efd088a59a5f6bccb3a6bb6516
-- 
2.25.4


  parent reply	other threads:[~2022-11-18 16:43 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-21 13:12 [PATCH] " Andrew Burgess
2022-09-21 15:30 ` Simon Marchi
2022-09-22 14:21   ` Andrew Burgess
2022-09-22 14:52     ` Simon Marchi
2022-09-22 15:00 ` Simon Marchi
2022-09-22 17:24   ` Andrew Burgess
2022-09-26 14:16     ` Simon Marchi
2022-10-01 20:58       ` Andrew Burgess
2022-10-02 17:04 ` [PATCHv2 0/7] " Andrew Burgess
2022-10-02 17:04   ` [PATCHv2 1/7] gdb/remote: remove some manual reference count handling Andrew Burgess
2022-10-02 17:04   ` [PATCHv2 2/7] gdb: remove decref_target Andrew Burgess
2022-10-02 17:04   ` [PATCHv2 3/7] gdb: have target_stack automate reference count handling Andrew Burgess
2022-10-02 17:04   ` [PATCHv2 4/7] gdb: remove the pop_all_targets (and friends) global functions Andrew Burgess
2022-10-05 20:49     ` Lancelot SIX
2022-10-06 11:14       ` Andrew Burgess
2022-10-02 17:04   ` [PATCHv2 5/7] gdb: ensure all targets are popped before an inferior is destructed Andrew Burgess
2022-10-02 17:04   ` [PATCHv2 6/7] gdb/maint: add core file name to 'maint info program-spaces' output Andrew Burgess
2022-10-02 17:21     ` Eli Zaretskii
2022-10-02 17:04   ` [PATCHv2 7/7] gdb: some process_stratum_target should not be shared Andrew Burgess
2022-10-02 17:21     ` Eli Zaretskii
2022-10-05 21:15     ` Lancelot SIX
2022-10-06 11:44       ` Andrew Burgess
2022-11-18 16:42   ` Andrew Burgess [this message]
2022-11-18 16:42     ` [PATCHv3 1/7] gdb/remote: remove some manual reference count handling Andrew Burgess
2022-11-18 16:42     ` [PATCHv3 2/7] gdb: remove decref_target Andrew Burgess
2022-11-18 17:22       ` Tom Tromey
2022-11-18 16:42     ` [PATCHv3 3/7] gdb: have target_stack automate reference count handling Andrew Burgess
2022-11-18 17:25       ` Tom Tromey
2022-11-18 16:42     ` [PATCHv3 4/7] gdb: remove the pop_all_targets (and friends) global functions Andrew Burgess
2022-11-18 17:29       ` Tom Tromey
2022-11-18 16:42     ` [PATCHv3 5/7] gdb: ensure all targets are popped before an inferior is destructed Andrew Burgess
2022-11-18 16:42     ` [PATCHv3 6/7] gdb/maint: add core file name to 'maint info program-spaces' output Andrew Burgess
2022-11-18 17:03       ` Eli Zaretskii
2022-11-18 16:42     ` [PATCHv3 7/7] gdb: some process_stratum_target should not be shared Andrew Burgess
2022-11-18 17:02       ` Eli Zaretskii
2022-11-18 18:04       ` Tom Tromey
2022-12-14 13:57         ` 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=cover.1668789658.git.aburgess@redhat.com \
    --to=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).