* block.c (contained_in): Return zero for nested functions.
authorJoel Brobecker <brobecker@gnat.com>
Wed, 9 Sep 2009 17:23:55 +0000 (17:23 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Wed, 9 Sep 2009 17:23:55 +0000 (17:23 +0000)
        * blockframe.c (block_innermost_frame): Delete unreferenced local
        variable.

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

index 8e6e6e0aec52b6aec235323c03f0cbc02b5a0c34..173b937412a333496e9dc36070010e5c8fdf0bf1 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 1889ecd95e89c34452e218731ca4460c41f5b5b9..97ea67adb489042fb63742dcc0234e5d5ad2568f 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 41a35022864e42ca14dd543b0659acc0af95ef14..09608371f849fc51ead8f43bbc21ecf91e1e9acc 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;
This page took 0.041234 seconds and 4 git commands to generate.