From 9a619af0d3152e742fbd290baeae96a32f0abf04 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Fri, 14 May 2010 17:53:16 +0000 Subject: 2010-05-14 Michael Snyder * dbxread.c: White space. * dcache.c: White space. * disasm.c: White space. * doublest.c: White space. * dsrec.c: White space. * dummy-frame.c: White space. * dwarf2expr.c: White space. * dwarf2-frame.c: White space. * dwarf2loc.c: White space. * dwarf2read.c: White space. --- gdb/dwarf2expr.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gdb/dwarf2expr.c') diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c index 9e5ce61..13d318e 100644 --- a/gdb/dwarf2expr.c +++ b/gdb/dwarf2expr.c @@ -41,6 +41,7 @@ struct dwarf_expr_context * new_dwarf_expr_context (void) { struct dwarf_expr_context *retval; + retval = xcalloc (1, sizeof (struct dwarf_expr_context)); retval->stack_len = 0; retval->stack_allocated = 10; @@ -87,6 +88,7 @@ dwarf_expr_grow_stack (struct dwarf_expr_context *ctx, size_t need) if (ctx->stack_len + need > ctx->stack_allocated) { size_t newlen = ctx->stack_len + need + 10; + ctx->stack = xrealloc (ctx->stack, newlen * sizeof (struct dwarf_stack_value)); ctx->stack_allocated = newlen; @@ -337,6 +339,7 @@ execute_stack_op (struct dwarf_expr_context *ctx, gdb_byte *op_ptr, gdb_byte *op_end) { enum bfd_endian byte_order = gdbarch_byte_order (ctx->gdbarch); + ctx->location = DWARF_VALUE_MEMORY; ctx->initialized = 1; /* Default is initialized. */ @@ -498,6 +501,7 @@ execute_stack_op (struct dwarf_expr_context *ctx, case DW_OP_implicit_value: { ULONGEST len; + op_ptr = read_uleb128 (op_ptr, op_end, &len); if (op_ptr + len > op_end) error (_("DW_OP_implicit_value: too few bytes available.")); @@ -655,6 +659,7 @@ execute_stack_op (struct dwarf_expr_context *ctx, case DW_OP_deref: { gdb_byte *buf = alloca (ctx->addr_size); + (ctx->read_mem) (ctx->baton, buf, result, ctx->addr_size); result = dwarf2_read_address (ctx->gdbarch, buf, buf + ctx->addr_size, @@ -666,6 +671,7 @@ execute_stack_op (struct dwarf_expr_context *ctx, { int addr_size = *op_ptr++; gdb_byte *buf = alloca (addr_size); + (ctx->read_mem) (ctx->baton, buf, result, addr_size); result = dwarf2_read_address (ctx->gdbarch, buf, buf + addr_size, -- cgit v1.1