aboutsummaryrefslogtreecommitdiff
path: root/gdb/blockframe.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/blockframe.c')
-rw-r--r--gdb/blockframe.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/blockframe.c b/gdb/blockframe.c
index b3c9aa3..6a018cc 100644
--- a/gdb/blockframe.c
+++ b/gdb/blockframe.c
@@ -152,6 +152,19 @@ find_pc_function (CORE_ADDR pc)
return find_pc_sect_function (pc, find_pc_mapped_section (pc));
}
+/* See symtab.h. */
+
+struct symbol *
+find_pc_sect_containing_function (CORE_ADDR pc, struct obj_section *section)
+{
+ const block *bl = block_for_pc_sect (pc, section);
+
+ if (bl == nullptr)
+ return nullptr;
+
+ return block_containing_function (bl);
+}
+
/* These variables are used to cache the most recent result
of find_pc_partial_function. */