OSDN Git Service

* block.c (contained_in): Return zero for nested functions.
authorbrobecke <brobecke>
Wed, 9 Sep 2009 17:23:54 +0000 (17:23 +0000)
committerbrobecke <brobecke>
Wed, 9 Sep 2009 17:23:54 +0000 (17:23 +0000)
        * blockframe.c (block_innermost_frame): Delete unreferenced local
        variable.

gdb/ChangeLog
gdb/block.c
gdb/blockframe.c

index 8e6e6e0..173b937 100644 (file)
@@ -1,3 +1,9 @@
+2009-09-08  Joel Brobecker  <brobecker@adacore.com>
+
+       * block.c (contained_in): Return zero for nested functions.
+       * blockframe.c (block_innermost_frame): Delete unreferenced local
+       variable.
+
 2009-09-08  Doug Evans  <dje@google.com>
 
        * target.c (initialize_targets): Fix thinko in stack_cache_enabled_p.
index 1889ecd..97ea67a 100644 (file)
@@ -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);
index 41a3502..0960837 100644 (file)
@@ -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;