summaryrefslogtreecommitdiff
path: root/gdb/block.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-01-16 17:48:19 -0700
committerTom Tromey <tom@tromey.com>2023-02-19 12:51:06 -0700
commit99f3dfd0f94144d295885e79f4ff5a5f8119fb04 (patch)
treee8a7e0ee93664f7576560d9a5e39050d722f26b6 /gdb/block.h
parent3c9d050626d9ab8c28082af114b5e8246b57b7de (diff)
downloadbinutils-gdb-99f3dfd0f94144d295885e79f4ff5a5f8119fb04.tar.gz
Convert block_containing_function to method
This converts block_containing_function to be a method. This was mostly written by script.
Diffstat (limited to 'gdb/block.h')
-rw-r--r--gdb/block.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/gdb/block.h b/gdb/block.h
index d1f4409d863..9f1ba935abb 100644
--- a/gdb/block.h
+++ b/gdb/block.h
@@ -238,6 +238,13 @@ struct block
struct symbol *linkage_function () const;
+ /* Return the symbol for the function which contains a specified
+ block, described by a struct block. The return value will be the
+ closest enclosing function, which might be an inline
+ function. */
+
+ struct symbol *containing_function () const;
+
/* Addresses in the executable code that are in this block. */
CORE_ADDR m_start;
@@ -371,8 +378,6 @@ private:
struct block *m_blocks[1];
};
-extern struct symbol *block_containing_function (const struct block *);
-
/* Return true if block A is lexically nested within block B, or if a
and b have the same pc range. Return false otherwise. If
ALLOW_NESTED is true, then block A is considered to be in block B