public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Python/TUI Window Creation / Destruction Fixes
@ 2023-01-12 19:19 Andrew Burgess
  2023-01-12 19:19 ` [PATCH 1/3] gdb/python: allow Python TUI windows to be replaced Andrew Burgess
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Andrew Burgess @ 2023-01-12 19:19 UTC (permalink / raw)
  To: gdb-patches; +Cc: Andrew Burgess

Patch #1 started with an observation that the behaviour of
gdb.register_window_type doesn't appear to exactly match up with the
documentation.

While fixing this I observed that the destruction of Python window
factory callbacks (as used by gdb.register_window_type) is
inconsistent, and that GDB knowingly leaks some memory in this area
too.  Patches #2 and #3 fix this and make the destruction behaviour
consistent.

All feedback welcome.

Thanks,
Andrew

---

Andrew Burgess (3):
  gdb/python: allow Python TUI windows to be replaced
  gdb/python: deallocate tui window factories at Python shut down
  gdb/tui: don't leak the known_window_types map

 gdb/python/py-tui.c                           |  52 +++++++-
 gdb/python/python-internal.h                  |   1 +
 gdb/python/python.c                           |   1 +
 .../gdb.python/tui-window-factory.exp         | 112 ++++++++++++++++++
 .../gdb.python/tui-window-factory.py          |  48 ++++++++
 gdb/tui/tui-layout.c                          |  39 +++---
 6 files changed, 232 insertions(+), 21 deletions(-)
 create mode 100644 gdb/testsuite/gdb.python/tui-window-factory.exp
 create mode 100644 gdb/testsuite/gdb.python/tui-window-factory.py


base-commit: 1a26a53a0dee39106ba58fcb15496c5f13074652
-- 
2.25.4


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

end of thread, other threads:[~2023-02-13 14:52 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-12 19:19 [PATCH 0/3] Python/TUI Window Creation / Destruction Fixes Andrew Burgess
2023-01-12 19:19 ` [PATCH 1/3] gdb/python: allow Python TUI windows to be replaced Andrew Burgess
2023-01-12 19:19 ` [PATCH 2/3] gdb/python: deallocate tui window factories at Python shut down Andrew Burgess
2023-01-12 19:19 ` [PATCH 3/3] gdb/tui: don't leak the known_window_types map Andrew Burgess
2023-01-25 13:56 ` [PATCHv2 0/3] Python/TUI Window Creation / Destruction Fixes Andrew Burgess
2023-01-25 13:56   ` [PATCHv2 1/3] gdb/python: allow Python TUI windows to be replaced Andrew Burgess
2023-01-25 13:56   ` [PATCHv2 2/3] gdb/python: deallocate tui window factories at Python shut down Andrew Burgess
2023-01-25 13:56   ` [PATCHv2 3/3] gdb/tui: don't leak the known_window_types map Andrew Burgess
2023-01-27 16:34   ` [PATCHv3 0/3] Python/TUI Window Creation / Destruction Fixes Andrew Burgess
2023-01-27 16:34     ` [PATCHv3 1/3] gdb/python: allow Python TUI windows to be replaced Andrew Burgess
2023-01-27 16:34     ` [PATCHv3 2/3] gdb/python: deallocate tui window factories at Python shut down Andrew Burgess
2023-01-27 16:34     ` [PATCHv3 3/3] gdb/tui: don't leak the known_window_types map Andrew Burgess
2023-02-13 12:32     ` [PATCHv3 0/3] Python/TUI Window Creation / Destruction Fixes Andrew Burgess
2023-02-13 14:11       ` Tom Tromey
2023-02-13 14:52         ` 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).