public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Burgess <andrew.burgess@embecosm.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 0/9] Further Conversion of Language Class Hierarchy
Date: Tue,  2 Jun 2020 14:32:18 +0100	[thread overview]
Message-ID: <cover.1591104078.git.andrew.burgess@embecosm.com> (raw)

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


             reply	other threads:[~2020-06-02 13:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-02 13:32 Andrew Burgess [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1591104078.git.andrew.burgess@embecosm.com \
    --to=andrew.burgess@embecosm.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).