]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: remove BLOCK_FUNCTION macro
authorSimon Marchi <simon.marchi@efficios.com>
Fri, 28 Jan 2022 16:19:50 +0000 (11:19 -0500)
committerSimon Marchi <simon.marchi@polymtl.ca>
Thu, 28 Apr 2022 02:05:03 +0000 (22:05 -0400)
Replace with equivalent methods.

Change-Id: I31ec00f5bf85335c8b23d306ca0fe0b84d489101

24 files changed:
gdb/ada-lang.c
gdb/block.c
gdb/block.h
gdb/blockframe.c
gdb/buildsym.c
gdb/compile/compile-c-symbols.c
gdb/compile/compile-object-load.c
gdb/cp-namespace.c
gdb/f-valprint.c
gdb/findvar.c
gdb/go-lang.c
gdb/guile/scm-block.c
gdb/guile/scm-frame.c
gdb/inline-frame.c
gdb/jit.c
gdb/linespec.c
gdb/mdebugread.c
gdb/mi/mi-cmd-stack.c
gdb/python/py-block.c
gdb/python/py-frame.c
gdb/stack.c
gdb/symmisc.c
gdb/symtab.c
gdb/tracepoint.c

index bb9a16f8fe07ad1fe9d4e0d5b8dc3b74163889f2..dfcaf12104aa4a7cc28dadd401c522fe461973fc 100644 (file)
@@ -5331,7 +5331,7 @@ ada_add_local_symbols (std::vector<struct block_symbol> &result,
       /* If we found a non-function match, assume that's the one.  We
         only check this when finding a function boundary, so that we
         can accumulate all results from intervening blocks first.  */
-      if (BLOCK_FUNCTION (block) != nullptr && is_nonfunction (result))
+      if (block->function () != nullptr && is_nonfunction (result))
        return;
 
       block = BLOCK_SUPERBLOCK (block);
@@ -13038,7 +13038,7 @@ ada_add_exceptions_from_frame (compiled_regex *preg,
                }
            }
        }
-      if (BLOCK_FUNCTION (block) != NULL)
+      if (block->function () != NULL)
        break;
       block = BLOCK_SUPERBLOCK (block);
     }
index a4678ca6a84b43cf1039953e9e448b8161851903..b70b8e22a91ea992d5ff305afe90ceb9b28372c2 100644 (file)
@@ -47,8 +47,8 @@ block_objfile (const struct block *block)
 {
   const struct global_block *global_block;
 
-  if (BLOCK_FUNCTION (block) != NULL)
-    return BLOCK_FUNCTION (block)->objfile ();
+  if (block->function () != nullptr)
+    return block->function ()->objfile ();
 
   global_block = (struct global_block *) block_global_block (block);
   return global_block->compunit_symtab->objfile ();
@@ -59,8 +59,8 @@ block_objfile (const struct block *block)
 struct gdbarch *
 block_gdbarch (const struct block *block)
 {
-  if (BLOCK_FUNCTION (block) != NULL)
-    return BLOCK_FUNCTION (block)->arch ();
+  if (block->function () != nullptr)
+    return block->function ()->arch ();
 
   return block_objfile (block)->arch ();
 }
@@ -80,7 +80,7 @@ contained_in (const struct block *a, const struct block *b,
        return true;
       /* If A is a function block, then A cannot be contained in B,
         except if A was inlined.  */
-      if (!allow_nested && BLOCK_FUNCTION (a) != NULL && !block_inlined_p (a))
+      if (!allow_nested && a->function () != NULL && !block_inlined_p (a))
        return false;
       a = BLOCK_SUPERBLOCK (a);
     }
@@ -98,11 +98,11 @@ contained_in (const struct block *a, const struct block *b,
 struct symbol *
 block_linkage_function (const struct block *bl)
 {
-  while ((BLOCK_FUNCTION (bl) == NULL || block_inlined_p (bl))
+  while ((bl->function () == NULL || block_inlined_p (bl))
         && BLOCK_SUPERBLOCK (bl) != NULL)
     bl = BLOCK_SUPERBLOCK (bl);
 
-  return BLOCK_FUNCTION (bl);
+  return bl->function ();
 }
 
 /* Return the symbol for the function which contains a specified
@@ -113,10 +113,10 @@ block_linkage_function (const struct block *bl)
 struct symbol *
 block_containing_function (const struct block *bl)
 {
-  while (BLOCK_FUNCTION (bl) == NULL && BLOCK_SUPERBLOCK (bl) != NULL)
+  while (bl->function () == NULL && BLOCK_SUPERBLOCK (bl) != NULL)
     bl = BLOCK_SUPERBLOCK (bl);
 
-  return BLOCK_FUNCTION (bl);
+  return bl->function ();
 }
 
 /* Return one if BL represents an inlined function.  */
@@ -124,7 +124,7 @@ block_containing_function (const struct block *bl)
 int
 block_inlined_p (const struct block *bl)
 {
-  return BLOCK_FUNCTION (bl) != NULL && BLOCK_FUNCTION (bl)->is_inlined ();
+  return bl->function () != NULL && bl->function ()->is_inlined ();
 }
 
 /* A helper function that checks whether PC is in the blockvector BL.
@@ -433,7 +433,7 @@ block_static_link (const struct block *block)
 
   /* Only objfile-owned blocks that materialize top function scopes can have
      static links.  */
-  if (objfile == NULL || BLOCK_FUNCTION (block) == NULL)
+  if (objfile == NULL || block->function () == NULL)
     return NULL;
 
   return (struct dynamic_prop *) objfile_lookup_static_link (objfile, block);
@@ -714,7 +714,7 @@ block_lookup_symbol (const struct block *block, const char *name,
 
   lookup_name_info lookup_name (name, match_type);
 
-  if (!BLOCK_FUNCTION (block))
+  if (!block->function ())
     {
       struct symbol *other = NULL;
 
index 7fe982407f857c5f2a546a9ee98d6d7fb12aaba7..0330b6de4d20957d5776f3679dc5d97b260fade5 100644 (file)
@@ -106,6 +106,14 @@ struct block
   void set_end (CORE_ADDR end)
   { m_end = end; }
 
+  /* Return this block's function symbol.  */
+  symbol *function () const
+  { return m_function; }
+
+  /* Set this block's function symbol.  */
+  void set_function (symbol *function)
+  { m_function = function; }
+
   /* Addresses in the executable code that are in this block.  */
 
   CORE_ADDR m_start;
@@ -114,7 +122,7 @@ struct block
   /* The symbol that names this block, if the block is the body of a
      function (real or inlined); otherwise, zero.  */
 
-  struct symbol *function;
+  struct symbol *m_function;
 
   /* The `struct block' for the containing block, or 0 if none.
 
@@ -154,7 +162,6 @@ struct global_block
   struct compunit_symtab *compunit_symtab;
 };
 
-#define BLOCK_FUNCTION(bl)     (bl)->function
 #define BLOCK_SUPERBLOCK(bl)   (bl)->superblock
 #define BLOCK_MULTIDICT(bl)    (bl)->multidict
 #define BLOCK_NAMESPACE(bl)    (bl)->namespace_info
index fec7f05305791226335e322b9a3744498e5cee93..aaf76953648a2629b3aa8677c4e67baedfdecd59 100644 (file)
@@ -122,10 +122,10 @@ get_frame_function (struct frame_info *frame)
   if (bl == NULL)
     return NULL;
 
-  while (BLOCK_FUNCTION (bl) == NULL && BLOCK_SUPERBLOCK (bl) != NULL)
+  while (bl->function () == NULL && BLOCK_SUPERBLOCK (bl) != NULL)
     bl = BLOCK_SUPERBLOCK (bl);
 
-  return BLOCK_FUNCTION (bl);
+  return bl->function ();
 }
 \f
 
index 7db9f3441779530d36cca653e59d4b80989a6173..f761444fff4dd3faf84cf30da818f373e01fae79 100644 (file)
@@ -244,7 +244,7 @@ buildsym_compunit::finish_block_internal
       struct type *ftype = symbol->type ();
       struct mdict_iterator miter;
       symbol->set_value_block (block);
-      BLOCK_FUNCTION (block) = symbol;
+      block->set_function (symbol);
 
       if (ftype->num_fields () <= 0)
        {
@@ -287,9 +287,7 @@ buildsym_compunit::finish_block_internal
        }
     }
   else
-    {
-      BLOCK_FUNCTION (block) = NULL;
-    }
+    block->set_function (nullptr);
 
   if (static_link != NULL)
     objfile_register_static_link (m_objfile, block, static_link);
@@ -342,7 +340,7 @@ buildsym_compunit::finish_block_internal
             Skip blocks which correspond to a function; they're not
             physically nested inside this other blocks, only
             lexically nested.  */
-         if (BLOCK_FUNCTION (pblock->block) == NULL
+         if (pblock->block->function () == NULL
              && (pblock->block->start () < block->start ()
                  || pblock->block->end () > block->end ()))
            {
@@ -1008,9 +1006,9 @@ buildsym_compunit::end_compunit_symtab_with_blockvector
 
        /* Inlined functions may have symbols not in the global or
           static symbol lists.  */
-       if (BLOCK_FUNCTION (block) != NULL)
-         if (BLOCK_FUNCTION (block)->symtab () == NULL)
-           BLOCK_FUNCTION (block)->set_symtab (symtab);
+       if (block->function () != nullptr
+           && block->function ()->symtab () == nullptr)
+           block->function ()->set_symtab (symtab);
 
        /* Note that we only want to fix up symbols from the local
           blocks, not blocks coming from included symtabs.  That is why
index d49ecdab92f380792f2deaf64efc4793048e6e26..9e13d7650ddb8a3195cbed88e666ea646341c1aa 100644 (file)
@@ -645,7 +645,7 @@ generate_c_for_variable_locations (compile_instance *compiler,
 
       /* If we just finished the outermost block of a function, we're
         done.  */
-      if (BLOCK_FUNCTION (block) != NULL)
+      if (block->function () != NULL)
        break;
       block = BLOCK_SUPERBLOCK (block);
     }
index 2303381b49af09a7e325b7cfe161c3f92fe08b8a..89a47859c2207e1998c632aaaa295fd26bc13124 100644 (file)
@@ -431,7 +431,7 @@ get_out_value_type (struct symbol *func_sym, struct objfile *objfile,
       const struct block *function_block;
 
       block = BLOCKVECTOR_BLOCK (bv, block_loop);
-      if (BLOCK_FUNCTION (block) != NULL)
+      if (block->function () != NULL)
        continue;
       gdb_val_sym = block_lookup_symbol (block,
                                         COMPILE_I_EXPR_VAL,
@@ -445,7 +445,7 @@ get_out_value_type (struct symbol *func_sym, struct objfile *objfile,
             && function_block != BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK))
        {
          function_block = BLOCK_SUPERBLOCK (function_block);
-         function = BLOCK_FUNCTION (function_block);
+         function = function_block->function ();
          if (function != NULL)
            break;
        }
index b0fa33705ee1993bd5904a07787f3dcd31c1f4d3..d84486e8bf7746fc26115755bc1e65f61a79a4e5 100644 (file)
@@ -504,7 +504,7 @@ cp_lookup_symbol_imports_or_template (const char *scope,
                                      const struct block *block,
                                      const domain_enum domain)
 {
-  struct symbol *function = BLOCK_FUNCTION (block);
+  struct symbol *function = block->function ();
   struct block_symbol result;
 
   if (symbol_lookup_debug)
index 4f95b224d732d0f69976ed9ef7b08708f7688eeb..f977d8cad96614b7ae3d63e982703bc092ec2e57 100644 (file)
@@ -688,7 +688,7 @@ info_common_command (const char *comname, int from_tty)
       info_common_command_for_block (block, comname, &values_printed);
       /* After handling the function's top-level block, stop.  Don't
         continue to its superblock, the block of per-file symbols.  */
-      if (BLOCK_FUNCTION (block))
+      if (block->function ())
        break;
       block = BLOCK_SUPERBLOCK (block);
     }
index 067fb3f67570ead7478c02b00138d6feffb0f6dd..2e2b10bb6254a3a1d38971a6c155ea3346f429e2 100644 (file)
@@ -534,7 +534,7 @@ get_hosting_frame (struct symbol *var, const struct block *var_block,
       /* Assuming we have a block for this frame: if we are at the function
         level, the immediate upper lexical block is in an outer function:
         follow the static link.  */
-      else if (BLOCK_FUNCTION (frame_block))
+      else if (frame_block->function ())
        {
          const struct dynamic_prop *static_link
            = block_static_link (frame_block);
@@ -571,11 +571,11 @@ get_hosting_frame (struct symbol *var, const struct block *var_block,
       frame = block_innermost_frame (var_block);
       if (frame == NULL)
        {
-         if (BLOCK_FUNCTION (var_block)
+         if (var_block->function ()
              && !block_inlined_p (var_block)
-             && BLOCK_FUNCTION (var_block)->print_name ())
+             && var_block->function ()->print_name ())
            error (_("No frame is currently executing in block %s."),
-                  BLOCK_FUNCTION (var_block)->print_name ());
+                  var_block->function ()->print_name ());
          else
            error (_("No frame is currently executing in specified"
                     " block"));
index 74b8b214abbedc308e222d224ffbf68b011c4cd8..b4d85b06dd9daf797b931956f6afacbf1d135dc5 100644 (file)
@@ -418,7 +418,7 @@ go_block_package_name (const struct block *block)
 {
   while (block != NULL)
     {
-      struct symbol *function = BLOCK_FUNCTION (block);
+      struct symbol *function = block->function ();
 
       if (function != NULL)
        {
index 921225dcf474eb4447cf5270be3bf1e2d89d733b..1683ed1ac8aea1cdb98304e9f430bccde785a4d2 100644 (file)
@@ -156,8 +156,8 @@ bkscm_print_block_smob (SCM self, SCM port, scm_print_state *pstate)
   else if (BLOCK_SUPERBLOCK (BLOCK_SUPERBLOCK (b)) == NULL)
     gdbscm_printf (port, " static");
 
-  if (BLOCK_FUNCTION (b) != NULL)
-    gdbscm_printf (port, " %s", BLOCK_FUNCTION (b)->print_name ());
+  if (b->function () != NULL)
+    gdbscm_printf (port, " %s", b->function ()->print_name ());
 
   gdbscm_printf (port, " %s-%s",
                 hex_string (b->start ()), hex_string (b->end ()));
@@ -404,7 +404,7 @@ gdbscm_block_function (SCM self)
   const struct block *block = b_smob->block;
   struct symbol *sym;
 
-  sym = BLOCK_FUNCTION (block);
+  sym = block->function ();
 
   if (sym != NULL)
     return syscm_scm_from_symbol (sym);
index e53c8602322b4f0be31103fc9f49e83b069d8a4f..f0de7c368f917b451fc977feae1497d4b1abd9be 100644 (file)
@@ -611,11 +611,11 @@ gdbscm_frame_block (SCM self)
     }
 
   for (fn_block = block;
-       fn_block != NULL && BLOCK_FUNCTION (fn_block) == NULL;
+       fn_block != NULL && fn_block->function () == NULL;
        fn_block = BLOCK_SUPERBLOCK (fn_block))
     continue;
 
-  if (block == NULL || fn_block == NULL || BLOCK_FUNCTION (fn_block) == NULL)
+  if (block == NULL || fn_block == NULL || fn_block->function () == NULL)
     {
       scm_misc_error (FUNC_NAME, _("cannot find block for frame"),
                      scm_list_1 (self));
@@ -624,7 +624,7 @@ gdbscm_frame_block (SCM self)
   if (block != NULL)
     {
       return bkscm_scm_from_block
-       (block, BLOCK_FUNCTION (fn_block)->objfile ());
+       (block, fn_block->function ()->objfile ());
     }
 
   return SCM_BOOL_F;
index bcdf36cd067ec3a026d0d947067f718afdd7177b..95cc80b7a1c18e9275ada1c6a52dc06295d03075 100644 (file)
@@ -230,7 +230,7 @@ inline_frame_sniffer (const struct frame_unwind *self,
     {
       if (block_inlined_p (cur_block))
        depth++;
-      else if (BLOCK_FUNCTION (cur_block) != NULL)
+      else if (cur_block->function () != NULL)
        break;
 
       cur_block = BLOCK_SUPERBLOCK (cur_block);
@@ -372,12 +372,12 @@ skip_inline_frames (thread_info *thread, bpstat *stop_chain)
                    break;
 
                  skip_count++;
-                 skipped_syms.push_back (BLOCK_FUNCTION (cur_block));
+                 skipped_syms.push_back (cur_block->function ());
                }
              else
                break;
            }
-         else if (BLOCK_FUNCTION (cur_block) != NULL)
+         else if (cur_block->function () != NULL)
            break;
 
          cur_block = BLOCK_SUPERBLOCK (cur_block);
index 49db391f80c04fe44d55fe16609dba6ff3669467..17dfdd9ef24f4bd0d1252df7a3fa31b3dc761cc5 100644 (file)
--- a/gdb/jit.c
+++ b/gdb/jit.c
@@ -596,7 +596,7 @@ finalize_symtab (struct gdb_symtab *stab, struct objfile *objfile)
       block_name->m_name = obstack_strdup (&objfile->objfile_obstack,
                                           gdb_block_iter.name.get ());
 
-      BLOCK_FUNCTION (new_block) = block_name;
+      new_block->set_function (block_name);
 
       BLOCKVECTOR_BLOCK (bv, block_idx) = new_block;
       if (begin > new_block->start ())
index 61ad69dd882d65b05b3ae68f8ac1b38ce22c51b6..90e4c813e4e09f2d0942fcb533b5eb558f59017c 100644 (file)
@@ -3967,14 +3967,14 @@ find_label_symbols (struct linespec_state *self,
       block = get_current_search_block ();
 
       for (;
-          block && !BLOCK_FUNCTION (block);
+          block && !block->function ();
           block = BLOCK_SUPERBLOCK (block))
        ;
 
       if (!block)
        return {};
 
-      fn_sym = BLOCK_FUNCTION (block);
+      fn_sym = block->function ();
 
       find_label_symbols_in_block (block, name, fn_sym, completion_mode,
                                   &result, label_funcs_ret);
index 1565a86bad0128d3f927e3458b225d85e17ed8d4..87d2fb1d477725f02384e397d8919d7b2a660814 100644 (file)
@@ -797,7 +797,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
       /* Create and enter a new lexical context.  */
       b = new_block (FUNCTION_BLOCK, s->language ());
       s->set_value_block (b);
-      BLOCK_FUNCTION (b) = s;
+      b->set_function (s);
       b->set_start (sh->value);
       b->set_end (sh->value);
       BLOCK_SUPERBLOCK (b) = top_stack->cur_block;
index e894411765ade83da80125c270a0fe73cbdbe9ae..9ae64f092a84089e773aa81d198cce374931ecaa 100644 (file)
@@ -671,7 +671,7 @@ list_args_or_locals (const frame_print_options &fp_opts,
            }
        }
 
-      if (BLOCK_FUNCTION (block))
+      if (block->function ())
        break;
       else
        block = BLOCK_SUPERBLOCK (block);
index aa8f3df7af9309ac66330ac7567fc3494311b1e7..7ab98687387f3d38f57a704dbc5a05df6e828073 100644 (file)
@@ -130,7 +130,7 @@ blpy_get_function (PyObject *self, void *closure)
 
   BLPY_REQUIRE_VALID (self, block);
 
-  sym = BLOCK_FUNCTION (block);
+  sym = block->function ();
   if (sym)
     return symbol_to_symbol_object (sym);
 
index d07158a5ec65db0b1c45b06af86ad927725c328a..c4225c84affc3a4bff09cb56e22debb3351ed1a8 100644 (file)
@@ -292,11 +292,11 @@ frapy_block (PyObject *self, PyObject *args)
     }
 
   for (fn_block = block;
-       fn_block != NULL && BLOCK_FUNCTION (fn_block) == NULL;
+       fn_block != NULL && fn_block->function () == NULL;
        fn_block = BLOCK_SUPERBLOCK (fn_block))
     ;
 
-  if (block == NULL || fn_block == NULL || BLOCK_FUNCTION (fn_block) == NULL)
+  if (block == NULL || fn_block == NULL || fn_block->function () == NULL)
     {
       PyErr_SetString (PyExc_RuntimeError,
                       _("Cannot locate block for frame."));
@@ -306,7 +306,7 @@ frapy_block (PyObject *self, PyObject *args)
   if (block)
     {
       return block_to_block_object
-       (block, BLOCK_FUNCTION (fn_block)->objfile ());
+       (block, fn_block->function ()->objfile ());
     }
 
   Py_RETURN_NONE;
index 1229ee6b4921067ac859ebe0c5285cd145b24645..35726b71398226ab426b51a0ef5c4f26544f669d 100644 (file)
@@ -2273,7 +2273,7 @@ iterate_over_block_local_vars (const struct block *block,
       /* After handling the function's top-level block, stop.  Don't
         continue to its superblock, the block of per-file
         symbols.  */
-      if (BLOCK_FUNCTION (block))
+      if (block->function ())
        break;
       block = BLOCK_SUPERBLOCK (block);
     }
index 097dc2dd3556b54685bd9b4c9e5b92af05d94c0a..1dd747d5386ddc6e2b2a0cdb7ea9d201bb646e27 100644 (file)
@@ -298,14 +298,14 @@ dump_symtab_1 (struct symtab *symtab, struct ui_file *outfile)
          gdb_puts (paddress (gdbarch, b->start ()), outfile);
          gdb_printf (outfile, "..");
          gdb_puts (paddress (gdbarch, b->end ()), outfile);
-         if (BLOCK_FUNCTION (b))
+         if (b->function ())
            {
              gdb_printf (outfile, ", function %s",
-                         BLOCK_FUNCTION (b)->linkage_name ());
-             if (BLOCK_FUNCTION (b)->demangled_name () != NULL)
+                         b->function ()->linkage_name ());
+             if (b->function ()->demangled_name () != NULL)
                {
                  gdb_printf (outfile, ", %s",
-                             BLOCK_FUNCTION (b)->demangled_name ());
+                             b->function ()->demangled_name ());
                }
            }
          gdb_printf (outfile, "\n");
index 993b1962c8c3e06a1036c9c69ce437d11921735c..58a2033f1ff995d87b79de3cb0705c375b1cbdc5 100644 (file)
@@ -2024,7 +2024,7 @@ lookup_language_this (const struct language_defn *lang,
            }
          return (struct block_symbol) {sym, block};
        }
-      if (BLOCK_FUNCTION (block))
+      if (block->function ())
        break;
       block = BLOCK_SUPERBLOCK (block);
     }
@@ -2227,7 +2227,7 @@ lookup_local_symbol (const char *name,
            return blocksym;
        }
 
-      if (BLOCK_FUNCTION (block) != NULL && block_inlined_p (block))
+      if (block->function () != NULL && block_inlined_p (block))
        break;
       block = BLOCK_SUPERBLOCK (block);
     }
@@ -4042,17 +4042,17 @@ skip_prologue_sal (struct symtab_and_line *sal)
   function_block = NULL;
   while (b != NULL)
     {
-      if (BLOCK_FUNCTION (b) != NULL && block_inlined_p (b))
+      if (b->function () != NULL && block_inlined_p (b))
        function_block = b;
-      else if (BLOCK_FUNCTION (b) != NULL)
+      else if (b->function () != NULL)
        break;
       b = BLOCK_SUPERBLOCK (b);
     }
   if (function_block != NULL
-      && BLOCK_FUNCTION (function_block)->line () != 0)
+      && function_block->function ()->line () != 0)
     {
-      sal->line = BLOCK_FUNCTION (function_block)->line ();
-      sal->symtab = BLOCK_FUNCTION (function_block)->symtab ();
+      sal->line = function_block->function ()->line ();
+      sal->symtab = function_block->function ()->symtab ();
     }
 }
 
@@ -4140,7 +4140,7 @@ skip_prologue_using_sal (struct gdbarch *gdbarch, CORE_ADDR func_addr)
            {
              if (block_inlined_p (bl))
                break;
-             if (BLOCK_FUNCTION (bl))
+             if (bl->function ())
                {
                  bl = NULL;
                  break;
@@ -6011,7 +6011,7 @@ default_collect_symbol_completion_matches_break_on
        /* Stop when we encounter an enclosing function.  Do not stop for
           non-inlined functions - the locals of the enclosing function
           are in scope for a nested function.  */
-       if (BLOCK_FUNCTION (b) != NULL && block_inlined_p (b))
+       if (b->function () != NULL && block_inlined_p (b))
          break;
        b = BLOCK_SUPERBLOCK (b);
       }
index 18c3803ac195d680d4011b3dab6f01d5a70fdedd..76da71df0380bed813639eae6cfa85f649650c23 100644 (file)
@@ -2615,7 +2615,7 @@ info_scope_command (const char *args_in, int from_tty)
              gdb_printf (", length %s.\n", pulongest (TYPE_LENGTH (t)));
            }
        }
-      if (BLOCK_FUNCTION (block))
+      if (block->function ())
        break;
       else
        block = BLOCK_SUPERBLOCK (block);