aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2expr.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2005-10-18 00:04:11 +0000
committerJim Blandy <jimb@codesourcery.com>2005-10-18 00:04:11 +0000
commitef0fdf07a40a2097075d60d745150408f0ea9c30 (patch)
treef7951507cd539a035947179260791196b32eaefd /gdb/dwarf2expr.c
parentea44d563c74497910f91caa52d701bf591600e5e (diff)
downloadbinutils-ef0fdf07a40a2097075d60d745150408f0ea9c30.zip
binutils-ef0fdf07a40a2097075d60d745150408f0ea9c30.tar.gz
binutils-ef0fdf07a40a2097075d60d745150408f0ea9c30.tar.bz2
2005-10-17 Jim Blandy <jimb@redhat.com>
* dwarf2expr.c (dwarf_expr_fetch): Use correct comparison to detect stack underflow.
Diffstat (limited to 'gdb/dwarf2expr.c')
-rw-r--r--gdb/dwarf2expr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c
index e75dcee..1296633 100644
--- a/gdb/dwarf2expr.c
+++ b/gdb/dwarf2expr.c
@@ -98,7 +98,7 @@ dwarf_expr_pop (struct dwarf_expr_context *ctx)
CORE_ADDR
dwarf_expr_fetch (struct dwarf_expr_context *ctx, int n)
{
- if (ctx->stack_len < n)
+ if (ctx->stack_len <= n)
error (_("Asked for position %d of stack, stack only has %d elements on it."),
n, ctx->stack_len);
return ctx->stack[ctx->stack_len - (1 + n)];