* blockframe.c (block_innermost_frame): Uncomment.
[deliverable/binutils-gdb.git] / gdb / blockframe.c
index 0e5dc1ab6c283368583ecb2a44bb70c9beacaa8d..6430cba7b921b6f4a8a3f2e733629bcac1fc0867 100644 (file)
@@ -724,10 +724,8 @@ find_pc_partial_function (pc, name, address, endaddr)
   return 1;
 }
 
-/* Return the innermost stack frame executing inside of the specified block,
-   or zero if there is no such frame.  */
-
-#if 0  /* Currently unused */
+/* Return the innermost stack frame executing inside of BLOCK,
+   or zero if there is no such frame.  If BLOCK is NULL, just return NULL.  */
 
 FRAME
 block_innermost_frame (block)
@@ -738,6 +736,9 @@ block_innermost_frame (block)
   register CORE_ADDR start = BLOCK_START (block);
   register CORE_ADDR end = BLOCK_END (block);
 
+  if (block == NULL)
+    return NULL;
+
   frame = 0;
   while (1)
     {
@@ -750,8 +751,6 @@ block_innermost_frame (block)
     }
 }
 
-#endif /* 0 */
-
 #ifdef SIGCONTEXT_PC_OFFSET
 /* Get saved user PC for sigtramp from sigcontext for BSD style sigtramp.  */
 
This page took 0.022801 seconds and 4 git commands to generate.