public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug tui/30440] New: [gdb/tui] repeated stepi ends up with garbled screen
@ 2023-05-11  9:43 vries at gcc dot gnu.org
  2023-05-11  9:45 ` [Bug tui/30440] " vries at gcc dot gnu.org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2023-05-11  9:43 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 30440
           Summary: [gdb/tui] repeated stepi ends up with garbled screen
           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: ---

I've been playing around with TUI, and tried to find an easy way to do a stress
test.

I came up with starting a hello world, and doing si and then keeping my finger
on the enter key and see what happens.

I eventually ran into screen garbling, which could be repaired using ^L.

I realized this garbling could be the result of printing the "hello", so I
moved to compiling "int main (void) { return 0; }", doing a starti, and
stepi-ing from there.  I played around with this for a while, and found that I
could reproduce the problem within minutes when starting to stepi from
__GI___tunables_init.

I tried to write a test-case that mimics this in the testsuite, but sofar I
didn't manage to reproduce this.

So, here are the steps I followed (this may be way over-specific):
- openSUSE Leap 15.4 x86_64-linux
- gdb build using -O0
- gdb build from commit 38b95a52938 ("Automatic date update in version.in")
- gnome-terminal (on KDE desktop)
- TERM=xterm (native TERM=xterm-256colors)
- tab with COLUMNS 145, LINES 37
- stay in the tab, to avoid ncurses refresh when switching back to the tab.
  This also prevents resetting the regs window layout to one reg on one line.
- gdb started using "gdb ~/a.out"
- starti
- layout asm (enter tui, use asm window)
- layout regs (add regs window)
- stepi (populate regs window, should show two regs on one line)
- b __GI___tunables_init, continue
- stepi (command to repeat)
- press-and-hold enter
- observe garbling and release enter (for me, after about 3/4 minutes)

I've now also reproduce by starting gdb like so:
...
$ gdb -q ~/a.out \
    -ex "starti" \
    -ex "layout asm" \
    -ex "layout regs" \
    -ex "stepi" 
    -ex "b __GI___tunables_init" 
... 
and then continue, stepi, and press-and-hold enter.

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

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

* [Bug tui/30440] [gdb/tui] repeated stepi ends up with garbled screen
  2023-05-11  9:43 [Bug tui/30440] New: [gdb/tui] repeated stepi ends up with garbled screen vries at gcc dot gnu.org
@ 2023-05-11  9:45 ` vries at gcc dot gnu.org
  2023-05-11  9:45 ` vries at gcc dot gnu.org
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2023-05-11  9:45 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
Created attachment 14873
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14873&action=edit
screenshot after garbling

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

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

* [Bug tui/30440] [gdb/tui] repeated stepi ends up with garbled screen
  2023-05-11  9:43 [Bug tui/30440] New: [gdb/tui] repeated stepi ends up with garbled screen vries at gcc dot gnu.org
  2023-05-11  9:45 ` [Bug tui/30440] " vries at gcc dot gnu.org
@ 2023-05-11  9:45 ` vries at gcc dot gnu.org
  2023-05-11 10:19 ` vries at gcc dot gnu.org
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2023-05-11  9:45 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
Created attachment 14874
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14874&action=edit
screenshot after garbling is repaired using ^L

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

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

* [Bug tui/30440] [gdb/tui] repeated stepi ends up with garbled screen
  2023-05-11  9:43 [Bug tui/30440] New: [gdb/tui] repeated stepi ends up with garbled screen vries at gcc dot gnu.org
  2023-05-11  9:45 ` [Bug tui/30440] " vries at gcc dot gnu.org
  2023-05-11  9:45 ` vries at gcc dot gnu.org
@ 2023-05-11 10:19 ` vries at gcc dot gnu.org
  2023-05-11 10:45 ` vries at gcc dot gnu.org
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2023-05-11 10:19 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
Created attachment 14875
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14875&action=edit
Attempt at test-case

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

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

* [Bug tui/30440] [gdb/tui] repeated stepi ends up with garbled screen
  2023-05-11  9:43 [Bug tui/30440] New: [gdb/tui] repeated stepi ends up with garbled screen vries at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-05-11 10:19 ` vries at gcc dot gnu.org
@ 2023-05-11 10:45 ` vries at gcc dot gnu.org
  2023-05-11 10:52 ` vries at gcc dot gnu.org
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2023-05-11 10:45 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
reproduced with gdb-13-branch.

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

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

* [Bug tui/30440] [gdb/tui] repeated stepi ends up with garbled screen
  2023-05-11  9:43 [Bug tui/30440] New: [gdb/tui] repeated stepi ends up with garbled screen vries at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-05-11 10:45 ` vries at gcc dot gnu.org
@ 2023-05-11 10:52 ` vries at gcc dot gnu.org
  2023-05-11 12:18 ` vries at gcc dot gnu.org
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2023-05-11 10:52 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #5 from Tom de Vries <vries at gcc dot gnu.org> ---
reproduced with gdb-12-branch.

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

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

* [Bug tui/30440] [gdb/tui] repeated stepi ends up with garbled screen
  2023-05-11  9:43 [Bug tui/30440] New: [gdb/tui] repeated stepi ends up with garbled screen vries at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2023-05-11 10:52 ` vries at gcc dot gnu.org
@ 2023-05-11 12:18 ` vries at gcc dot gnu.org
  2023-05-11 13:25 ` vries at gcc dot gnu.org
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2023-05-11 12:18 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #6 from Tom de Vries <vries at gcc dot gnu.org> ---
Didn't reproduce with -O2 build, gave up after 7 minutes.

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

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

* [Bug tui/30440] [gdb/tui] repeated stepi ends up with garbled screen
  2023-05-11  9:43 [Bug tui/30440] New: [gdb/tui] repeated stepi ends up with garbled screen vries at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2023-05-11 12:18 ` vries at gcc dot gnu.org
@ 2023-05-11 13:25 ` vries at gcc dot gnu.org
  2023-05-11 13:34 ` vries at gcc dot gnu.org
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2023-05-11 13:25 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #7 from Tom de Vries <vries at gcc dot gnu.org> ---
Reproduced with build without system readline.

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

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

* [Bug tui/30440] [gdb/tui] repeated stepi ends up with garbled screen
  2023-05-11  9:43 [Bug tui/30440] New: [gdb/tui] repeated stepi ends up with garbled screen vries at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2023-05-11 13:25 ` vries at gcc dot gnu.org
@ 2023-05-11 13:34 ` vries at gcc dot gnu.org
  2023-05-11 13:42 ` vries at gcc dot gnu.org
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2023-05-11 13:34 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #8 from Tom de Vries <vries at gcc dot gnu.org> ---
Reproduced with changing tabs forth and back after the continue, changing the
regs window to one reg per line.

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

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

* [Bug tui/30440] [gdb/tui] repeated stepi ends up with garbled screen
  2023-05-11  9:43 [Bug tui/30440] New: [gdb/tui] repeated stepi ends up with garbled screen vries at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2023-05-11 13:34 ` vries at gcc dot gnu.org
@ 2023-05-11 13:42 ` vries at gcc dot gnu.org
  2023-05-11 13:46 ` vries at gcc dot gnu.org
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2023-05-11 13:42 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #9 from Tom de Vries <vries at gcc dot gnu.org> ---
Didn't reproduce without layout regs, so without register window.

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

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

* [Bug tui/30440] [gdb/tui] repeated stepi ends up with garbled screen
  2023-05-11  9:43 [Bug tui/30440] New: [gdb/tui] repeated stepi ends up with garbled screen vries at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2023-05-11 13:42 ` vries at gcc dot gnu.org
@ 2023-05-11 13:46 ` vries at gcc dot gnu.org
  2023-05-11 13:51 ` vries at gcc dot gnu.org
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2023-05-11 13:46 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #10 from Tom de Vries <vries at gcc dot gnu.org> ---
Reproduced without layout asm, so src (showing no source available throughout)
instead of asm window.

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

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

* [Bug tui/30440] [gdb/tui] repeated stepi ends up with garbled screen
  2023-05-11  9:43 [Bug tui/30440] New: [gdb/tui] repeated stepi ends up with garbled screen vries at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2023-05-11 13:46 ` vries at gcc dot gnu.org
@ 2023-05-11 13:51 ` vries at gcc dot gnu.org
  2023-05-11 14:07 ` vries at gcc dot gnu.org
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2023-05-11 13:51 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #11 from Tom de Vries <vries at gcc dot gnu.org> ---
Reproduced with combination of comment 8 and 10.

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

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

* [Bug tui/30440] [gdb/tui] repeated stepi ends up with garbled screen
  2023-05-11  9:43 [Bug tui/30440] New: [gdb/tui] repeated stepi ends up with garbled screen vries at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2023-05-11 13:51 ` vries at gcc dot gnu.org
@ 2023-05-11 14:07 ` vries at gcc dot gnu.org
  2023-05-11 16:12 ` vries at gcc dot gnu.org
  2023-05-22 16:24 ` vries at gcc dot gnu.org
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2023-05-11 14:07 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #12 from Tom de Vries <vries at gcc dot gnu.org> ---
OK, new way to reproduce:
...
$ gdb -q ~/a.out \
    -ex "starti" \
    -ex "layout src" \
    -ex "b __GI___tunables_init" \
    -ex continue
...
and do "stepi 1000", followed by press-and-hold enter.

Reproduces within seconds.

Now also reproduces with system gdb based on 12.1 and build with -O2.

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

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

* [Bug tui/30440] [gdb/tui] repeated stepi ends up with garbled screen
  2023-05-11  9:43 [Bug tui/30440] New: [gdb/tui] repeated stepi ends up with garbled screen vries at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2023-05-11 14:07 ` vries at gcc dot gnu.org
@ 2023-05-11 16:12 ` vries at gcc dot gnu.org
  2023-05-22 16:24 ` vries at gcc dot gnu.org
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2023-05-11 16:12 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #13 from Tom de Vries <vries at gcc dot gnu.org> ---
I'm starting to think this is the input variant of PR14332.

By doing stepi, we temporarily hand the terminal to the inferior.

Some of the enters will land in that window where the inferior has the
terminal, and will be handled according to those terminal settings, not the
terminal settings as setup for/by ncurses, and they're probably just translated
into a newline and echoed.

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

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

* [Bug tui/30440] [gdb/tui] repeated stepi ends up with garbled screen
  2023-05-11  9:43 [Bug tui/30440] New: [gdb/tui] repeated stepi ends up with garbled screen vries at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2023-05-11 16:12 ` vries at gcc dot gnu.org
@ 2023-05-22 16:24 ` vries at gcc dot gnu.org
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2023-05-22 16:24 UTC (permalink / raw)
  To: gdb-prs

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

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #14 from Tom de Vries <vries at gcc dot gnu.org> ---
Duplicate.

*** This bug has been marked as a duplicate of bug 14332 ***

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

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

end of thread, other threads:[~2023-05-22 16:24 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-11  9:43 [Bug tui/30440] New: [gdb/tui] repeated stepi ends up with garbled screen vries at gcc dot gnu.org
2023-05-11  9:45 ` [Bug tui/30440] " vries at gcc dot gnu.org
2023-05-11  9:45 ` vries at gcc dot gnu.org
2023-05-11 10:19 ` vries at gcc dot gnu.org
2023-05-11 10:45 ` vries at gcc dot gnu.org
2023-05-11 10:52 ` vries at gcc dot gnu.org
2023-05-11 12:18 ` vries at gcc dot gnu.org
2023-05-11 13:25 ` vries at gcc dot gnu.org
2023-05-11 13:34 ` vries at gcc dot gnu.org
2023-05-11 13:42 ` vries at gcc dot gnu.org
2023-05-11 13:46 ` vries at gcc dot gnu.org
2023-05-11 13:51 ` vries at gcc dot gnu.org
2023-05-11 14:07 ` vries at gcc dot gnu.org
2023-05-11 16:12 ` vries at gcc dot gnu.org
2023-05-22 16:24 ` 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).