aboutsummaryrefslogtreecommitdiff
path: root/gdb/valops.c
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1992-02-21 01:34:46 +0000
committerJohn Gilmore <gnu@cygnus>1992-02-21 01:34:46 +0000
commite17960fb42997fc740d0f74544be9713a0209878 (patch)
tree1ed6bd38b5ae03e99972687308c962e92e4b34d0 /gdb/valops.c
parent7ed0f002ede4baa5bba71173818d14b818184410 (diff)
downloadgdb-e17960fb42997fc740d0f74544be9713a0209878.zip
gdb-e17960fb42997fc740d0f74544be9713a0209878.tar.gz
gdb-e17960fb42997fc740d0f74544be9713a0209878.tar.bz2
* core.c, eval.c, exec.c, inftarg.c, remote-adapt.c, remote-eb.c,
remote-hms.c, remote-mm.c, remote-nindy.c, remote-vx.c, remote.c, target.c, target.h, valarith.c, valops.c, value.h, xcoffexec.c: Remove to_call_function and target_call_function, since it always calls the same thing (call_function_by_hand).
Diffstat (limited to 'gdb/valops.c')
-rw-r--r--gdb/valops.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/gdb/valops.c b/gdb/valops.c
index 0ebc6ef..c340932 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -1,5 +1,5 @@
/* Perform non-arithmetic operations on values, for GDB.
- Copyright 1986, 1987, 1989, 1991 Free Software Foundation, Inc.
+ Copyright 1986, 1987, 1989, 1991, 1992 Free Software Foundation, Inc.
This file is part of GDB.
@@ -239,7 +239,7 @@ value_assign (toval, fromval)
int v; /* FIXME, this won't work for large bitfields */
read_memory (VALUE_ADDRESS (toval) + VALUE_OFFSET (toval),
&v, sizeof v);
- modify_field (&v, (int) value_as_long (fromval),
+ modify_field ((char *) &v, (int) value_as_long (fromval),
VALUE_BITPOS (toval), VALUE_BITSIZE (toval));
write_memory (VALUE_ADDRESS (toval) + VALUE_OFFSET (toval),
(char *)&v, sizeof v);
@@ -258,11 +258,11 @@ value_assign (toval, fromval)
int v;
read_register_bytes (VALUE_ADDRESS (toval) + VALUE_OFFSET (toval),
- &v, sizeof v);
- modify_field (&v, (int) value_as_long (fromval),
+ (char *) &v, sizeof v);
+ modify_field ((char *) &v, (int) value_as_long (fromval),
VALUE_BITPOS (toval), VALUE_BITSIZE (toval));
write_register_bytes (VALUE_ADDRESS (toval) + VALUE_OFFSET (toval),
- &v, sizeof v);
+ (char *) &v, sizeof v);
}
else if (use_buffer)
write_register_bytes (VALUE_ADDRESS (toval) + VALUE_OFFSET (toval),
@@ -450,6 +450,7 @@ value
value_addr (arg1)
value arg1;
{
+ extern value value_copy ();
struct type *type = VALUE_TYPE (arg1);
if (TYPE_CODE (type) == TYPE_CODE_REF)
{
@@ -685,6 +686,9 @@ call_function_by_hand (function, nargs, args)
CORE_ADDR funaddr;
int using_gcc;
+ if (!target_has_execution)
+ noprocess();
+
save_inferior_status (&inf_status, 1);
old_chain = make_cleanup (restore_inferior_status, &inf_status);
@@ -949,7 +953,7 @@ value_string (ptr, len)
}
blocklen = value_from_longest (builtin_type_int, (LONGEST) (len + 1));
- val = target_call_function (val, 1, &blocklen);
+ val = call_function_by_hand (val, 1, &blocklen);
if (value_zerop (val))
error ("No memory available for string constant.");
write_memory (value_as_pointer (val), copy, len + 1);