* [review] Use start_line_or_addr in TUI windows
@ 2019-11-14 23:36 Tom Tromey (Code Review)
2019-12-12 2:35 ` [review v2] " Tom Tromey (Code Review)
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Tom Tromey (Code Review) @ 2019-11-14 23:36 UTC (permalink / raw)
To: gdb-patches
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/639
......................................................................
Use start_line_or_addr in TUI windows
A few spots in the TUI source and disassembly windows referred to
content[0], where start_line_or_addr is equivalent. This patch makes
this substitution.
gdb/ChangeLog
2019-11-14 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.c (tui_source_window_base::refill): Use
start_line_or_addr.
* tui/tui-source.c (tui_source_window::do_scroll_vertical): Use
start_line_or_addr.
* tui/tui-disasm.c (tui_disasm_window::do_scroll_vertical): Use
start_line_or_addr.
Change-Id: I1fa807321cd7ad88b3cc5e41cc50f4d4e2d46271
---
M gdb/ChangeLog
M gdb/tui/tui-disasm.c
M gdb/tui/tui-source.c
M gdb/tui/tui-winsource.c
4 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f665148..0709e39 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,14 @@
2019-11-14 Tom Tromey <tom@tromey.com>
+ * tui/tui-winsource.c (tui_source_window_base::refill): Use
+ start_line_or_addr.
+ * tui/tui-source.c (tui_source_window::do_scroll_vertical): Use
+ start_line_or_addr.
+ * tui/tui-disasm.c (tui_disasm_window::do_scroll_vertical): Use
+ start_line_or_addr.
+
+2019-11-14 Tom Tromey <tom@tromey.com>
+
* tui/tui-winsource.h (struct tui_source_window_base)
<set_contents>: Return bool.
* tui/tui-winsource.c
diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c
index cac6f25..da5519f 100644
--- a/gdb/tui/tui-disasm.c
+++ b/gdb/tui/tui-disasm.c
@@ -325,7 +325,7 @@
CORE_ADDR pc;
struct tui_line_or_address val;
- pc = content[0].line_or_addr.u.addr;
+ pc = start_line_or_addr.u.addr;
if (num_to_scroll >= 0)
num_to_scroll++;
else
diff --git a/gdb/tui/tui-source.c b/gdb/tui/tui-source.c
index 6b6a978..d527e91 100644
--- a/gdb/tui/tui-source.c
+++ b/gdb/tui/tui-source.c
@@ -134,14 +134,14 @@
s = cursal.symtab;
l.loa = LOA_LINE;
- l.u.line_no = content[0].line_or_addr.u.line_no
+ l.u.line_no = start_line_or_addr.u.line_no
+ num_to_scroll;
const std::vector<off_t> *offsets;
if (g_source_cache.get_line_charpos (s, &offsets)
&& l.u.line_no > offsets->size ())
/* line = s->nlines - win_info->content_size + 1; */
/* elz: fix for dts 23398. */
- l.u.line_no = content[0].line_or_addr.u.line_no;
+ l.u.line_no = start_line_or_addr.u.line_no;
if (l.u.line_no <= 0)
l.u.line_no = 1;
diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c
index 9126f7b..942c4d1 100644
--- a/gdb/tui/tui-winsource.c
+++ b/gdb/tui/tui-winsource.c
@@ -406,7 +406,7 @@
: cursal.symtab);
}
- update_source_window_as_is (gdbarch, s, content[0].line_or_addr);
+ update_source_window_as_is (gdbarch, s, start_line_or_addr);
}
/* Scroll the source forward or backward horizontally. */
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I1fa807321cd7ad88b3cc5e41cc50f4d4e2d46271
Gerrit-Change-Number: 639
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-MessageType: newchange
^ permalink raw reply [flat|nested] 4+ messages in thread
* [review v2] Use start_line_or_addr in TUI windows
2019-11-14 23:36 [review] Use start_line_or_addr in TUI windows Tom Tromey (Code Review)
@ 2019-12-12 2:35 ` Tom Tromey (Code Review)
2019-12-20 16:20 ` [pushed] " Sourceware to Gerrit sync (Code Review)
2019-12-20 16:29 ` Sourceware to Gerrit sync (Code Review)
2 siblings, 0 replies; 4+ messages in thread
From: Tom Tromey (Code Review) @ 2019-12-12 2:35 UTC (permalink / raw)
To: gdb-patches
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/639
......................................................................
Use start_line_or_addr in TUI windows
A few spots in the TUI source and disassembly windows referred to
content[0], where start_line_or_addr is equivalent. This patch makes
this substitution.
gdb/ChangeLog
2019-12-11 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.c (tui_source_window_base::refill): Use
start_line_or_addr.
* tui/tui-source.c (tui_source_window::do_scroll_vertical): Use
start_line_or_addr.
* tui/tui-disasm.c (tui_disasm_window::do_scroll_vertical): Use
start_line_or_addr.
Change-Id: I1fa807321cd7ad88b3cc5e41cc50f4d4e2d46271
---
M gdb/ChangeLog
M gdb/tui/tui-disasm.c
M gdb/tui/tui-source.c
M gdb/tui/tui-winsource.c
4 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 387df88..6e823b0 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,14 @@
2019-12-11 Tom Tromey <tom@tromey.com>
+ * tui/tui-winsource.c (tui_source_window_base::refill): Use
+ start_line_or_addr.
+ * tui/tui-source.c (tui_source_window::do_scroll_vertical): Use
+ start_line_or_addr.
+ * tui/tui-disasm.c (tui_disasm_window::do_scroll_vertical): Use
+ start_line_or_addr.
+
+2019-12-11 Tom Tromey <tom@tromey.com>
+
* tui/tui-winsource.h (struct tui_source_window_base)
<set_contents>: Return bool.
* tui/tui-winsource.c
diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c
index 080253c..8a46bba 100644
--- a/gdb/tui/tui-disasm.c
+++ b/gdb/tui/tui-disasm.c
@@ -325,7 +325,7 @@
CORE_ADDR pc;
struct tui_line_or_address val;
- pc = content[0].line_or_addr.u.addr;
+ pc = start_line_or_addr.u.addr;
if (num_to_scroll >= 0)
num_to_scroll++;
else
diff --git a/gdb/tui/tui-source.c b/gdb/tui/tui-source.c
index b7f3814..524f232 100644
--- a/gdb/tui/tui-source.c
+++ b/gdb/tui/tui-source.c
@@ -145,14 +145,14 @@
s = cursal.symtab;
l.loa = LOA_LINE;
- l.u.line_no = content[0].line_or_addr.u.line_no
+ l.u.line_no = start_line_or_addr.u.line_no
+ num_to_scroll;
const std::vector<off_t> *offsets;
if (g_source_cache.get_line_charpos (s, &offsets)
&& l.u.line_no > offsets->size ())
/* line = s->nlines - win_info->content_size + 1; */
/* elz: fix for dts 23398. */
- l.u.line_no = content[0].line_or_addr.u.line_no;
+ l.u.line_no = start_line_or_addr.u.line_no;
if (l.u.line_no <= 0)
l.u.line_no = 1;
diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c
index fad8d7b..708c2fe 100644
--- a/gdb/tui/tui-winsource.c
+++ b/gdb/tui/tui-winsource.c
@@ -413,7 +413,7 @@
: cursal.symtab);
}
- update_source_window_as_is (gdbarch, s, content[0].line_or_addr);
+ update_source_window_as_is (gdbarch, s, start_line_or_addr);
}
/* Scroll the source forward or backward horizontally. */
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I1fa807321cd7ad88b3cc5e41cc50f4d4e2d46271
Gerrit-Change-Number: 639
Gerrit-PatchSet: 2
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-MessageType: newpatchset
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pushed] Use start_line_or_addr in TUI windows
2019-11-14 23:36 [review] Use start_line_or_addr in TUI windows Tom Tromey (Code Review)
2019-12-12 2:35 ` [review v2] " Tom Tromey (Code Review)
@ 2019-12-20 16:20 ` Sourceware to Gerrit sync (Code Review)
2019-12-20 16:29 ` Sourceware to Gerrit sync (Code Review)
2 siblings, 0 replies; 4+ messages in thread
From: Sourceware to Gerrit sync (Code Review) @ 2019-12-20 16:20 UTC (permalink / raw)
To: Tom Tromey, gdb-patches
The original change was created by Tom Tromey.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/639
......................................................................
Use start_line_or_addr in TUI windows
A few spots in the TUI source and disassembly windows referred to
content[0], where start_line_or_addr is equivalent. This patch makes
this substitution.
gdb/ChangeLog
2019-12-20 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.c (tui_source_window_base::refill): Use
start_line_or_addr.
* tui/tui-source.c (tui_source_window::do_scroll_vertical): Use
start_line_or_addr.
* tui/tui-disasm.c (tui_disasm_window::do_scroll_vertical): Use
start_line_or_addr.
Change-Id: I1fa807321cd7ad88b3cc5e41cc50f4d4e2d46271
---
M gdb/ChangeLog
M gdb/tui/tui-disasm.c
M gdb/tui/tui-source.c
M gdb/tui/tui-winsource.c
4 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2994728..fef0cfc 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,14 @@
2019-12-20 Tom Tromey <tom@tromey.com>
+ * tui/tui-winsource.c (tui_source_window_base::refill): Use
+ start_line_or_addr.
+ * tui/tui-source.c (tui_source_window::do_scroll_vertical): Use
+ start_line_or_addr.
+ * tui/tui-disasm.c (tui_disasm_window::do_scroll_vertical): Use
+ start_line_or_addr.
+
+2019-12-20 Tom Tromey <tom@tromey.com>
+
* tui/tui-winsource.h (struct tui_source_window_base)
<set_contents>: Return bool.
* tui/tui-winsource.c
diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c
index 080253c..8a46bba 100644
--- a/gdb/tui/tui-disasm.c
+++ b/gdb/tui/tui-disasm.c
@@ -325,7 +325,7 @@
CORE_ADDR pc;
struct tui_line_or_address val;
- pc = content[0].line_or_addr.u.addr;
+ pc = start_line_or_addr.u.addr;
if (num_to_scroll >= 0)
num_to_scroll++;
else
diff --git a/gdb/tui/tui-source.c b/gdb/tui/tui-source.c
index 78afc62..113195d 100644
--- a/gdb/tui/tui-source.c
+++ b/gdb/tui/tui-source.c
@@ -147,14 +147,14 @@
s = cursal.symtab;
l.loa = LOA_LINE;
- l.u.line_no = content[0].line_or_addr.u.line_no
+ l.u.line_no = start_line_or_addr.u.line_no
+ num_to_scroll;
const std::vector<off_t> *offsets;
if (g_source_cache.get_line_charpos (s, &offsets)
&& l.u.line_no > offsets->size ())
/* line = s->nlines - win_info->content_size + 1; */
/* elz: fix for dts 23398. */
- l.u.line_no = content[0].line_or_addr.u.line_no;
+ l.u.line_no = start_line_or_addr.u.line_no;
if (l.u.line_no <= 0)
l.u.line_no = 1;
diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c
index fad8d7b..708c2fe 100644
--- a/gdb/tui/tui-winsource.c
+++ b/gdb/tui/tui-winsource.c
@@ -413,7 +413,7 @@
: cursal.symtab);
}
- update_source_window_as_is (gdbarch, s, content[0].line_or_addr);
+ update_source_window_as_is (gdbarch, s, start_line_or_addr);
}
/* Scroll the source forward or backward horizontally. */
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I1fa807321cd7ad88b3cc5e41cc50f4d4e2d46271
Gerrit-Change-Number: 639
Gerrit-PatchSet: 3
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-MessageType: newpatchset
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pushed] Use start_line_or_addr in TUI windows
2019-11-14 23:36 [review] Use start_line_or_addr in TUI windows Tom Tromey (Code Review)
2019-12-12 2:35 ` [review v2] " Tom Tromey (Code Review)
2019-12-20 16:20 ` [pushed] " Sourceware to Gerrit sync (Code Review)
@ 2019-12-20 16:29 ` Sourceware to Gerrit sync (Code Review)
2 siblings, 0 replies; 4+ messages in thread
From: Sourceware to Gerrit sync (Code Review) @ 2019-12-20 16:29 UTC (permalink / raw)
To: Tom Tromey, gdb-patches
Sourceware to Gerrit sync has submitted this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/639
......................................................................
Use start_line_or_addr in TUI windows
A few spots in the TUI source and disassembly windows referred to
content[0], where start_line_or_addr is equivalent. This patch makes
this substitution.
gdb/ChangeLog
2019-12-20 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.c (tui_source_window_base::refill): Use
start_line_or_addr.
* tui/tui-source.c (tui_source_window::do_scroll_vertical): Use
start_line_or_addr.
* tui/tui-disasm.c (tui_disasm_window::do_scroll_vertical): Use
start_line_or_addr.
Change-Id: I1fa807321cd7ad88b3cc5e41cc50f4d4e2d46271
---
M gdb/ChangeLog
M gdb/tui/tui-disasm.c
M gdb/tui/tui-source.c
M gdb/tui/tui-winsource.c
4 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2994728..fef0cfc 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,14 @@
2019-12-20 Tom Tromey <tom@tromey.com>
+ * tui/tui-winsource.c (tui_source_window_base::refill): Use
+ start_line_or_addr.
+ * tui/tui-source.c (tui_source_window::do_scroll_vertical): Use
+ start_line_or_addr.
+ * tui/tui-disasm.c (tui_disasm_window::do_scroll_vertical): Use
+ start_line_or_addr.
+
+2019-12-20 Tom Tromey <tom@tromey.com>
+
* tui/tui-winsource.h (struct tui_source_window_base)
<set_contents>: Return bool.
* tui/tui-winsource.c
diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c
index 080253c..8a46bba 100644
--- a/gdb/tui/tui-disasm.c
+++ b/gdb/tui/tui-disasm.c
@@ -325,7 +325,7 @@
CORE_ADDR pc;
struct tui_line_or_address val;
- pc = content[0].line_or_addr.u.addr;
+ pc = start_line_or_addr.u.addr;
if (num_to_scroll >= 0)
num_to_scroll++;
else
diff --git a/gdb/tui/tui-source.c b/gdb/tui/tui-source.c
index 78afc62..113195d 100644
--- a/gdb/tui/tui-source.c
+++ b/gdb/tui/tui-source.c
@@ -147,14 +147,14 @@
s = cursal.symtab;
l.loa = LOA_LINE;
- l.u.line_no = content[0].line_or_addr.u.line_no
+ l.u.line_no = start_line_or_addr.u.line_no
+ num_to_scroll;
const std::vector<off_t> *offsets;
if (g_source_cache.get_line_charpos (s, &offsets)
&& l.u.line_no > offsets->size ())
/* line = s->nlines - win_info->content_size + 1; */
/* elz: fix for dts 23398. */
- l.u.line_no = content[0].line_or_addr.u.line_no;
+ l.u.line_no = start_line_or_addr.u.line_no;
if (l.u.line_no <= 0)
l.u.line_no = 1;
diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c
index fad8d7b..708c2fe 100644
--- a/gdb/tui/tui-winsource.c
+++ b/gdb/tui/tui-winsource.c
@@ -413,7 +413,7 @@
: cursal.symtab);
}
- update_source_window_as_is (gdbarch, s, content[0].line_or_addr);
+ update_source_window_as_is (gdbarch, s, start_line_or_addr);
}
/* Scroll the source forward or backward horizontally. */
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I1fa807321cd7ad88b3cc5e41cc50f4d4e2d46271
Gerrit-Change-Number: 639
Gerrit-PatchSet: 3
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-MessageType: merged
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-12-20 16:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-14 23:36 [review] Use start_line_or_addr in TUI windows Tom Tromey (Code Review)
2019-12-12 2:35 ` [review v2] " Tom Tromey (Code Review)
2019-12-20 16:20 ` [pushed] " Sourceware to Gerrit sync (Code Review)
2019-12-20 16:29 ` Sourceware to Gerrit sync (Code Review)
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).