From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 13ADE3858409; Wed, 17 Nov 2021 19:17:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 13ADE3858409 From: "pedro at palves dot net" To: gdb-prs@sourceware.org Subject: [Bug tui/28600] New: "layout reg" nor "kill" refresh the TUI registers window Date: Wed, 17 Nov 2021 19:17:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: tui X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pedro at palves dot net X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2021 19:17:30 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28600 Bug ID: 28600 Summary: "layout reg" nor "kill" refresh the TUI registers window Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: tui Assignee: unassigned at sourceware dot org Reporter: pedro at palves dot net Target Milestone: --- If you run to main in CLI mode, and then issue 'layout reg', the register window shows: "[ Register Values Unavailable ]" =EF=BF=BC ... even though the process is live and we have a frame selected. If you step/stepi/next, etc. at this point, then the registers window refre= shes itself and shows registers. In the "step" case, we show registers because we get here: (top-gdb) bt #0 tui_data_window::show_registers (this=3D0x5555590decf0, group=3D0x0) at= =20 ../../src/gdb/tui/tui-regs.c:183 #1 0x0000555555d22bfd in tui_data_window::check_register_values (this=3D0x5555590decf0, frame=3D0x555558d59450) at ../../src/gdb/tui/tui-re= gs.c:468 #2 0x0000555555d07aa0 in tui_refresh_frame_and_register_information () at ../../src/gdb/tui/tui-hooks.c:143 #3 0x0000555555d07b9b in tui_before_prompt (current_gdb_prompt=3D0x5555564= e3af0 "(top-gdb) ") at ../../src/gdb/tui/tui-hooks.c:185 In the "layout reg" case, we get to tui_refresh_frame_and_register_informat= ion as well, but hit the early return: /* Refresh TUI's frame and register information. This is a hook intended = to be used to update the screen after potential frame and register changes. = */ static void tui_refresh_frame_and_register_information () { if (!from_stack && !from_source_symtab) return; These two "from_stack" and "from_source_symtab" globals are set by the tui_normal_stop, tui_context_changed, tui_symtab_changed observers, AFAICT. So any state change refreshes the TUI registers, but doing "layout reg" does not as it doesn't cause these observers to be called. I also noticed that if you're in "layout reg", and the register window is showing something, and then do "kill", the process is now gone but the regi= ster window continues showing the values of the registers from before the kill. Off-hand, I'd think "kill" should have resulted in the tui_context_changed observer being called. I didn't try it, but I'd get "detach", "disconnect"= and perhaps other commands have the same issue. --=20 You are receiving this mail because: You are on the CC list for the bug.=