aboutsummaryrefslogtreecommitdiff
path: root/gdb/findvar.c
diff options
context:
space:
mode:
authorgdb-2.8 <gdb@fsf.org>1988-09-03 08:00:00 +0100
committerPedro Alves <palves@redhat.com>2012-06-03 15:36:31 +0100
commit3bf57d210832b28e9361990830eb722a619f031b (patch)
treeba506d293bde0f6500d0cee3e643ebf8890d9cf7 /gdb/findvar.c
parent7c75bab3d3ef344a6a0b13b9ab59ecd5855aceb5 (diff)
downloadgdb-3bf57d210832b28e9361990830eb722a619f031b.zip
gdb-3bf57d210832b28e9361990830eb722a619f031b.tar.gz
gdb-3bf57d210832b28e9361990830eb722a619f031b.tar.bz2
gdb-2.8
Diffstat (limited to 'gdb/findvar.c')
-rw-r--r--gdb/findvar.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gdb/findvar.c b/gdb/findvar.c
index 465e00a..e5f9b4a 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -212,9 +212,6 @@ read_var_value (var, frame)
int val = SYMBOL_VALUE (var);
register int len;
- if (SYMBOL_CLASS (var) == LOC_BLOCK)
- type = lookup_function_type (type, 0);
-
v = allocate_value (type);
VALUE_LVAL (v) = lval_memory; /* The most likely possibility. */
len = TYPE_LENGTH (type);
@@ -347,6 +344,7 @@ locate_var_value (var, frame)
register CORE_ADDR addr = 0;
int val = SYMBOL_VALUE (var);
struct frame_info fi;
+ struct type *type = SYMBOL_TYPE (var);
if (frame == 0) frame = selected_frame;
@@ -362,7 +360,7 @@ locate_var_value (var, frame)
if (addr != 0)
{
union { int i; char c; } test;
- int len = TYPE_LENGTH (SYMBOL_TYPE (var));
+ int len = TYPE_LENGTH (type);
/* If var is less than the full size of register, we need to
test for a big-endian or little-endian machine. */
test.i = 1;
@@ -398,7 +396,7 @@ locate_var_value (var, frame)
break;
}
- return value_cast (lookup_pointer_type (SYMBOL_TYPE (var)),
+ return value_cast (lookup_pointer_type (type),
value_from_long (builtin_type_long, addr));
}