From: Gaius Mulley <gaius.mulley@southwales.ac.uk>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/9] gdb: move Modula2 language class into a header file
Date: Tue, 13 Oct 2020 10:58:27 +0100 [thread overview]
Message-ID: <87mu0qsb0c.fsf@j228-gm.comp.glam.ac.uk> (raw)
In-Reply-To: <79aea68438978fe8c9cf5975ac4179e9aa50f907.1602508908.git.andrew.burgess@embecosm.com> (Andrew Burgess's message of "Mon, 12 Oct 2020 15:46:30 +0100")
Andrew Burgess <andrew.burgess@embecosm.com> writes:
> Move the m2_language class from m2-lang.c into m2-lang.h. The benefit
> of this move is that we can remove trampoline functions. Currently
> the language implementation is split of different m2-* files with
> m2-lang.h including declaration for all the language implementation
> functions.
>
> Currently the m2_language class in m2-lang.c has member functions that
> then call the global functions declared in m2-lang.h.
>
> After this change the m2_language class is declared in m2-lang.h, and
> the member functions are the implementations defined in all the m2-*
> files.
>
> There should be no user visible changes after this commit.
>
> gdb/ChangeLog:
>
> * m2-exp.y (m2_parse): Rename to...
> (m2_language::parser): ...this. Update function signature.
> * m2-lang.c (m2_printchar): Renamed to m2_language::printchar.
> (m2_op_print): Rename to...
> (m2_language::op_print_tab): ...this, and make const.
> (exp_descriptor_modula2): Rename to...
> (m2_language::exp_descriptor_modula2): ...this.
> (class m2_language): Move to m2-lang.h.
> (m2_language::language_arch_info): New function, moved out of
> class declaration.
> (m2_language::printchar): New function, body from m2_printchar.
> (m2_language::printstr): New function, moved out of class
> declaration.
> (m2_language::emitchar): Likewise.
> * m2-lang.h (m2_parse): Delete declaration.
> (m2_print_typedef): Delete declaration.
> (m2_value_print_inner): Delete declaration.
> (class m2_language): Class declaration moved from m2-lang.c,
> larger functions are left in m2-lang.c.
> * m2-typeprint.c (m2_print_typedef): Rename to...
> (m2_language::print_typedef): ...this, and update function
> signature.
> * m2-valprint.c (m2_value_print_inner): Rename to...
> (m2_language::value_print_inner): ...this, replace use of
> LA_PRINT_STRING with a direct call to printstr member function,
> and update recursive call.
Hi Andrew,
all looks good to me - thanks for tidying up the code and rationalising
the method names,
regards,
Gaius
next prev parent reply other threads:[~2020-10-13 9:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-12 14:46 [PATCH 0/9] Continuing Changes to Language Classes Andrew Burgess
2020-10-12 14:46 ` [PATCH 1/9] gdb: Merge auto and unknown language implementations Andrew Burgess
2020-10-12 14:46 ` [PATCH 2/9] gdb: move Modula2 language class into a header file Andrew Burgess
2020-10-13 9:58 ` Gaius Mulley [this message]
2020-10-12 14:46 ` [PATCH 3/9] gdb: remove LA_PRINT_TYPEDEF macro Andrew Burgess
2020-10-12 14:46 ` [PATCH 4/9] gdb: remove LA_VALUE_PRINT macro Andrew Burgess
2020-10-20 20:06 ` Tom Tromey
2020-10-12 14:46 ` [PATCH 5/9] gdb: remove LA_PRINT_ARRAY_INDEX macro Andrew Burgess
2020-10-12 14:46 ` [PATCH 6/9] gdb: remove LA_ITERATE_OVER_SYMBOLS macro Andrew Burgess
2020-10-12 14:46 ` [PATCH 7/9] gdb: Rename language_defn::demangle Andrew Burgess
2020-10-12 14:46 ` [PATCH 8/9] gdb: Improve documentation comment on language_defn::print_type Andrew Burgess
2020-10-12 14:46 ` [PATCH 9/9] gdb: move f_language class into a header file Andrew Burgess
2020-10-20 20:07 ` [PATCH 0/9] Continuing Changes to Language Classes Tom Tromey
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=87mu0qsb0c.fsf@j228-gm.comp.glam.ac.uk \
--to=gaius.mulley@southwales.ac.uk \
--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).