public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/9] Further Conversion of Language Class Hierarchy
@ 2020-06-02 13:32 Andrew Burgess
  2020-06-02 13:32 ` [PATCH 1/9] gdb: Convert language la_class_name_from_physname field to a method Andrew Burgess
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: Andrew Burgess @ 2020-06-02 13:32 UTC (permalink / raw)
  To: gdb-patches

Continuing with the process of converting function pointers to member
functions within the class hierarchy of languages.

One interesting pattern that crops up a number of times, but which I
have not addressed in this series is for example in patch #8, in
f-lang.c, where I add this method:

     void value_print_inner
    	(struct value *val, struct ui_file *stream, int recurse,
         const struct value_print_options *options) const override
     {
       return f_value_print_inner (val, stream, recurse, options);
     }

The reason that the member function is just a wrapper around
f_value_print_inner, is that the f_language class is declared and
defined in f-lang.c, while f_value_print_inner is in f-valprint.c.  My
current thinking is that once all of the field conversion is done, I
will probably move some of the language classes out of their *-lang.c
files into a header file, at this point, in cases like the above,
f_value_print_inner would become f_language::value_print_inner, but
could still live in f-valprint.c.

I haven't done any of this code shuffling yet in order to keep these
patches more focused.

Everything else is pretty standard, except maybe patch #3, which is
slightly different, the commit message has more detail.

There will be more patches after this series, as a minimum to convert
the function pointers into methods.

All feedback welcome.

Thanks,
Andrew


---

Andrew Burgess (9):
  gdb: Convert language la_class_name_from_physname field to a method
  gdb: Convert language la_compute_program field to a method
  gdb: Convert language la_get_symbol_name_matcher field to a method
  gdb: Convert language la_word_break_characters field to a method
  gdb: Convert language la_collect_symbol_completion_matches field to a
    method
  gdb: Convert language la_watch_location_expression field to a method
  gdb: Convert language la_value_print field to a method
  gdb: Convert language la_value_print_inner field to a method
  gdb: Convert language la_lookup_symbol_nonlocal field to a method

 gdb/ChangeLog                   | 365 ++++++++++++++++++++++++++++
 gdb/ada-lang.c                  | 408 +++++++++++++++++---------------
 gdb/breakpoint.c                |   2 +-
 gdb/c-lang.c                    |  97 ++++----
 gdb/c-lang.h                    |   7 +-
 gdb/compile/compile-c-support.c |   4 +-
 gdb/compile/compile.c           |   4 +-
 gdb/completer.c                 |  12 +-
 gdb/cp-namespace.c              |   2 +-
 gdb/cp-support.h                |   3 +-
 gdb/d-lang.c                    |  28 ++-
 gdb/dictionary.c                |   6 +-
 gdb/dwarf2/read.c               |   9 +-
 gdb/f-lang.c                    | 118 +++++----
 gdb/f-lang.h                    |   2 +-
 gdb/f-valprint.c                |   2 +-
 gdb/go-lang.c                   |  19 +-
 gdb/language.c                  | 167 +++++++------
 gdb/language.h                  | 198 ++++++++--------
 gdb/linespec.c                  |   2 +-
 gdb/m2-lang.c                   |  19 +-
 gdb/minsyms.c                   |   6 +-
 gdb/objc-lang.c                 |  10 -
 gdb/opencl-lang.c               |  10 -
 gdb/p-lang.c                    |  26 +-
 gdb/psymtab.c                   |   2 +-
 gdb/rust-lang.c                 | 131 +++++-----
 gdb/symtab.c                    |  44 ++--
 gdb/symtab.h                    |  17 --
 gdb/valprint.c                  |   2 +-
 30 files changed, 1048 insertions(+), 674 deletions(-)

-- 
2.25.4


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

end of thread, other threads:[~2020-06-15 14:22 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-02 13:32 [PATCH 0/9] Further Conversion of Language Class Hierarchy Andrew Burgess
2020-06-02 13:32 ` [PATCH 1/9] gdb: Convert language la_class_name_from_physname field to a method Andrew Burgess
2020-06-02 13:32 ` [PATCH 2/9] gdb: Convert language la_compute_program " Andrew Burgess
2020-06-02 13:32 ` [PATCH 3/9] gdb: Convert language la_get_symbol_name_matcher " Andrew Burgess
2020-06-15 14:22   ` Tom Tromey
2020-06-02 13:32 ` [PATCH 4/9] gdb: Convert language la_word_break_characters " Andrew Burgess
2020-06-02 13:32 ` [PATCH 5/9] gdb: Convert language la_collect_symbol_completion_matches " Andrew Burgess
2020-06-02 13:32 ` [PATCH 6/9] gdb: Convert language la_watch_location_expression " Andrew Burgess
2020-06-02 13:32 ` [PATCH 7/9] gdb: Convert language la_value_print " Andrew Burgess
2020-06-02 13:32 ` [PATCH 8/9] gdb: Convert language la_value_print_inner " Andrew Burgess
2020-06-02 13:32 ` [PATCH 9/9] gdb: Convert language la_lookup_symbol_nonlocal " Andrew Burgess
2020-06-10  2:54 ` [PATCH 0/9] Further Conversion of Language Class Hierarchy Simon Marchi

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