summaryrefslogtreecommitdiff
path: root/gdb/block.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2009-09-09 17:23:54 +0000
committerJoel Brobecker <brobecker@gnat.com>2009-09-09 17:23:54 +0000
commit47a2cf2d557f260c4e6e98a60b88c12bb68ff036 (patch)
treebc2faa6dcf77757d0c40d0940086012428acff0e /gdb/block.c
parent5a3a159521fe1f1701fac78648769477619b526b (diff)
downloadgdb-47a2cf2d557f260c4e6e98a60b88c12bb68ff036.tar.gz
* block.c (contained_in): Return zero for nested functions.
* blockframe.c (block_innermost_frame): Delete unreferenced local variable.
Diffstat (limited to 'gdb/block.c')
-rw-r--r--gdb/block.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/block.c b/gdb/block.c
index 1889ecd95e8..97ea67adb48 100644
--- a/gdb/block.c
+++ b/gdb/block.c
@@ -52,6 +52,10 @@ contained_in (const struct block *a, const struct block *b)
{
if (a == b)
return 1;
+ /* If A is a function block, then A cannot be contained in B,
+ except if A was inlined. */
+ if (BLOCK_FUNCTION (a) != NULL && !block_inlined_p (a))
+ return 0;
a = BLOCK_SUPERBLOCK (a);
}
while (a != NULL);