aboutsummaryrefslogtreecommitdiff
path: root/gdb/findvar.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2008-08-21 20:29:00 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2008-08-21 20:29:00 +0000
commit5045add04b998b68602ab49f04cbf3ca4d422d54 (patch)
treece6c6d1d53458ff73cd2eb4fb8b321f570c7faaf /gdb/findvar.c
parent029a67e44a62a6048ff821161544a14e536c3f7d (diff)
downloadbinutils-5045add04b998b68602ab49f04cbf3ca4d422d54.zip
binutils-5045add04b998b68602ab49f04cbf3ca4d422d54.tar.gz
binutils-5045add04b998b68602ab49f04cbf3ca4d422d54.tar.bz2
* findvar.c (locate_var_value): Do not call get_frame_arch
with a NULL frame argument.
Diffstat (limited to 'gdb/findvar.c')
-rw-r--r--gdb/findvar.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/findvar.c b/gdb/findvar.c
index e67a666..a39c8ff 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