From: "Hannes Domani via gdb-patches" <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Subject: [RFC][PATCH] Call tui_before_prompt in do_scroll_vertical
Date: Sat, 21 Dec 2019 15:34:00 -0000 [thread overview]
Message-ID: <20191221153325.6961-1-ssbssa@yahoo.de> (raw)
In-Reply-To: <20191221153325.6961-1-ssbssa.ref@yahoo.de>
Without this call scrolling in the src window does not work at all.
First I tried it with tui_update_source_windows_with_line, but this didn't
reset from_source_symtab (which was set deep in print_source_lines),
which resulted in some weird behavior when switching from "layout split"
to "layout asm" after scrolling down in the src window (the asm window
was then overwritten by the src window).
gdb/ChangeLog:
2019-12-21 Hannes Domani <ssbssa@yahoo.de>
* tui/tui-hooks.c (tui_before_prompt): Remove static.
* tui/tui-source.c (tui_before_prompt): Add prototype.
(tui_source_window::do_scroll_vertical): Add tui_before_prompt call.
---
gdb/tui/tui-hooks.c | 2 +-
gdb/tui/tui-source.c | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/gdb/tui/tui-hooks.c b/gdb/tui/tui-hooks.c
index 8576bb8fcc..8b9e70316f 100644
--- a/gdb/tui/tui-hooks.c
+++ b/gdb/tui/tui-hooks.c
@@ -179,7 +179,7 @@ tui_inferior_exit (struct inferior *inf)
/* Observer for the before_prompt notification. */
-static void
+void
tui_before_prompt (const char *current_gdb_prompt)
{
tui_refresh_frame_and_register_information ();
diff --git a/gdb/tui/tui-source.c b/gdb/tui/tui-source.c
index 0728263b8c..dfe5721edf 100644
--- a/gdb/tui/tui-source.c
+++ b/gdb/tui/tui-source.c
@@ -39,6 +39,9 @@
#include "tui/tui-source.h"
#include "gdb_curses.h"
+void
+tui_before_prompt (const char *current_gdb_prompt);
+
/* Function to display source in the source window. */
bool
tui_source_window::set_contents (struct gdbarch *arch,
@@ -158,6 +161,8 @@ tui_source_window::do_scroll_vertical (int num_to_scroll)
l.u.line_no = 1;
print_source_lines (s, l.u.line_no, l.u.line_no + 1, 0);
+
+ tui_before_prompt ("");
}
}
--
2.24.1
next parent reply other threads:[~2019-12-21 15:34 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20191221153325.6961-1-ssbssa.ref@yahoo.de>
2019-12-21 15:34 ` Hannes Domani via gdb-patches [this message]
2019-12-22 0:58 ` Andrew Burgess
2019-12-22 1:25 ` Hannes Domani via gdb-patches
2019-12-23 0:03 ` Tom Tromey
2019-12-23 0:19 ` Hannes Domani via gdb-patches
2019-12-23 1:23 ` Andrew Burgess
2020-01-07 11:52 ` [PATCH 6/6] gdb/tui: Link source and assembler scrolling .... again Andrew Burgess
2020-01-07 19:37 ` Tom Tromey
2020-01-07 11:52 ` [PATCH 3/6] gdb/testsuite/tui: Introduce check_box_contents Andrew Burgess
2020-01-07 19:30 ` Tom Tromey
2020-01-07 11:52 ` [PATCH 0/6] Vertical scrolling and another small bug fix Andrew Burgess
2020-01-07 19:38 ` Tom Tromey
2020-01-09 23:28 ` Andrew Burgess
2020-01-07 11:52 ` [PATCH 1/6] gdb/testsuite/tui: Always dump_screen when asked Andrew Burgess
2020-01-07 18:54 ` Tom Tromey
2020-01-07 11:52 ` [PATCH 4/6] gdb/tui: Fix 'layout asm' before the inferior has started Andrew Burgess
2020-01-07 19:31 ` Tom Tromey
2020-01-07 11:52 ` [PATCH 2/6] gdb/testsuite/tui: Split enter_tui into two procs Andrew Burgess
2020-01-07 19:19 ` Tom Tromey
2020-01-07 11:52 ` [PATCH 5/6] gdb: Fix scrolling in TUI Andrew Burgess
2020-01-07 19:36 ` Tom Tromey
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=20191221153325.6961-1-ssbssa@yahoo.de \
--to=gdb-patches@sourceware.org \
--cc=ssbssa@yahoo.de \
/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