public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug tui/32614] New: [gdb/tui] resize triggers source window to change contents
@ 2025-01-29  7:54 vries at gcc dot gnu.org
  2025-01-29  8:22 ` [Bug tui/32614] " vries at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2025-01-29  7:54 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 32614
           Summary: [gdb/tui] resize triggers source window to change
                    contents
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tui
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

Andrew noticed here ( PR32592 comment 7):
...
  ... I see "[ No Source Available ]" in the source window, then resize the
window, I once again see the source code for main displayed.
...

I managed to reproduce this as follows.

Sources:
...
$ cat main.c
extern int foo (void);

int
main (void)
{
  return foo ();
}
$ cat foo.c
extern int foo (void);

int
foo (void)
{
  return 0;
}
...

Compile main with debug info, compile foo without:
...
$ gcc -g main.c -c
$ gcc foo.c -c
$ gcc -g main.o foo.o
...

Run gdb, in tui mode to foo:
...
$ gdb -q a.out -tui -ex "b foo" -ex run
...

That gets us:
...
┌─main.c─────────────────────────────────────────┐
│                                                │
│                                                │
│                                                │
│            [ No Source Available ]             │
│                                                │
│                                                │
└────────────────────────────────────────────────┘
(src) In: foo                  L??   PC: 0x400566 
db.so.1".

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

Then press ctrl-<minus>, and we get:
...
┌─main.c───────────────────────────────────────────────────┐
│        3 int                                             │
│        4 main (void)                                     │
│        5 {                                               │
│        6   return foo ();                                │
│        7 }                                               │
│                                                          │
│                                                          │
└──────────────────────────────────────────────────────────┘
(src) In: foo                            L??   PC: 0x400566 
db.so.1".

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

It's also a question, before the resize, why main.c is displayed on a source
window showing "[ No Source Available ]" for foo.c.

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

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

end of thread, other threads:[~2025-02-25 11:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-29  7:54 [Bug tui/32614] New: [gdb/tui] resize triggers source window to change contents vries at gcc dot gnu.org
2025-01-29  8:22 ` [Bug tui/32614] " vries at gcc dot gnu.org
2025-01-29  9:12 ` 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

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