public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb: Convert frame_show_address to return a bool
@ 2019-11-10 21:01 Andrew Burgess
  0 siblings, 0 replies; only message in thread
From: Andrew Burgess @ 2019-11-10 21:01 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=621377757c83ccc8573cc2e979e1d4ba55335c13

commit 621377757c83ccc8573cc2e979e1d4ba55335c13
Author: Andrew Burgess <andrew.burgess@embecosm.com>
Date:   Fri Nov 8 15:15:29 2019 +0000

    gdb: Convert frame_show_address to return a bool
    
    Just a clean up, should be no user visible changes after this commit.
    
    gdb/ChangeLog:
    
    	* stack.c (frame_show_address): Convert return type to bool.
    	* stack.h (frame_show_address): Likewise, and update header
    	comment.
    
    Change-Id: Iaaa9ebd4ff6534db19c5329f1c604932c747bd7f

Diff:
---
 gdb/ChangeLog | 6 ++++++
 gdb/stack.c   | 4 ++--
 gdb/stack.h   | 4 ++--
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b9d5f21..158af82 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
 2019-11-10  Andrew Burgess  <andrew.burgess@embecosm.com>
 
+	* stack.c (frame_show_address): Convert return type to bool.
+	* stack.h (frame_show_address): Likewise, and update header
+	comment.
+
+2019-11-10  Andrew Burgess  <andrew.burgess@embecosm.com>
+
 	* Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new file to the list.
 	* unittests/vec-utils-selftests.c: New file.
 	* gdbsupport/gdb_vecs.h (unordered_remove): Avoid self move assign.
diff --git a/gdb/stack.c b/gdb/stack.c
index fa057db..5af00c7 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -252,7 +252,7 @@ static int last_displayed_line = 0;
 
 /* See stack.h.  */
 
-int
+bool
 frame_show_address (struct frame_info *frame,
 		    struct symtab_and_line sal)
 {
@@ -267,7 +267,7 @@ frame_show_address (struct frame_info *frame,
 	gdb_assert (inline_skipped_frames (inferior_thread ()) > 0);
       else
 	gdb_assert (get_frame_type (get_next_frame (frame)) == INLINE_FRAME);
-      return 0;
+      return false;
     }
 
   return get_frame_pc (frame) != sal.pc;
diff --git a/gdb/stack.h b/gdb/stack.h
index dda4fc9..28d2273 100644
--- a/gdb/stack.h
+++ b/gdb/stack.h
@@ -49,10 +49,10 @@ void iterate_over_block_local_vars (const struct block *block,
 
 void get_user_print_what_frame_info (gdb::optional<enum print_what> *what);
 
-/* Return 1 if we should display the address in addition to the location,
+/* Return true if we should display the address in addition to the location,
    because we are in the middle of a statement.  */
 
-int frame_show_address (struct frame_info *frame, struct symtab_and_line sal);
+bool frame_show_address (struct frame_info *frame, struct symtab_and_line sal);
 
 /* Get or set the last displayed symtab and line, which is, e.g. where we set a
  * breakpoint when `break' is supplied with no arguments.  */


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-11-10 21:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-10 21:01 [binutils-gdb] gdb: Convert frame_show_address to return a bool Andrew Burgess

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).