public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 00/10] Further reduction of language_data struct
@ 2020-07-09 11:36 Andrew Burgess
  2020-07-09 11:36 ` [PATCH 01/10] gdb: Convert la_struct_too_deep_ellipsis to a method Andrew Burgess
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Andrew Burgess @ 2020-07-09 11:36 UTC (permalink / raw)
  To: gdb-patches


In previous commits GDB's languages were converted to C++ classes, and
all attributes were placed into the language_data struct.

We then removed all of the function pointers from language_data and
converted these into virtual methods within the language_defn class,
this left the language_data base class containing nothing but member
variables.

This commit starts the process of converting the member variables from
language_data into virtual methods in language_defn.

I'm less confident about this set of changes.  I'm never sure when
using virtual methods that return simple data values is the best
strategy, and when we should be passing parameters to the constructor,
in which case the current model of placing all the data into the
language_data class is probably not that bad.

So, I'm interested in feedback.  Is this an improvement or not?

All thoughts / feedback welcome.

Thanks,
Andrew



---

Andrew Burgess (10):
  gdb: Convert la_struct_too_deep_ellipsis to a method
  gdb: Convert la_name_of_this to a method
  gdb: Convert la_name and la_natural_name to methods
  gdb: Convert la_filename_extensions to a method
  gdb: Move la_language into the language_defn class
  gdb: Convert language_data::c_style_arrays to a method
  gdb: Fix an incorrect comment
  gdb: Convert language_data::string_lower_bound to a method
  gdb: Convert la_store_sym_names_in_linkage_form_p to a method
  gdb: Override store_sym_names_in_linkage_form_p for Go language

 gdb/ChangeLog         | 349 ++++++++++++++++++++++++++++++++++++++++++
 gdb/ada-lang.c        |  47 ++++--
 gdb/ax-gdb.c          |   2 +-
 gdb/c-exp.y           |   2 +-
 gdb/c-lang.c          | 137 +++++++++++------
 gdb/compile/compile.c |   2 +-
 gdb/cp-valprint.c     |   4 +-
 gdb/d-lang.c          |  37 +++--
 gdb/dwarf2/read.c     |   8 +-
 gdb/eval.c            |   2 +-
 gdb/expprint.c        |  10 +-
 gdb/f-lang.c          |  47 ++++--
 gdb/go-lang.c         |  23 +--
 gdb/infcall.c         |   2 +-
 gdb/language.c        |  89 ++++++-----
 gdb/language.h        | 141 +++++++++--------
 gdb/m2-lang.c         |  30 ++--
 gdb/mi/mi-cmd-var.c   |   2 +-
 gdb/objc-lang.c       |  37 +++--
 gdb/opencl-lang.c     |  19 +--
 gdb/p-lang.c          |  38 +++--
 gdb/rust-lang.c       |  32 ++--
 gdb/symfile.c         |   1 +
 gdb/symtab.c          |   8 +-
 gdb/valarith.c        |   6 +-
 gdb/valops.c          |  14 +-
 gdb/valprint.c        |   4 +-
 gdb/value.c           |   7 +-
 28 files changed, 797 insertions(+), 303 deletions(-)

-- 
2.25.4


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

end of thread, other threads:[~2020-07-09 11:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-09 11:36 [PATCH 00/10] Further reduction of language_data struct Andrew Burgess
2020-07-09 11:36 ` [PATCH 01/10] gdb: Convert la_struct_too_deep_ellipsis to a method Andrew Burgess
2020-07-09 11:36 ` [PATCH 02/10] gdb: Convert la_name_of_this " Andrew Burgess
2020-07-09 11:37 ` [PATCH 03/10] gdb: Convert la_name and la_natural_name to methods Andrew Burgess
2020-07-09 11:37 ` [PATCH 04/10] gdb: Convert la_filename_extensions to a method Andrew Burgess
2020-07-09 11:37 ` [PATCH 05/10] gdb: Move la_language into the language_defn class Andrew Burgess
2020-07-09 11:37 ` [PATCH 06/10] gdb: Convert language_data::c_style_arrays to a method Andrew Burgess
2020-07-09 11:37 ` [PATCH 07/10] gdb: Fix an incorrect comment Andrew Burgess
2020-07-09 11:37 ` [PATCH 08/10] gdb: Convert language_data::string_lower_bound to a method Andrew Burgess
2020-07-09 11:37 ` [PATCH 09/10] gdb: Convert la_store_sym_names_in_linkage_form_p " Andrew Burgess
2020-07-09 11:37 ` [PATCH 10/10] gdb: Override store_sym_names_in_linkage_form_p for Go language 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).