* GDB 9 TUI mode broken @ 2020-02-17 16:26 Aleksey Midenkov 2020-02-17 17:46 ` Eli Zaretskii 0 siblings, 1 reply; 5+ messages in thread From: Aleksey Midenkov @ 2020-02-17 16:26 UTC (permalink / raw) To: gdb Hi! Is it vanilla feature of making TUI frame of blue color? Now the window molders away after `winheight src +8` command. The result is deplorable. If the answer is "yes", what is the functional role of blue frame? I'm not sure if the color of the frame is the culprit but something bad happens with terminal after GDB in TUI mode and only `reset` helps. Downgrading to 8.3 fixed the issue. -- All the best, Aleksey Midenkov @midenok ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: GDB 9 TUI mode broken 2020-02-17 16:26 GDB 9 TUI mode broken Aleksey Midenkov @ 2020-02-17 17:46 ` Eli Zaretskii 2020-02-22 11:33 ` Eli Zaretskii 0 siblings, 1 reply; 5+ messages in thread From: Eli Zaretskii @ 2020-02-17 17:46 UTC (permalink / raw) To: Aleksey Midenkov; +Cc: gdb > From: Aleksey Midenkov <midenok@gmail.com> > Date: Mon, 17 Feb 2020 19:26:07 +0300 > > Is it vanilla feature of making TUI frame of blue color? You can change the color using the styling commands. > Now the window molders away after `winheight src +8` command. This looks like a bug, and is probably unrelated to colors. Suggest to make a bug report. Thanks. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: GDB 9 TUI mode broken 2020-02-17 17:46 ` Eli Zaretskii @ 2020-02-22 11:33 ` Eli Zaretskii 2020-02-22 15:55 ` Simon Marchi 2020-02-22 18:05 ` Tom Tromey 0 siblings, 2 replies; 5+ messages in thread From: Eli Zaretskii @ 2020-02-22 11:33 UTC (permalink / raw) To: Tom Tromey; +Cc: midenok, gdb, gdb-patches > Date: Mon, 17 Feb 2020 19:46:36 +0200 > From: Eli Zaretskii <eliz@gnu.org> > CC: gdb@sourceware.org > > > From: Aleksey Midenkov <midenok@gmail.com> > > Date: Mon, 17 Feb 2020 19:26:07 +0300 > > > > Now the window molders away after `winheight src +8` command. > > This looks like a bug, and is probably unrelated to colors. Suggest > to make a bug report. The patch below seems to fix some of the problem, but not all of it: the position of the status line (the one that shows the process information) is not updated correctly. Tom, where's the position update of the status line supposed to be handled? And btw, the meaning of the 'locator' object in tui_adjust_win_heights is unclear: to which window does it pertain, and what is the significance of this line: TUI_CMD_WIN->origin.y = locator->origin.y + 1; I think we could use some additional comments in tui-stack.c or tui-stack.h, to explain what is the meaning and expected use of tui_locator_window. --- gdb/tui/tui-win.c~0 2020-02-08 14:50:14.000000000 +0200 +++ gdb/tui/tui-win.c 2020-02-22 13:28:37.003625000 +0200 @@ -1077,20 +1077,25 @@ tui_adjust_win_heights (struct tui_win_i { struct tui_win_info *src_win_info; - primary_win_info->resize (new_height, width, - 0, primary_win_info->origin.y); if (primary_win_info->type == CMD_WIN) { win_info = *(tui_source_windows ().begin ()); src_win_info = win_info; + primary_win_info->resize (new_height, width, + 0, + primary_win_info->origin.y + diff); + win_info->resize (win_info->height + diff, width, + 0, win_info->origin.y); } else { win_info = tui_win_list[CMD_WIN]; src_win_info = primary_win_info; - } + primary_win_info->resize (new_height, width, + 0, primary_win_info->origin.y); win_info->resize (win_info->height + diff, width, - 0, win_info->origin.y); + 0, win_info->origin.y - diff); + } TUI_CMD_WIN->origin.y = locator->origin.y + 1; if ((src_win_info->type == SRC_WIN || src_win_info->type == DISASSEM_WIN)) ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: GDB 9 TUI mode broken 2020-02-22 11:33 ` Eli Zaretskii @ 2020-02-22 15:55 ` Simon Marchi 2020-02-22 18:05 ` Tom Tromey 1 sibling, 0 replies; 5+ messages in thread From: Simon Marchi @ 2020-02-22 15:55 UTC (permalink / raw) To: Eli Zaretskii, Tom Tromey; +Cc: midenok, gdb, gdb-patches On 2020-02-22 6:33 a.m., Eli Zaretskii wrote: >> Date: Mon, 17 Feb 2020 19:46:36 +0200 >> From: Eli Zaretskii <eliz@gnu.org> >> CC: gdb@sourceware.org >> >>> From: Aleksey Midenkov <midenok@gmail.com> >>> Date: Mon, 17 Feb 2020 19:26:07 +0300 >>> >>> Now the window molders away after `winheight src +8` command. >> >> This looks like a bug, and is probably unrelated to colors. Suggest >> to make a bug report. > > The patch below seems to fix some of the problem, but not all of it: > the position of the status line (the one that shows the process > information) is not updated correctly. > > Tom, where's the position update of the status line supposed to be > handled? > > And btw, the meaning of the 'locator' object in tui_adjust_win_heights > is unclear: to which window does it pertain, and what is the > significance of this line: > > TUI_CMD_WIN->origin.y = locator->origin.y + 1; > > I think we could use some additional comments in tui-stack.c or > tui-stack.h, to explain what is the meaning and expected use of > tui_locator_window. The locator window is the line that sits between the source windows and the command line's window (in the TUI's source layout). It displays information such as current thread id, current line and current PC. I learned this watching Tom's excellent FOSDEM presentation, here :) https://fosdem.org/2020/schedule/event/debugging_gdb_tui/ Simon ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: GDB 9 TUI mode broken 2020-02-22 11:33 ` Eli Zaretskii 2020-02-22 15:55 ` Simon Marchi @ 2020-02-22 18:05 ` Tom Tromey 1 sibling, 0 replies; 5+ messages in thread From: Tom Tromey @ 2020-02-22 18:05 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Tom Tromey, midenok, gdb, gdb-patches >>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes: Eli> Tom, where's the position update of the status line supposed to be Eli> handled? I looked at the gdb-9 branch. In tui_adjust_win_heights, it is code like this: locator->resize (1, width, 0, (second_win->origin.y + second_win->height + 1)); Eli> And btw, the meaning of the 'locator' object in tui_adjust_win_heights Eli> is unclear: to which window does it pertain, and what is the Eli> significance of this line: You and Simon discussed this down-thread. FWIW the name "locator" has been used in the source since the beginning; but I also don't particularly care for it (for a long time I could never remember the name and had to search to find it whenever I needed it). So, I would appreciate a rename in the code here as well. Also, thanks for pointing out that this is called "status" in the docs. That affects my other series to make user-specified layouts. In that series I called the window "locator" -- but I'm going to go rename it. Eli> TUI_CMD_WIN-> origin.y = locator->origin.y + 1; This is a leftover and should be removed. The resize method is the way to modify a window's size and position. This code is all different on git master. Your patch looks reasonable to me. Tom ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-02-22 18:05 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-02-17 16:26 GDB 9 TUI mode broken Aleksey Midenkov 2020-02-17 17:46 ` Eli Zaretskii 2020-02-22 11:33 ` Eli Zaretskii 2020-02-22 15:55 ` Simon Marchi 2020-02-22 18:05 ` Tom Tromey
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox