gdb: Convert frame_show_address to return a bool
authorAndrew Burgess <andrew.burgess@embecosm.com>
Fri, 8 Nov 2019 15:15:29 +0000 (15:15 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Sun, 10 Nov 2019 21:00:13 +0000 (21:00 +0000)
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

gdb/ChangeLog
gdb/stack.c
gdb/stack.h

index b9d5f21e225f0cbef696b169d4d1836e8b2ac853..158af8250200a6fc5f06855bec472cc94a01caab 100644 (file)
@@ -1,3 +1,9 @@
+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.
index fa057db6e356b7281be4cf60449855120986e110..5af00c708e45eb6d21f9a21fd5e2d6da6c7912de 100644 (file)
@@ -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;
index dda4fc9f6629674b07f0203e7e33144ae7ad3383..28d22730b18a65587969beef4eabd9291d2ed774 100644 (file)
@@ -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.  */
This page took 0.032521 seconds and 4 git commands to generate.