public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [RFC 0/7] Move language-related stuff out of varobj.c
@ 2013-09-18 13:55 Yao Qi
  2013-09-18 13:55 ` [PATCH 5/7] New lang-varobj.h Yao Qi
                   ` (7 more replies)
  0 siblings, 8 replies; 35+ messages in thread
From: Yao Qi @ 2013-09-18 13:55 UTC (permalink / raw)
  To: gdb-patches

This patch series is to move language-related stuff out of varobj.c
to ada-varobj.c, c-varobj.c and jv-varobj.c.  This will shorten
varobj.c, and make it easier for varobj support for new languages.

Nowadays, we have 'struct language_specific' which is about language
operations in varobj.  This can be moved out of varobj.c and shared
for different languages.  This is what patch 5/7 does.  Operations
of each language need to know 'struct varobj', so 'struct varobj'
should be moved to varobj.h.  This is what patch 4/7 does.  Note
that we don't move all 'struct varobj' to varobj.h because some fields
are related to dynamic varobj, and make no sense to expose them.
I move basic part of 'struct varobj' to varobj.h, and define a new
struct varobj_dynamic to extend 'struct varobj'.

Then, we can move language related operations out of varobj.c to
c-varobj.c, ada-varobj.c and jv-varobj.c respectively.  This is
done by patch 6/7.

Patch 1/7 - 3/7 are cleanups, to remove unused bits in varobj.c.
Patch 7/7 is a cleanup too.

Note that static array 'languages' is still used in varobj.c, which
is not really necessary.  We can remove it and move each
'struct lang_varobj_ops *' to be a field of 'struct language_defn'.
I don't include this change in this series because I'd like to post
patches for review before I go too far away.

The whole series is tested on x86_64-linux.  Comments?

*** BLURB HERE ***

Yao Qi (7):
  Remove field language in struct language_specific
  Remove vlang_unknown
  Remove field value_of_root
  Move struct varobj to varobj.h.
  New lang-varobj.h
  Move language stuff out of varobj.c
  Remove ada-varobj.h.

 gdb/Makefile.in   |   12 +-
 gdb/ada-varobj.c  |  151 +++++-
 gdb/ada-varobj.h  |   55 --
 gdb/c-varobj.c    |  902 +++++++++++++++++++++++++++
 gdb/gdbtypes.c    |   16 +
 gdb/gdbtypes.h    |    4 +
 gdb/jv-varobj.c   |  104 ++++
 gdb/lang-varobj.h |   79 +++
 gdb/varobj.c      | 1783 +++++++----------------------------------------------
 gdb/varobj.h      |   98 +++-
 10 files changed, 1571 insertions(+), 1633 deletions(-)
 delete mode 100644 gdb/ada-varobj.h
 create mode 100644 gdb/c-varobj.c
 create mode 100644 gdb/jv-varobj.c
 create mode 100644 gdb/lang-varobj.h

-- 
1.7.7.6

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

end of thread, other threads:[~2013-10-17 13:34 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-18 13:55 [RFC 0/7] Move language-related stuff out of varobj.c Yao Qi
2013-09-18 13:55 ` [PATCH 5/7] New lang-varobj.h Yao Qi
2013-10-02 17:18   ` Doug Evans
2013-10-08  4:59     ` Joel Brobecker
2013-10-09 23:51       ` Yao Qi
2013-10-09 23:56         ` Doug Evans
2013-10-10  0:19           ` Yao Qi
2013-09-18 13:55 ` [PATCH 1/7] Remove field language in struct language_specific Yao Qi
2013-10-01 10:03   ` Joel Brobecker
2013-10-01 13:35     ` Yao Qi
2013-09-18 13:55 ` [PATCH 3/7] Remove field value_of_root Yao Qi
2013-10-01 10:16   ` Joel Brobecker
2013-10-01 13:52     ` Yao Qi
2013-09-18 13:55 ` [PATCH 2/7] Remove vlang_unknown Yao Qi
2013-10-01 10:07   ` Joel Brobecker
2013-10-01 13:34     ` Yao Qi
2013-10-02  0:19       ` Doug Evans
2013-10-02  9:32         ` Joel Brobecker
2013-10-04  8:31           ` Yao Qi
2013-09-18 13:55 ` [PATCH 6/7] Move language stuff out of varobj.c Yao Qi
2013-10-11  8:20   ` Yao Qi
2013-10-17  5:40     ` Joel Brobecker
2013-10-17 13:33       ` Yao Qi
2013-09-18 13:55 ` [PATCH 7/7] Remove ada-varobj.h Yao Qi
2013-10-17  5:46   ` Joel Brobecker
2013-10-17 13:34     ` Yao Qi
2013-09-18 13:55 ` [PATCH 4/7] Move struct varobj to varobj.h Yao Qi
2013-10-02  9:46   ` Joel Brobecker
2013-10-02 19:32     ` Doug Evans
2013-10-06  6:33     ` Yao Qi
2013-10-08  4:56       ` Joel Brobecker
2013-10-08 21:03         ` Doug Evans
2013-10-09  0:28         ` Yao Qi
2013-10-14  8:19         ` Yao Qi
2013-09-28  0:56 ` [RFC 0/7] Move language-related stuff out of varobj.c Yao Qi

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