From 5045add04b998b68602ab49f04cbf3ca4d422d54 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Thu, 21 Aug 2008 20:29:00 +0000 Subject: [PATCH] * findvar.c (locate_var_value): Do not call get_frame_arch with a NULL frame argument. --- gdb/ChangeLog | 5 +++++ gdb/findvar.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 17215541506..43eddfc1e5d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2008-08-21 Ulrich Weigand + + * findvar.c (locate_var_value): Do not call get_frame_arch + with a NULL frame argument. + 2008-08-21 Ulrich Weigand * frame.h (frame_map_regnum_to_name): Remove prototype. diff --git a/gdb/findvar.c b/gdb/findvar.c index e67a66623a3..a39c8ff7eef 100644 --- a/gdb/findvar.c +++ b/gdb/findvar.c @@ -660,7 +660,7 @@ address_from_register (struct type *type, int regnum, struct frame_info *frame) struct value * locate_var_value (struct symbol *var, struct frame_info *frame) { - struct gdbarch *gdbarch = get_frame_arch (frame); + struct gdbarch *gdbarch; CORE_ADDR addr = 0; struct type *type = SYMBOL_TYPE (var); struct value *lazy_value; @@ -686,6 +686,8 @@ locate_var_value (struct symbol *var, struct frame_info *frame) switch (VALUE_LVAL (lazy_value)) { case lval_register: + gdb_assert (frame); + gdbarch = get_frame_arch (frame); gdb_assert (gdbarch_register_name (gdbarch, VALUE_REGNUM (lazy_value)) != NULL && *gdbarch_register_name -- 2.30.2