public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug tui/32614] [gdb/tui] resize triggers source window to change contents
Date: Wed, 29 Jan 2025 08:22:05 +0000	[thread overview]
Message-ID: <bug-32614-4717-uf5VnSbwb9@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-32614-4717@http.sourceware.org/bugzilla/>

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

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #0)
> It's also a question, before the resize, why main.c is displayed on a source
> window showing "[ No Source Available ]" for foo.c.

Using this patch:
...
diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c
index a5d0c594545..5ddf0f73a34 100644
--- a/gdb/tui/tui-winsource.c
+++ b/gdb/tui/tui-winsource.c
@@ -220,8 +220,11 @@ void
 tui_source_window_base::do_erase_source_content (const char *str)
 {
   m_content.clear ();
+
   if (handle != nullptr)
     center_string (str);
+
+  set_title ("");
 }

 /* See tui-winsource.h.  */
...
I get instead:
...
┌────────────────────────────────────────────────┐
│                                                │
│                                                │
│                                                │
│            [ No Source Available ]             │
│                                                │
│                                                │
└────────────────────────────────────────────────┘
(src) In: foo                  L??   PC: 0x400566 
db.so.1".

Breakpoint 1, 0x0000000000400566 in foo ()
(gdb) 
...

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

  reply	other threads:[~2025-01-29  8:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-29  7:54 [Bug tui/32614] New: " vries at gcc dot gnu.org
2025-01-29  8:22 ` vries at gcc dot gnu.org [this message]
2025-01-29  9:12 ` [Bug tui/32614] " vries at gcc dot gnu.org
2025-01-29  9:25 ` vries at gcc dot gnu.org
2025-01-29 10:21 ` vries at gcc dot gnu.org
2025-02-25 10:57 ` cvs-commit at gcc dot gnu.org
2025-02-25 11:03 ` 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-32614-4717-uf5VnSbwb9@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).