public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Andrew Burgess <andrew.burgess@embecosm.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 0/9] Starting to convert languages to separate classes
Date: Tue, 12 May 2020 21:33:25 -0400	[thread overview]
Message-ID: <efc64950-6010-c726-c77a-713fd0d8fe12@simark.ca> (raw)
In-Reply-To: <cover.1589235908.git.andrew.burgess@embecosm.com>

On 2020-05-11 6:35 p.m., Andrew Burgess wrote:
> This series starts the process of converting GDB's language structures
> into separate classes, one for each supported language.
> 
> In the first commit I actually perform the conversion, but do so in a
> way that basically doesn't change anything.  All the data is held in
> the base class, and accessed just as it was before.
> 
> In the following commits I begin converting function pointer fields
> within the language base class into real member functions.
> 
> I haven't converted all of the function pointers yet, I want to see
> what feedback this series gets before I invest any more time.
> 
> Further into the future I think it's possible that we could tweak the
> class hierarchy of languages, I do wonder if there will be some
> obvious inheritance around the c_language maybe, but I figure I'll
> convert all of the function pointers to methods first, then see what
> everyone implements.
> 
> My hope is that be performing this conversion it will be easier for
> people to add new methods into the language classes, to allow easier
> language specific specialisation, hopefully we should be able to
> remove some of the places where we check the language enum, and
> instead replace this with a method on the language class.
> 
> Further into the future, I wonder if some things like expression
> parsing, and maybe some of the value manipulation/printing code would
> be better off as methods within the language classes.
> 
> Anyway, I'd be interested to hear peoples thoughts on the series so,
> and of this as a piece of work in general, is this a good change or
> not.
> 
> Thanks,
> Andrew

Hi Andrew,

I looked through it, I think that's very nice.

Ultimately, I don't think we need to keep language_data, data fields can
be transformed into methods that return a simple value.  But I am fine with
what you have, it allows for the work to be incremental.

Simon

  parent reply	other threads:[~2020-05-13  1:33 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-11 22:35 Andrew Burgess
2020-05-11 22:35 ` [PATCH 1/9] gdb: Represent all languages as sub-classes of language_defn Andrew Burgess
2020-05-11 22:35 ` [PATCH 2/9] gdb: Convert language la_print_array_index field to a method Andrew Burgess
2020-05-11 22:35 ` [PATCH 3/9] gdb: Convert language la_read_var_value " Andrew Burgess
2020-05-14 19:43   ` Tom Tromey
2020-05-11 22:35 ` [PATCH 4/9] gdb: Convert language la_pass_by_reference " Andrew Burgess
2020-05-14 11:00   ` Aktemur, Tankut Baris
2020-05-14 19:49     ` Tom Tromey
2020-05-14 19:48   ` Tom Tromey
2020-05-11 22:35 ` [PATCH 5/9] gdb: Convert language la_language_arch_info " Andrew Burgess
2020-05-11 22:35 ` [PATCH 6/9] gdb: Convert language la_lookup_transparent_type " Andrew Burgess
2020-05-11 22:35 ` [PATCH 7/9] gdb: Convert language la_iterate_over_symbols " Andrew Burgess
2020-05-12 23:21   ` Christian Biesinger
2020-05-11 22:35 ` [PATCH 8/9] gdb: Convert language la_get_compile_instance " Andrew Burgess
2020-05-12 21:11   ` Christian Biesinger
2020-05-11 22:35 ` [PATCH 9/9] gdb: Convert language la_search_name_hash " Andrew Burgess
2020-05-12 21:10   ` Christian Biesinger
2020-05-12 23:17 ` [PATCH 0/9] Starting to convert languages to separate classes Christian Biesinger
2020-05-13  1:33 ` Simon Marchi [this message]
2020-05-14 19:57 ` Tom Tromey
2020-05-15 15:06 ` [PATCHv2 00/13] " Andrew Burgess
2020-05-15 15:06   ` [PATCHv2 01/13] gdb: Represent all languages as sub-classes of language_defn Andrew Burgess
2020-05-15 15:06   ` [PATCHv2 02/13] gdb: Convert language la_print_array_index field to a method Andrew Burgess
2020-05-15 15:06   ` [PATCHv2 03/13] gdb: Convert language la_read_var_value " Andrew Burgess
2020-05-15 15:06   ` [PATCHv2 04/13] gdb: Convert language la_pass_by_reference " Andrew Burgess
2020-05-15 15:06   ` [PATCHv2 05/13] gdb: Convert language la_language_arch_info " Andrew Burgess
2020-05-15 15:06   ` [PATCHv2 06/13] gdb: Convert language la_lookup_transparent_type " Andrew Burgess
2020-05-15 15:06   ` [PATCHv2 07/13] gdb: Convert language la_iterate_over_symbols " Andrew Burgess
2020-05-15 15:06   ` [PATCHv2 08/13] gdb: Convert language la_get_compile_instance " Andrew Burgess
2020-05-15 15:06   ` [PATCHv2 09/13] gdb: Convert language la_search_name_hash " Andrew Burgess
2020-05-15 17:47     ` Christian Biesinger
2020-05-15 15:06   ` [PATCHv2 10/13] gdb: Convert language la_sniff_from_mangled_name " Andrew Burgess
2020-05-15 15:06   ` [PATCHv2 11/13] gdb: Convert language la_print_type " Andrew Burgess
2020-05-15 15:06   ` [PATCHv2 12/13] gdb: Convert language la_demangle " Andrew Burgess
2020-05-15 15:06   ` [PATCHv2 13/13] gdb: Convert language skip_trampoline " Andrew Burgess
2020-05-15 17:06   ` [PATCHv2 00/13] Starting to convert languages to separate classes Tom Tromey
2020-06-01 16:02   ` Andrew Burgess

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=efc64950-6010-c726-c77a-713fd0d8fe12@simark.ca \
    --to=simark@simark.ca \
    --cc=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).