diff options
author | Michael Snyder <msnyder@vmware.com> | 2010-05-14 17:53:16 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2010-05-14 17:53:16 +0000 |
commit | 9a619af0d3152e742fbd290baeae96a32f0abf04 (patch) | |
tree | 6e52a14dd92f9b11874ecc3aa8d83f63f6d6699b /gdb/dwarf2expr.c | |
parent | 88d4aea7473bf93d98ba72a5f955f428cd365431 (diff) | |
download | gdb-9a619af0d3152e742fbd290baeae96a32f0abf04.zip gdb-9a619af0d3152e742fbd290baeae96a32f0abf04.tar.gz gdb-9a619af0d3152e742fbd290baeae96a32f0abf04.tar.bz2 |
2010-05-14 Michael Snyder <msnyder@vmware.com>
* 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.
Diffstat (limited to 'gdb/dwarf2expr.c')
-rw-r--r-- | gdb/dwarf2expr.c | 6 |
1 files changed, 6 insertions, 0 deletions
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, |