[PATCH 0/5] Eliminate cleanups & make ui_file a C++ class hierarchy

Pedro Alves
2017-01-17T01:39:21Z

This series started from the desire to eliminate
make_cleanup_ui_file_delete, but goes beyond that, cleaning up and
simplifying up ui_file implementations and their client-side handling
substantially, IMO.

Mainly, it makes ui_file & friends a real C++ class hierarchy, and
switches temporary ui_file-like objects to stack-based allocation.

As for cleanups count, 'git grep make_cleanup | wc -l' before / after
shows:

before: 1803
after: 1740
------------
delta: -63

Also pushed on the users/palves/ui_file branch.

Pedro Alves (5):
gdb: make_scoped_restore and types convertible to T
gdb/varobj.c: Fix leak
gdb/stack.c: Remove unused mem_fileopen
gdb/mi/mi-interp.c: Fix typos
Eliminate make_cleanup_ui_file_delete / make ui_file a class hierarchy

gdb/ada-lang.c | 12 +-
gdb/ada-valprint.c | 9 +-
gdb/ada-varobj.c | 23 +-
gdb/aix-thread.c | 17 +-
gdb/arm-tdep.c | 14 +-
gdb/breakpoint.c | 97 +++--
gdb/c-exp.y | 8 +-
gdb/cli/cli-logging.c | 31 +-
gdb/cli/cli-setshow.c | 36 +-
gdb/common/scoped_restore.h | 11 +-
gdb/compile/compile-c-support.c | 62 ++--
gdb/compile/compile-c-symbols.c | 21 +-
gdb/compile/compile-internal.h | 2 +-
gdb/compile/compile-loc2c.c | 107 +++---
gdb/compile/compile.c | 9 +-
gdb/compile/compile.h | 4 +-
gdb/cp-support.c | 38 +-
gdb/disasm.c | 46 +--
gdb/disasm.h | 2 +-
gdb/dummy-frame.c | 9 +-
gdb/dwarf2loc.c | 6 +-
gdb/dwarf2loc.h | 2 +-
gdb/dwarf2read.c | 48 +--
gdb/event-top.c | 4 +-
gdb/gdbarch.c | 32 +-
gdb/gdbarch.sh | 20 +-
gdb/gdbtypes.c | 3 +-
gdb/guile/scm-breakpoint.c | 12 +-
gdb/guile/scm-disasm.c | 16 +-
gdb/guile/scm-frame.c | 9 +-
gdb/guile/scm-ports.c | 96 ++---
gdb/guile/scm-type.c | 14 +-
gdb/guile/scm-value.c | 29 +-
gdb/i386-tdep.c | 7 +-
gdb/infcmd.c | 12 +-
gdb/infrun.c | 36 +-
gdb/language.c | 38 +-
gdb/location.c | 43 +--
gdb/main.c | 2 +-
gdb/maint.c | 9 +-
gdb/mi/mi-cmd-stack.c | 17 +-
gdb/mi/mi-common.h | 12 +-
gdb/mi/mi-console.c | 136 ++-----
gdb/mi/mi-console.h | 44 ++-
gdb/mi/mi-interp.c | 26 +-
gdb/mi/mi-main.c | 61 ++--
gdb/mi/mi-out.c | 8 +-
gdb/mi/mi-out.h | 2 +-
gdb/printcmd.c | 11 +-
gdb/psymtab.c | 19 +-
gdb/python/py-arch.c | 30 +-
gdb/python/py-breakpoint.c | 13 +-
gdb/python/py-frame.c | 9 +-
gdb/python/py-framefilter.c | 32 +-
gdb/python/py-type.c | 19 +-
gdb/python/py-unwind.c | 24 +-
gdb/python/py-value.c | 16 +-
gdb/record-btrace.c | 8 +-
gdb/regcache.c | 9 +-
gdb/reggroups.c | 9 +-
gdb/remote.c | 12 +-
gdb/rust-lang.c | 9 +-
gdb/serial.c | 9 +-
gdb/stack.c | 35 +-
gdb/symmisc.c | 14 +-
gdb/symtab.h | 2 +-
gdb/top.c | 51 +--
gdb/tracepoint.c | 7 +-
gdb/tui/tui-disasm.c | 18 +-
gdb/tui/tui-file.c | 230 +-----------
gdb/tui/tui-file.h | 18 +-
gdb/tui/tui-io.c | 4 +-
gdb/tui/tui-regs.c | 21 +-
gdb/tui/tui-stack.c | 33 +-
gdb/typeprint.c | 17 +-
gdb/ui-file.c | 785 +++++++---------------------------------
gdb/ui-file.h | 319 +++++++++++-----
gdb/ui-out.c | 10 +-
gdb/ui-out.h | 2 +-
gdb/utils.c | 18 +-
gdb/utils.h | 2 +-
gdb/varobj.c | 29 +-
gdb/xtensa-tdep.c | 31 +-
83 files changed, 1087 insertions(+), 2090 deletions(-)

--
2.5.5