From: Ruslan Kabatsayev <b7.10110111@gmail.com>
To: Pedro Alves <palves@redhat.com>
Cc: Tom Tromey <tom@tromey.com>, GDB Patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Use less horizontal space in source window
Date: Mon, 19 Aug 2019 12:09:00 -0000 [thread overview]
Message-ID: <CAHEcG96QNEjLJ+Cd7V3Kg9e1Xty44pgBxwq_vUK4WLUvtbb=ng@mail.gmail.com> (raw)
In-Reply-To: <b28959b8-e248-17b2-5669-b21ae81f5725@redhat.com>
Hello,
On Fri, 16 Aug 2019 at 16:55, Pedro Alves <palves@redhat.com> wrote:
>
> On 8/16/19 3:36 AM, Tom Tromey wrote:
> > The source window currently uses a field width of 6 for line numbers,
> > and it further aligns to the next tab stop.
> >
> > This seemed a bit wasteful of horizontal space to me. This patch
> > changes the TUI to compute the maximum field width needed for the
> > current source file, and to only add a single space after the line
> > number. Line numbers are now right justified, as well, which I think
> > also looks better visually when scrolling.
>
> I tried this out a bit, and IMHO the experience is worse than before, given
> the left/right shifting when stepping as you move between source files.
>
> E.g., try debugging gdb and running to main, and stepping into gdb_main.
> And then all the way into captured_main_1. I much prefer that the
> source window remains in the same place as I step through all
> these things.
>
> I'd probably be fine with reducing the width if we still had a reasonable
> minimum that is enough to fit reasonably-sized source files. I think that
> if we change this, we should also have more than one space between the line
> number and the source though. One single space as in your patch makes it harder
> to distinguish between what is a line and the source IMO. More so with
> styling disabled.
What if line numbering were inverted in colors (or made different in
another way) or maybe separated by a vertical line from the source? My
experience is with much wider sources, and I'd appreciate some
optimization of horizontal space usage in GDB TUI.
To me this change is definitely an improvement, so I'd like to have it
in some form, not dropped completely.
Thanks,
Ruslan
>
> I have to say that I find it a bit odd to be optimizing the horizontal space,
> since the sources I debug (gdb!) mostly wrap around 80 cols, and my terminal
> is usually much larger than that, so I always have tons of empty space
> on the right side of the source window.
>
> Thanks,
> Pedro Alves
next prev parent reply other threads:[~2019-08-19 12:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-16 2:36 Tom Tromey
2019-08-16 13:55 ` Pedro Alves
2019-08-19 12:09 ` Ruslan Kabatsayev [this message]
2019-08-20 22:27 ` Tom Tromey
2019-08-20 22:28 ` 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='CAHEcG96QNEjLJ+Cd7V3Kg9e1Xty44pgBxwq_vUK4WLUvtbb=ng@mail.gmail.com' \
--to=b7.10110111@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--cc=tom@tromey.com \
/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