public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "pedro at palves dot net" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug tui/31522] TUI misses highlight after run to main
Date: Tue, 26 Mar 2024 13:15:54 +0000	[thread overview]
Message-ID: <bug-31522-4717-i0oPtrBUWz@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-31522-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=31522

--- Comment #3 from Pedro Alves <pedro at palves dot net> ---
> Not sure what broke this, but changing tui_enable to pass
> the selected frame to tui_show_frame_info fixes it.

Thanks, I gave that a try, but it still doesn't behave like before.  It shows
the current line at the top of the source window, instead of in the middle. 
That's a bit of an usability regression, as it doesn't even show the line with
the function name.

> This seems reasonable to me, but maybe it is a change if
> you exit the TUI and then re-enter it in some scenario.
> Personally I'm not too concerned about this.

I do that frequently with c-x,a.  I'll be debugging gdb, and stepping/nexting
with the TUI enabled, then decide I'm at the right spot the program that I want
to inspect variables or run a command that I know is going to output many
lines, so I'll switch out of the TUI, issue whatever commands, and then
re-enable the TUI to continue stepping, etc.  I don't know if passing the frame
causes the TUI to lose its selected context/line when it was active or not. 
Seems like not from a quick experimentation.

BTW, this is what I tried following your instructions:

 --- c/gdb/tui/tui.c
 +++ w/gdb/tui/tui.c
 @@ -467,7 +467,7 @@ tui_enable (void)
       tui_set_term_width_to (COLS);
       def_prog_mode ();

 -      tui_show_frame_info (0);
 +      tui_show_frame_info (get_selected_frame (nullptr));

(Of course, this misbehaves if you enable the TUI before starting a process.)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2024-03-26 13:15 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-21 15:57 [Bug tui/31522] New: " pedro at palves dot net
2024-03-21 16:19 ` [Bug tui/31522] " ssbssa at sourceware dot org
2024-03-21 16:19 ` tromey at sourceware dot org
2024-03-22 16:24 ` tromey at sourceware dot org
2024-03-25 23:18 ` tromey at sourceware dot org
2024-03-25 23:18 ` tromey at sourceware dot org
2024-03-26  0:26 ` tromey at sourceware dot org
2024-03-26 13:15 ` pedro at palves dot net [this message]
2024-03-27  1:10 ` tromey at sourceware dot org
2024-03-27  8:33 ` vries at gcc dot gnu.org
2024-03-27 22:35 ` tromey at sourceware dot org
2024-03-28 10:33 ` vries at gcc dot gnu.org
2024-03-28 11:07 ` pedro at palves dot net
2024-03-28 12:00 ` vries at gcc dot gnu.org
2024-03-28 14:34 ` vries at gcc dot gnu.org
2024-03-28 14:35 ` vries at gcc dot gnu.org
2024-03-28 14:50 ` vries at gcc dot gnu.org
2024-03-28 16:43 ` pedro at palves dot net
2024-03-28 22:26 ` tromey at sourceware dot org
2024-04-02 14:09 ` cvs-commit at gcc dot gnu.org
2024-04-02 14:10 ` vries at gcc dot gnu.org

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=bug-31522-4717-i0oPtrBUWz@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@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).