[0/3] Replace symbols' LANGUAGE macros with member functions

Message ID 20191214232959.3973-1-cbiesinger@chromium.org
Headers show
Series
  • Replace symbols' LANGUAGE macros with member functions
Related show

Message

cbiesinger@chromium.org Dec. 14, 2019, 11:29 p.m.
From: Christian Biesinger <cbiesinger@google.com>


This is part of my longer-term plan to get rid of all the accessor and
setter macros in favor of member functions. The advantages are that this
is easier to read, leads to shorter lines, and it's easier to see which
functions are available on a certain type.

Christian Biesinger (3):
  Use symbol_set_language to set a symbol's language
  Use an accessor function for general_symbol_info::language
  Use a member function to set a symbol's language

 gdb/ada-exp.y               |  2 +-
 gdb/ada-lang.c              | 13 +++----
 gdb/ax-gdb.c                |  2 +-
 gdb/block.c                 | 10 ++---
 gdb/coffread.c              |  4 +-
 gdb/cp-namespace.c          |  2 +-
 gdb/ctfread.c               |  4 +-
 gdb/dbxread.c               |  4 +-
 gdb/dictionary.c            | 10 ++---
 gdb/dwarf-index-write.c     |  4 +-
 gdb/dwarf2read.c            |  6 +--
 gdb/findvar.c               |  2 +-
 gdb/ft32-tdep.c             |  2 +-
 gdb/go-lang.c               |  2 +-
 gdb/language.c              |  2 +-
 gdb/language.h              |  2 +-
 gdb/linespec.c              |  6 +--
 gdb/mdebugread.c            |  7 ++--
 gdb/mi/mi-cmd-stack.c       |  2 +-
 gdb/minsyms.c               |  9 ++---
 gdb/moxie-tdep.c            |  2 +-
 gdb/parse.c                 |  2 +-
 gdb/psymtab.c               | 19 +++++-----
 gdb/python/py-framefilter.c |  8 ++--
 gdb/stabsread.c             | 14 +++----
 gdb/stack.c                 | 14 +++----
 gdb/symfile.c               |  2 +-
 gdb/symtab.c                | 74 ++++++++++++++++++-------------------
 gdb/symtab.h                | 21 +++++------
 gdb/xstormy16-tdep.c        |  2 +-
 30 files changed, 120 insertions(+), 133 deletions(-)

-- 
2.24.1.735.g03f4e72817-goog

Comments

Simon Marchi Dec. 15, 2019, 2:38 a.m. | #1
On 2019-12-14 6:29 p.m., cbiesinger@chromium.org wrote:
> From: Christian Biesinger <cbiesinger@google.com>

> 

> This is part of my longer-term plan to get rid of all the accessor and

> setter macros in favor of member functions. The advantages are that this

> is easier to read, leads to shorter lines, and it's easier to see which

> functions are available on a certain type.


Hi Christian,

Thanks, this LGTM.  I just looked a some samples of patches 2 and 3, since
they are quite large but mechanical.

Simon
Simon Marchi via Gdb-patches Dec. 16, 2019, 6:47 a.m. | #2
On Sat, Dec 14, 2019 at 8:38 PM Simon Marchi <simark@simark.ca> wrote:
>

> On 2019-12-14 6:29 p.m., cbiesinger@chromium.org wrote:

> > From: Christian Biesinger <cbiesinger@google.com>

> >

> > This is part of my longer-term plan to get rid of all the accessor and

> > setter macros in favor of member functions. The advantages are that this

> > is easier to read, leads to shorter lines, and it's easier to see which

> > functions are available on a certain type.

>

> Hi Christian,

>

> Thanks, this LGTM.  I just looked a some samples of patches 2 and 3, since

> they are quite large but mechanical.


Thanks, pushed the three patches:
To ssh://sourceware.org/git/binutils-gdb.git
   0d037fafed..d3ecddab5f  HEAD -> master

Christian