diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2009-01-13 18:01:49 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2009-01-13 18:01:49 +0000 |
commit | 77a732d97ff257a19c44d7e906f9b856a0290272 (patch) | |
tree | 9be948f12fd7e406ef1eda86b130d9877fe44849 | |
parent | b302c308cd92656419cddc2672f43a1cbd027961 (diff) | |
download | binutils-77a732d97ff257a19c44d7e906f9b856a0290272.tar.gz binutils-77a732d97ff257a19c44d7e906f9b856a0290272.tar.bz2 binutils-77a732d97ff257a19c44d7e906f9b856a0290272.zip |
* dwarf2loc.c (dwarf2_evaluate_loc_desc): Do not call get_frame_arch
for NULL frame pointers.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/dwarf2loc.c | 9 |
2 files changed, 9 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9d7cb042393..c8d71903b2b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +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 diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c index 95018dce21c..cad3db80229 100644 --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c @@ -199,7 +199,6 @@ dwarf2_evaluate_loc_desc (struct symbol *var, struct frame_info *frame, 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; @@ -238,9 +237,9 @@ dwarf2_evaluate_loc_desc (struct symbol *var, struct frame_info *frame, 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); } @@ -253,9 +252,9 @@ dwarf2_evaluate_loc_desc (struct symbol *var, struct frame_info *frame, } 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 |