public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 00/20] Remove objfile_type
@ 2023-03-13 22:08 Tom Tromey
  2023-03-13 22:08 ` [PATCH 01/20] Introduce type_allocator Tom Tromey
                   ` (20 more replies)
  0 siblings, 21 replies; 25+ messages in thread
From: Tom Tromey @ 2023-03-13 22:08 UTC (permalink / raw)
  To: gdb-patches

The "split objfile" to-do list has an item for moving objfile_type to
the per-BFD object.  However, I noticed recently that the contents of
objfile_type depend solely on the gdbarch.  So, there's no reason to
even have this on the objfile at all.  In fact, I reasoned, we could
go further and remove it in favor of the per-gdbarch builtin_type.

However, this doesn't work due to the way type allocation is done.  I
have never much liked this part of gdb, so this series first attempts
to clean it up, by introducing a type allocator.  This allows for the
removal of some code.  During this process, the symbol readers are
changed to prefer allocation of their types on the per-objfile
obstack, which I think is more correct anyway.

Finally, by the end of the series, objfile_type can be removed.

Regression tested on x86-64 Fedora 36.

Tom

---
Tom Tromey (20):
      Introduce type_allocator
      Remove alloc_type_arch
      Remove alloc_type_copy
      Remove alloc_type
      Reuse existing builtin types
      Remove arch_type
      Remove init_type
      Unify arch_integer_type and init_integer_type
      Unify arch_character_type and init_character_type
      Unify arch_boolean_type and init_boolean_type
      Unify arch_float_type and init_float_type
      Unify arch_decfloat_type and init_decfloat_type
      Unify arch_pointer_type and init_pointer_type
      Use type allocator for range types
      Use type allocator for array types
      Use type allocator for set types
      Use builtin type when appropriate
      Rename objfile_type to builtin_type
      Add some types to struct builtin_type
      Remove objfile_type

 gdb/ada-lang.c                      |  92 ++---
 gdb/amdgpu-tdep.c                   |   5 +-
 gdb/arm-tdep.c                      |   9 +-
 gdb/avr-tdep.c                      |   6 +-
 gdb/coffread.c                      |  42 +--
 gdb/compile/compile-c-symbols.c     |  10 +-
 gdb/compile/compile-c-types.c       |  11 +-
 gdb/compile/compile-cplus-symbols.c |  10 +-
 gdb/compile/compile-cplus-types.c   |   5 +-
 gdb/csky-tdep.c                     |   5 +-
 gdb/ctfread.c                       |  47 +--
 gdb/d-lang.c                        |  44 +--
 gdb/dwarf2/cu.c                     |   2 +-
 gdb/dwarf2/expr.c                   |   9 +-
 gdb/dwarf2/read.c                   | 111 +++---
 gdb/f-exp.y                         |  13 +-
 gdb/f-lang.c                        |  55 +--
 gdb/fbsd-tdep.c                     |  20 +-
 gdb/ft32-tdep.c                     |   5 +-
 gdb/gdbtypes.c                      | 704 +++++++++++-------------------------
 gdb/gdbtypes.h                      | 266 ++++++++++----
 gdb/gnu-v3-abi.c                    |   9 +-
 gdb/go-lang.c                       |  34 +-
 gdb/ia64-tdep.c                     |   9 +-
 gdb/jit.c                           |   5 +-
 gdb/linux-tdep.c                    |  29 +-
 gdb/m2-lang.c                       |  12 +-
 gdb/m32c-tdep.c                     |  24 +-
 gdb/m68k-tdep.c                     |   9 +-
 gdb/mdebugread.c                    |  95 ++---
 gdb/nds32-tdep.c                    |   7 +-
 gdb/netbsd-tdep.c                   |  22 +-
 gdb/objfiles.c                      |   4 +-
 gdb/opencl-lang.c                   |  43 +--
 gdb/parse.c                         |  12 +-
 gdb/rl78-tdep.c                     |  20 +-
 gdb/rs6000-tdep.c                   |   3 +-
 gdb/rust-lang.c                     |  33 +-
 gdb/sh-tdep.c                       |   9 +-
 gdb/stabsread.c                     | 155 ++++----
 gdb/target-descriptions.c           |  18 +-
 gdb/valops.c                        |  10 +-
 gdb/windows-tdep.c                  |  55 +--
 gdb/xcoffread.c                     |   4 +-
 gdb/xtensa-tdep.c                   |   3 +-
 gdb/z80-tdep.c                      |   7 +-
 46 files changed, 1014 insertions(+), 1088 deletions(-)
---
base-commit: 7fee66abd3fd69a0c4dc6c8dcd9aa49eede3864e
change-id: 20230313-split-objfile-type-allocator-2-07980fa05a7e

Best regards,
-- 
Tom Tromey <tom@tromey.com>


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

end of thread, other threads:[~2023-03-18 15:57 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-13 22:08 [PATCH 00/20] Remove objfile_type Tom Tromey
2023-03-13 22:08 ` [PATCH 01/20] Introduce type_allocator Tom Tromey
2023-03-13 22:08 ` [PATCH 02/20] Remove alloc_type_arch Tom Tromey
2023-03-13 22:08 ` [PATCH 03/20] Remove alloc_type_copy Tom Tromey
2023-03-13 22:08 ` [PATCH 04/20] Remove alloc_type Tom Tromey
2023-03-13 22:08 ` [PATCH 05/20] Reuse existing builtin types Tom Tromey
2023-03-13 22:08 ` [PATCH 06/20] Remove arch_type Tom Tromey
2023-03-13 22:08 ` [PATCH 07/20] Remove init_type Tom Tromey
2023-03-13 22:08 ` [PATCH 08/20] Unify arch_integer_type and init_integer_type Tom Tromey
2023-03-13 22:08 ` [PATCH 09/20] Unify arch_character_type and init_character_type Tom Tromey
2023-03-13 22:08 ` [PATCH 10/20] Unify arch_boolean_type and init_boolean_type Tom Tromey
2023-03-13 22:08 ` [PATCH 11/20] Unify arch_float_type and init_float_type Tom Tromey
2023-03-13 22:08 ` [PATCH 12/20] Unify arch_decfloat_type and init_decfloat_type Tom Tromey
2023-03-13 22:08 ` [PATCH 13/20] Unify arch_pointer_type and init_pointer_type Tom Tromey
2023-03-13 22:08 ` [PATCH 14/20] Use type allocator for range types Tom Tromey
2023-03-14 14:41   ` Simon Marchi
2023-03-18 15:56     ` Tom Tromey
2023-03-13 22:08 ` [PATCH 15/20] Use type allocator for array types Tom Tromey
2023-03-13 22:08 ` [PATCH 16/20] Use type allocator for set types Tom Tromey
2023-03-13 22:08 ` [PATCH 17/20] Use builtin type when appropriate Tom Tromey
2023-03-13 22:08 ` [PATCH 18/20] Rename objfile_type to builtin_type Tom Tromey
2023-03-13 22:08 ` [PATCH 19/20] Add some types to struct builtin_type Tom Tromey
2023-03-13 22:08 ` [PATCH 20/20] Remove objfile_type Tom Tromey
2023-03-14 14:48 ` [PATCH 00/20] " Simon Marchi
2023-03-18 15:57   ` Tom Tromey

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