aboutsummaryrefslogtreecommitdiff
path: root/gdb/blockframe.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-08-18 19:33:39 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-08-18 19:33:39 +0000
commit479fdd26ee1390b558509aec8e5f8a6a4d7074df (patch)
tree033bf7a1877e86b157805ad11f46f0f9fa6f8d78 /gdb/blockframe.c
parente56ac0ba86b473dfa9a227f06d903970345e513d (diff)
downloadgdb-479fdd26ee1390b558509aec8e5f8a6a4d7074df.zip
gdb-479fdd26ee1390b558509aec8e5f8a6a4d7074df.tar.gz
gdb-479fdd26ee1390b558509aec8e5f8a6a4d7074df.tar.bz2
* blockframe.c (block_innermost_frame): Uncomment.
Return NULL if passed NULL. * frame.h: Declare it. * expression.h (union exp_element): Add field block. * parse.c (write_exp_elt_block): New function. * expression.h (OP_VAR_VALUE): Now takes additional struct block *. * *-exp.y: Write block for OP_VAR_VALUE. * eval.c, expprint.c, parse.c: Deal with block for OP_VAR_VALUE. * valops.c, value.h (value_of_variable), callers: Add second argument, for block.
Diffstat (limited to 'gdb/blockframe.c')
-rw-r--r--gdb/blockframe.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/gdb/blockframe.c b/gdb/blockframe.c
index 0e5dc1a..6430cba 100644
--- a/gdb/blockframe.c
+++ b/gdb/blockframe.c
@@ -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. */