public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "Andrew Burgess (Code Review)" <gerrit@gnutoolchain-gerrit.osci.io>
To: Tom Tromey <tromey@sourceware.org>, gdb-patches@sourceware.org
Subject: [review v2] Introduce new layout code
Date: Thu, 14 Nov 2019 12:02:00 -0000	[thread overview]
Message-ID: <20191114120251.6A96620AF6@gnutoolchain-gerrit.osci.io> (raw)
In-Reply-To: <gerrit.1572212661000.I3a4cae666327b617d862aaa356f8179f945c6a4e@gnutoolchain-gerrit.osci.io>

Andrew Burgess has posted comments on this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/367
......................................................................


Patch Set 2:

(2 comments)

I started looking through and had a few comments.  I still need to finish looking through the layout code though, but I hope to get back to this soon.

| --- /dev/null
| +++ /COMMIT_MSG
| @@ -1,0 +2,19 @@ Parent:     7e625c33 (Remove struct tui_point)
| +Author:     Tom Tromey <tom@tromey.com>
| +AuthorDate: 2019-10-07 18:03:02 -0600
| +Commit:     Tom Tromey <tom@tromey.com>
| +CommitDate: 2019-11-06 06:23:34 -0700
| +
| +Introduce new layout code
| +
| +This introduces a new approach to window layout for the TUI.  The idea
| +behind this code is that a layout should be specified in a declarative
| +way, and the applied by generic code that does not need to know the

PS2, Line 11:

typo: ...and THEN applied...

| +specifics of every possible layout.
| +
| +This patch itself does not change any behavior, because the new layout
| +engine isn't yet connected to anything.  That is, this merely
| +introduces the implementation.
| +
| +This generic approach makes the code more maintainable.  It also
| +enables some future changes:
| +
| --- gdb/tui/tui-layout.c
| +++ gdb/tui/tui-layout.c
| @@ -538,8 +538,19 @@ show_source_or_disasm_and_command (enum tui_layout_type layout_type)
|    TUI_CMD_WIN->resize (cmd_height,
|  		       tui_term_width (),
|  		       0,
|  		       src_height);
|  }
|  
|  \f
|  
| +static tui_gen_win_info *
| +tui_get_window_by_name (const std::string &name)

PS2, Line 547:

I noticed that all the new functions are missing header comments.  I
can see that some (all?) of the class functions are documented in the
header file, in this case the GDB style seems to be /* See somefile.h.
*/, right?

| +{
| +  if (name == "src")
| +    {
| +      if (tui_win_list[SRC_WIN] == nullptr)
| +	tui_win_list[SRC_WIN] = new tui_source_window ();
| +      return tui_win_list[SRC_WIN];
| +    }
| +  else if (name == "cmd")
| +    {

-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I3a4cae666327b617d862aaa356f8179f945c6a4e
Gerrit-Change-Number: 367
Gerrit-PatchSet: 2
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-CC: Andrew Burgess <andrew.burgess@embecosm.com>
Gerrit-Comment-Date: Thu, 14 Nov 2019 12:02:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

  parent reply	other threads:[~2019-11-14 12:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-27 21:44 [review] " Tom Tromey (Code Review)
2019-11-06 14:36 ` [review v2] " Tom Tromey (Code Review)
2019-11-14 12:02 ` Andrew Burgess (Code Review) [this message]
2019-11-14 22:51 ` [review v3] " Tom Tromey (Code Review)
2019-11-17 21:59 ` Tom Tromey (Code Review)
2019-11-18 18:25 ` Andrew Burgess (Code Review)
2019-11-19 20:36 ` [review v4] " Tom Tromey (Code Review)
2019-11-23  0:49 ` Andrew Burgess (Code Review)
2019-11-24 18:37 ` Tom Tromey (Code Review)
2019-11-26 23:51 ` Andrew Burgess (Code Review)
2019-12-11 23:21 ` [pushed] " Sourceware to Gerrit sync (Code Review)
2019-12-11 23:21 ` Sourceware to Gerrit sync (Code Review)

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=20191114120251.6A96620AF6@gnutoolchain-gerrit.osci.io \
    --to=gerrit@gnutoolchain-gerrit.osci.io \
    --cc=gdb-patches@sourceware.org \
    --cc=gnutoolchain-gerrit@osci.io \
    --cc=tromey@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).