+2009-01-13 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * dwarf2loc.c (dwarf2_evaluate_loc_desc): Do not call get_frame_arch
+ for NULL frame pointers.
+
2009-01-13 Mark Kettenis <kettenis@gnu.org>
* utils.c (host_address_to_string): Reimplement in a way that
gdb_byte *data, unsigned short size,
struct dwarf2_per_cu_data *per_cu)
{
- struct gdbarch *arch = get_frame_arch (frame);
struct value *retval;
struct dwarf_expr_baton baton;
struct dwarf_expr_context *ctx;
struct dwarf_expr_piece *p = &ctx->pieces[i];
if (p->in_reg)
{
+ struct gdbarch *arch = get_frame_arch (frame);
bfd_byte regval[MAX_REGISTER_SIZE];
- int gdb_regnum = gdbarch_dwarf2_reg_to_regnum
- (arch, p->value);
+ int gdb_regnum = gdbarch_dwarf2_reg_to_regnum (arch, p->value);
get_frame_register (frame, gdb_regnum, regval);
memcpy (contents + offset, regval, p->size);
}
}
else if (ctx->in_reg)
{
+ struct gdbarch *arch = get_frame_arch (frame);
CORE_ADDR dwarf_regnum = dwarf_expr_fetch (ctx, 0);
- int gdb_regnum = gdbarch_dwarf2_reg_to_regnum
- (arch, dwarf_regnum);
+ int gdb_regnum = gdbarch_dwarf2_reg_to_regnum (arch, dwarf_regnum);
retval = value_from_register (SYMBOL_TYPE (var), gdb_regnum, frame);
}
else