aboutsummaryrefslogtreecommitdiff
path: root/gdb/findvar.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1991-05-02 04:28:42 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1991-05-02 04:28:42 +0000
commite1ce8aa5ed46310d716472d19d2e87da2833d599 (patch)
treecacaf1a83d8e388b049c2b3bc454f311dd34b6e2 /gdb/findvar.c
parent04a0511c0af3d07f7b4587fbf4715d2b956f1fad (diff)
downloadgdb-e1ce8aa5ed46310d716472d19d2e87da2833d599.zip
gdb-e1ce8aa5ed46310d716472d19d2e87da2833d599.tar.gz
gdb-e1ce8aa5ed46310d716472d19d2e87da2833d599.tar.bz2
The list of changes is too long to fit in the cvs log (since it truncates!).
Look at the ChangeLog for Apr 30 and May 1.
Diffstat (limited to 'gdb/findvar.c')
-rw-r--r--gdb/findvar.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/gdb/findvar.c b/gdb/findvar.c
index 5ac03bc..106fadf 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -177,7 +177,7 @@ read_relative_register_raw_bytes (regnum, myaddr)
return 0;
}
- get_saved_register (myaddr, &optim, (CORE_ADDR) NULL, selected_frame,
+ get_saved_register (myaddr, &optim, (CORE_ADDR *) NULL, selected_frame,
regnum, (enum lval_type *)NULL);
return optim;
}
@@ -366,7 +366,6 @@ read_var_value (var, frame)
struct frame_info *fi;
struct type *type = SYMBOL_TYPE (var);
CORE_ADDR addr;
- int val;
register int len;
v = allocate_value (type);
@@ -378,8 +377,7 @@ read_var_value (var, frame)
switch (SYMBOL_CLASS (var))
{
case LOC_CONST:
- val = SYMBOL_VALUE (var);
- bcopy (&val, VALUE_CONTENTS_RAW (v), len);
+ bcopy (&SYMBOL_VALUE (var), VALUE_CONTENTS_RAW (v), len);
SWAP_TARGET_AND_HOST (VALUE_CONTENTS_RAW (v), len);
VALUE_LVAL (v) = not_lval;
return v;
@@ -430,7 +428,7 @@ read_var_value (var, frame)
return 0;
}
addr += SYMBOL_VALUE (var);
- addr = read_memory_integer (addr, sizeof (CORE_ADDR));
+ read_memory (addr, &addr, sizeof (CORE_ADDR));
break;
case LOC_LOCAL:
@@ -460,7 +458,7 @@ read_var_value (var, frame)
v = value_from_register (type, SYMBOL_VALUE (var), frame);
- if (REG_STRUCT_HAS_ADDR(b->gcc_compile_flag)
+ if (REG_STRUCT_HAS_ADDR (BLOCK_GCC_COMPILED (b))
&& TYPE_CODE (type) == TYPE_CODE_STRUCT)
addr = *(CORE_ADDR *)VALUE_CONTENTS (v);
else
@@ -665,7 +663,7 @@ locate_var_value (var, frame)
{
char *buf = alloca (TYPE_LENGTH (type));
read_memory (addr, buf, TYPE_LENGTH (type));
- addr = unpack_long (type, buf);
+ addr = unpack_pointer (type, buf);
type = TYPE_TARGET_TYPE (type);
}