]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Return bool from block_starting_point_at
authorTom Tromey <tom@tromey.com>
Wed, 19 Nov 2025 20:32:00 +0000 (13:32 -0700)
committerTom Tromey <tom@tromey.com>
Wed, 19 Nov 2025 20:32:00 +0000 (13:32 -0700)
This changes block_starting_point_at to return bool.

gdb/inline-frame.c

index 2191282c0c5f445162c2765a39510ca4c8a3b844..5ec18e90547fe9471324b4f343058d58ac9c8d35 100644 (file)
@@ -281,11 +281,11 @@ const struct frame_unwind_legacy inline_frame_unwind (
   inline_frame_sniffer
 );
 
-/* Return non-zero if BLOCK, an inlined function block containing PC,
+/* Return true if BLOCK, an inlined function block containing PC,
    has a group of contiguous instructions starting at PC (but not
    before it).  */
 
-static int
+static bool
 block_starting_point_at (CORE_ADDR pc, const struct block *block)
 {
   const struct blockvector *bv;
@@ -293,19 +293,19 @@ block_starting_point_at (CORE_ADDR pc, const struct block *block)
 
   bv = blockvector_for_pc (pc, NULL);
   if (bv->map () == nullptr)
-    return 0;
+    return false;
 
   new_block = (const struct block *) bv->map ()->find (pc - 1);
   if (new_block == NULL)
-    return 1;
+    return true;
 
   if (new_block == block || block->contains (new_block))
-    return 0;
+    return false;
 
   /* The immediately preceding address belongs to a different block,
      which is not a child of this one.  Treat this as an entrance into
      BLOCK.  */
-  return 1;
+  return true;
 }
 
 /* Loop over the stop chain and determine if execution stopped in an