* [review] Change tui_show_frame_info to return bool
@ 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/+/651
......................................................................
Change tui_show_frame_info to return bool
This changes tui_show_frame_info to return bool.
gdb/ChangeLog
2019-11-14 Tom Tromey <tom@tromey.com>
* tui/tui-stack.h (tui_show_frame_info): Return bool.
* tui/tui-stack.c (tui_show_frame_info): Return bool.
* tui/tui-hooks.c (tui_refresh_frame_and_register_information):
Update.
Change-Id: Id1374f04f919c30a9f50c1beeb70cbc10b9a8f3b
---
M gdb/ChangeLog
M gdb/tui/tui-hooks.c
M gdb/tui/tui-stack.c
M gdb/tui/tui-stack.h
4 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 51d6f49..c8b9f19 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
2019-11-14 Tom Tromey <tom@tromey.com>
+ * tui/tui-stack.h (tui_show_frame_info): Return bool.
+ * tui/tui-stack.c (tui_show_frame_info): Return bool.
+ * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
+ Update.
+
+2019-11-14 Tom Tromey <tom@tromey.com>
+
PR tui/18932:
* tui/tui-hooks.c (tui_refresh_frame_and_register_information):
Rename parameters. Handle the not-from-stack-frame case.
diff --git a/gdb/tui/tui-hooks.c b/gdb/tui/tui-hooks.c
index 44019f6..5600a46 100644
--- a/gdb/tui/tui-hooks.c
+++ b/gdb/tui/tui-hooks.c
@@ -133,7 +133,7 @@
/* Display the frame position (even if there is no symbols or
the PC is not known). */
- int frame_info_changed_p = tui_show_frame_info (fi);
+ bool frame_info_changed_p = tui_show_frame_info (fi);
/* Refresh the register window if it's visible. */
if (tui_is_window_visible (DATA_WIN)
diff --git a/gdb/tui/tui-stack.c b/gdb/tui/tui-stack.c
index d244343..3f606cb 100644
--- a/gdb/tui/tui-stack.c
+++ b/gdb/tui/tui-stack.c
@@ -301,10 +301,10 @@
/* Function to print the frame information for the TUI. The windows are
refreshed only if frame information has changed since the last refresh.
- Return 1 if frame information has changed (and windows subsequently
- refreshed), 0 otherwise. */
+ Return true if frame information has changed (and windows
+ subsequently refreshed), false otherwise. */
-int
+bool
tui_show_frame_info (struct frame_info *fi)
{
bool locator_changed_p;
@@ -329,15 +329,13 @@
not changed. If frame information has not changed, then the windows'
contents will not change. So don't bother refreshing the windows. */
if (!locator_changed_p)
- return 0;
+ return false;
for (struct tui_source_window_base *win_info : tui_source_windows ())
{
win_info->maybe_update (fi, sal);
win_info->update_exec_info ();
}
-
- return 1;
}
else
{
@@ -346,13 +344,13 @@
locator_changed_p = locator->set_locator_info (NULL, sal, "");
if (!locator_changed_p)
- return 0;
+ return false;
for (struct tui_source_window_base *win_info : tui_source_windows ())
win_info->erase_source_content ();
-
- return 1;
}
+
+ return true;
}
void
diff --git a/gdb/tui/tui-stack.h b/gdb/tui/tui-stack.h
index 17fc68d..13bb482 100644
--- a/gdb/tui/tui-stack.h
+++ b/gdb/tui/tui-stack.h
@@ -68,6 +68,6 @@
extern void tui_update_locator_fullname (struct symtab *symtab);
extern void tui_show_locator_content (void);
-extern int tui_show_frame_info (struct frame_info *);
+extern bool tui_show_frame_info (struct frame_info *);
#endif /* TUI_TUI_STACK_H */
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: Id1374f04f919c30a9f50c1beeb70cbc10b9a8f3b
Gerrit-Change-Number: 651
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-MessageType: newchange
^ permalink raw reply [flat|nested] 4+ messages in thread
* [review v2] Change tui_show_frame_info to return bool
2019-11-14 23:36 [review] Change tui_show_frame_info to return bool Tom Tromey (Code Review)
@ 2019-12-12 2:35 ` Tom Tromey (Code Review)
2019-12-20 16:21 ` [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/+/651
......................................................................
Change tui_show_frame_info to return bool
This changes tui_show_frame_info to return bool.
2019-12-11 Tom Tromey <tom@tromey.com>
* tui/tui-stack.h (tui_show_frame_info): Return bool.
* tui/tui-stack.c (tui_show_frame_info): Return bool.
* tui/tui-hooks.c (tui_refresh_frame_and_register_information):
Update.
Change-Id: Id1374f04f919c30a9f50c1beeb70cbc10b9a8f3b
---
M gdb/ChangeLog
M gdb/tui/tui-hooks.c
M gdb/tui/tui-stack.c
M gdb/tui/tui-stack.h
4 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c9e416a..8292ea7 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
2019-12-11 Tom Tromey <tom@tromey.com>
+ * tui/tui-stack.h (tui_show_frame_info): Return bool.
+ * tui/tui-stack.c (tui_show_frame_info): Return bool.
+ * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
+ Update.
+
+2019-12-11 Tom Tromey <tom@tromey.com>
+
PR tui/18932:
* tui/tui-hooks.c (tui_refresh_frame_and_register_information):
Rename parameters. Handle the not-from-stack-frame case.
diff --git a/gdb/tui/tui-hooks.c b/gdb/tui/tui-hooks.c
index deb10b0..8576bb8 100644
--- a/gdb/tui/tui-hooks.c
+++ b/gdb/tui/tui-hooks.c
@@ -133,7 +133,7 @@
/* Display the frame position (even if there is no symbols or
the PC is not known). */
- int frame_info_changed_p = tui_show_frame_info (fi);
+ bool frame_info_changed_p = tui_show_frame_info (fi);
/* Refresh the register window if it's visible. */
if (tui_is_window_visible (DATA_WIN)
diff --git a/gdb/tui/tui-stack.c b/gdb/tui/tui-stack.c
index d244343..3f606cb 100644
--- a/gdb/tui/tui-stack.c
+++ b/gdb/tui/tui-stack.c
@@ -301,10 +301,10 @@
/* Function to print the frame information for the TUI. The windows are
refreshed only if frame information has changed since the last refresh.
- Return 1 if frame information has changed (and windows subsequently
- refreshed), 0 otherwise. */
+ Return true if frame information has changed (and windows
+ subsequently refreshed), false otherwise. */
-int
+bool
tui_show_frame_info (struct frame_info *fi)
{
bool locator_changed_p;
@@ -329,15 +329,13 @@
not changed. If frame information has not changed, then the windows'
contents will not change. So don't bother refreshing the windows. */
if (!locator_changed_p)
- return 0;
+ return false;
for (struct tui_source_window_base *win_info : tui_source_windows ())
{
win_info->maybe_update (fi, sal);
win_info->update_exec_info ();
}
-
- return 1;
}
else
{
@@ -346,13 +344,13 @@
locator_changed_p = locator->set_locator_info (NULL, sal, "");
if (!locator_changed_p)
- return 0;
+ return false;
for (struct tui_source_window_base *win_info : tui_source_windows ())
win_info->erase_source_content ();
-
- return 1;
}
+
+ return true;
}
void
diff --git a/gdb/tui/tui-stack.h b/gdb/tui/tui-stack.h
index 3bfe529..0a928f3 100644
--- a/gdb/tui/tui-stack.h
+++ b/gdb/tui/tui-stack.h
@@ -78,6 +78,6 @@
extern void tui_update_locator_fullname (struct symtab *symtab);
extern void tui_show_locator_content (void);
-extern int tui_show_frame_info (struct frame_info *);
+extern bool tui_show_frame_info (struct frame_info *);
#endif /* TUI_TUI_STACK_H */
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: Id1374f04f919c30a9f50c1beeb70cbc10b9a8f3b
Gerrit-Change-Number: 651
Gerrit-PatchSet: 2
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-MessageType: newpatchset
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pushed] Change tui_show_frame_info to return bool
2019-11-14 23:36 [review] Change tui_show_frame_info to return bool Tom Tromey (Code Review)
2019-12-12 2:35 ` [review v2] " Tom Tromey (Code Review)
@ 2019-12-20 16:21 ` 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:21 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/+/651
......................................................................
Change tui_show_frame_info to return bool
This changes tui_show_frame_info to return bool.
gdb/ChangeLog
2019-12-20 Tom Tromey <tom@tromey.com>
* tui/tui-stack.h (tui_show_frame_info): Return bool.
* tui/tui-stack.c (tui_show_frame_info): Return bool.
* tui/tui-hooks.c (tui_refresh_frame_and_register_information):
Update.
Change-Id: Id1374f04f919c30a9f50c1beeb70cbc10b9a8f3b
---
M gdb/ChangeLog
M gdb/tui/tui-hooks.c
M gdb/tui/tui-stack.c
M gdb/tui/tui-stack.h
4 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c34d112..fa17958 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
2019-12-20 Tom Tromey <tom@tromey.com>
+ * tui/tui-stack.h (tui_show_frame_info): Return bool.
+ * tui/tui-stack.c (tui_show_frame_info): Return bool.
+ * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
+ Update.
+
+2019-12-20 Tom Tromey <tom@tromey.com>
+
PR tui/18932:
* tui/tui-hooks.c (tui_refresh_frame_and_register_information):
Rename parameters. Handle the not-from-stack-frame case.
diff --git a/gdb/tui/tui-hooks.c b/gdb/tui/tui-hooks.c
index deb10b0..8576bb8 100644
--- a/gdb/tui/tui-hooks.c
+++ b/gdb/tui/tui-hooks.c
@@ -133,7 +133,7 @@
/* Display the frame position (even if there is no symbols or
the PC is not known). */
- int frame_info_changed_p = tui_show_frame_info (fi);
+ bool frame_info_changed_p = tui_show_frame_info (fi);
/* Refresh the register window if it's visible. */
if (tui_is_window_visible (DATA_WIN)
diff --git a/gdb/tui/tui-stack.c b/gdb/tui/tui-stack.c
index d244343..3f606cb 100644
--- a/gdb/tui/tui-stack.c
+++ b/gdb/tui/tui-stack.c
@@ -301,10 +301,10 @@
/* Function to print the frame information for the TUI. The windows are
refreshed only if frame information has changed since the last refresh.
- Return 1 if frame information has changed (and windows subsequently
- refreshed), 0 otherwise. */
+ Return true if frame information has changed (and windows
+ subsequently refreshed), false otherwise. */
-int
+bool
tui_show_frame_info (struct frame_info *fi)
{
bool locator_changed_p;
@@ -329,15 +329,13 @@
not changed. If frame information has not changed, then the windows'
contents will not change. So don't bother refreshing the windows. */
if (!locator_changed_p)
- return 0;
+ return false;
for (struct tui_source_window_base *win_info : tui_source_windows ())
{
win_info->maybe_update (fi, sal);
win_info->update_exec_info ();
}
-
- return 1;
}
else
{
@@ -346,13 +344,13 @@
locator_changed_p = locator->set_locator_info (NULL, sal, "");
if (!locator_changed_p)
- return 0;
+ return false;
for (struct tui_source_window_base *win_info : tui_source_windows ())
win_info->erase_source_content ();
-
- return 1;
}
+
+ return true;
}
void
diff --git a/gdb/tui/tui-stack.h b/gdb/tui/tui-stack.h
index 3bfe529..0a928f3 100644
--- a/gdb/tui/tui-stack.h
+++ b/gdb/tui/tui-stack.h
@@ -78,6 +78,6 @@
extern void tui_update_locator_fullname (struct symtab *symtab);
extern void tui_show_locator_content (void);
-extern int tui_show_frame_info (struct frame_info *);
+extern bool tui_show_frame_info (struct frame_info *);
#endif /* TUI_TUI_STACK_H */
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: Id1374f04f919c30a9f50c1beeb70cbc10b9a8f3b
Gerrit-Change-Number: 651
Gerrit-PatchSet: 3
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-MessageType: newpatchset
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pushed] Change tui_show_frame_info to return bool
2019-11-14 23:36 [review] Change tui_show_frame_info to return bool Tom Tromey (Code Review)
2019-12-12 2:35 ` [review v2] " Tom Tromey (Code Review)
2019-12-20 16:21 ` [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/+/651
......................................................................
Change tui_show_frame_info to return bool
This changes tui_show_frame_info to return bool.
gdb/ChangeLog
2019-12-20 Tom Tromey <tom@tromey.com>
* tui/tui-stack.h (tui_show_frame_info): Return bool.
* tui/tui-stack.c (tui_show_frame_info): Return bool.
* tui/tui-hooks.c (tui_refresh_frame_and_register_information):
Update.
Change-Id: Id1374f04f919c30a9f50c1beeb70cbc10b9a8f3b
---
M gdb/ChangeLog
M gdb/tui/tui-hooks.c
M gdb/tui/tui-stack.c
M gdb/tui/tui-stack.h
4 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c34d112..fa17958 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
2019-12-20 Tom Tromey <tom@tromey.com>
+ * tui/tui-stack.h (tui_show_frame_info): Return bool.
+ * tui/tui-stack.c (tui_show_frame_info): Return bool.
+ * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
+ Update.
+
+2019-12-20 Tom Tromey <tom@tromey.com>
+
PR tui/18932:
* tui/tui-hooks.c (tui_refresh_frame_and_register_information):
Rename parameters. Handle the not-from-stack-frame case.
diff --git a/gdb/tui/tui-hooks.c b/gdb/tui/tui-hooks.c
index deb10b0..8576bb8 100644
--- a/gdb/tui/tui-hooks.c
+++ b/gdb/tui/tui-hooks.c
@@ -133,7 +133,7 @@
/* Display the frame position (even if there is no symbols or
the PC is not known). */
- int frame_info_changed_p = tui_show_frame_info (fi);
+ bool frame_info_changed_p = tui_show_frame_info (fi);
/* Refresh the register window if it's visible. */
if (tui_is_window_visible (DATA_WIN)
diff --git a/gdb/tui/tui-stack.c b/gdb/tui/tui-stack.c
index d244343..3f606cb 100644
--- a/gdb/tui/tui-stack.c
+++ b/gdb/tui/tui-stack.c
@@ -301,10 +301,10 @@
/* Function to print the frame information for the TUI. The windows are
refreshed only if frame information has changed since the last refresh.
- Return 1 if frame information has changed (and windows subsequently
- refreshed), 0 otherwise. */
+ Return true if frame information has changed (and windows
+ subsequently refreshed), false otherwise. */
-int
+bool
tui_show_frame_info (struct frame_info *fi)
{
bool locator_changed_p;
@@ -329,15 +329,13 @@
not changed. If frame information has not changed, then the windows'
contents will not change. So don't bother refreshing the windows. */
if (!locator_changed_p)
- return 0;
+ return false;
for (struct tui_source_window_base *win_info : tui_source_windows ())
{
win_info->maybe_update (fi, sal);
win_info->update_exec_info ();
}
-
- return 1;
}
else
{
@@ -346,13 +344,13 @@
locator_changed_p = locator->set_locator_info (NULL, sal, "");
if (!locator_changed_p)
- return 0;
+ return false;
for (struct tui_source_window_base *win_info : tui_source_windows ())
win_info->erase_source_content ();
-
- return 1;
}
+
+ return true;
}
void
diff --git a/gdb/tui/tui-stack.h b/gdb/tui/tui-stack.h
index 3bfe529..0a928f3 100644
--- a/gdb/tui/tui-stack.h
+++ b/gdb/tui/tui-stack.h
@@ -78,6 +78,6 @@
extern void tui_update_locator_fullname (struct symtab *symtab);
extern void tui_show_locator_content (void);
-extern int tui_show_frame_info (struct frame_info *);
+extern bool tui_show_frame_info (struct frame_info *);
#endif /* TUI_TUI_STACK_H */
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: Id1374f04f919c30a9f50c1beeb70cbc10b9a8f3b
Gerrit-Change-Number: 651
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] Change tui_show_frame_info to return bool Tom Tromey (Code Review)
2019-12-12 2:35 ` [review v2] " Tom Tromey (Code Review)
2019-12-20 16:21 ` [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