aboutsummaryrefslogtreecommitdiff
path: root/gdb/block.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-01-16 17:44:20 -0700
committerTom Tromey <tom@tromey.com>2023-02-19 12:51:05 -0700
commit3c9d050626d9ab8c28082af114b5e8246b57b7de (patch)
tree14f9b06ca6b628eba07ef33e004828e5451f434b /gdb/block.c
parent3c45e9f915ae4aeab7312d6fc55a947859057572 (diff)
downloadgdb-3c9d050626d9ab8c28082af114b5e8246b57b7de.zip
gdb-3c9d050626d9ab8c28082af114b5e8246b57b7de.tar.gz
gdb-3c9d050626d9ab8c28082af114b5e8246b57b7de.tar.bz2
Convert block_linkage_function to method
This converts block_linkage_function to be a method. This was mostly written by script.
Diffstat (limited to 'gdb/block.c')
-rw-r--r--gdb/block.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/gdb/block.c b/gdb/block.c
index fc52333..dca6ff3 100644
--- a/gdb/block.c
+++ b/gdb/block.c
@@ -86,15 +86,13 @@ contained_in (const struct block *a, const struct block *b,
return false;
}
-
-/* Return the symbol for the function which contains a specified
- lexical block, described by a struct block BL. The return value
- will not be an inlined function; the containing function will be
- returned instead. */
+/* See block.h. */
struct symbol *
-block_linkage_function (const struct block *bl)
+block::linkage_function () const
{
+ const block *bl = this;
+
while ((bl->function () == NULL || bl->inlined_p ())
&& bl->superblock () != NULL)
bl = bl->superblock ();