From: Joel Brobecker Date: Wed, 9 Sep 2009 17:23:55 +0000 (+0000) Subject: * block.c (contained_in): Return zero for nested functions. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=49e794ac6235d43615f123d660113873ee3049ec;p=binutils-gdb.git * block.c (contained_in): Return zero for nested functions. * blockframe.c (block_innermost_frame): Delete unreferenced local variable. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8e6e6e0aec5..173b937412a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2009-09-08 Joel Brobecker + + * block.c (contained_in): Return zero for nested functions. + * blockframe.c (block_innermost_frame): Delete unreferenced local + variable. + 2009-09-08 Doug Evans * target.c (initialize_targets): Fix thinko in stack_cache_enabled_p. 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); diff --git a/gdb/blockframe.c b/gdb/blockframe.c index 41a35022864..09608371f84 100644 --- a/gdb/blockframe.c +++ b/gdb/blockframe.c @@ -363,7 +363,6 @@ block_innermost_frame (struct block *block) struct frame_info *frame; CORE_ADDR start; CORE_ADDR end; - CORE_ADDR calling_pc; if (block == NULL) return NULL;