+Tue Jan 25 12:58:26 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * valops.c (value_assign): Set `type' after coercing toval.
+ * c-valprint.c (c_val_print), ch-valprint.c (chill_val_print):
+ Use extract_unsigned_integer to get the address of a reference.
+
Tue Jan 25 11:31:53 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
* stabsread.c (STABS_CONTINUE, error_type), partial-stab.h:
Sat Jan 22 20:25:11 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* mips-tdep.c (init_extra_frame_info): Use frame relative stack
- pointer value when fixing up the frame at the start of a function
+ pointer value when fixing up the frame at the start of a function.
Sat Jan 22 12:29:13 1994 Stu Grossman (grossman at cygnus.com)
/* Support for printing C values for GDB, the GNU debugger.
- Copyright 1986, 1988, 1989, 1991 Free Software Foundation, Inc.
+ Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994
+ Free Software Foundation, Inc.
This file is part of GDB.
if (addressprint)
{
fprintf_filtered (stream, "@0x%lx",
- unpack_long (builtin_type_int, valaddr));
+ extract_unsigned_integer (valaddr,
+ TARGET_PTR_BIT / HOST_CHAR_BIT));
if (deref_ref)
fputs_filtered (": ", stream);
}
/* Support for printing Chill values for GDB, the GNU debugger.
- Copyright 1986, 1988, 1989, 1991 Free Software Foundation, Inc.
+ Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994
+ Free Software Foundation, Inc.
This file is part of GDB.
if (addressprint)
{
fprintf_filtered (stream, "LOC(H'%lx)",
- unpack_long (builtin_type_int, valaddr));
+ extract_unsigned_integer (valaddr,
+ TARGET_PTR_BIT / HOST_CHAR_BIT));
if (deref_ref)
fputs_filtered (": ", stream);
}
/* Perform non-arithmetic operations on values, for GDB.
- Copyright 1986, 1987, 1989, 1991, 1992 Free Software Foundation, Inc.
+ Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994
+ Free Software Foundation, Inc.
This file is part of GDB.
value_assign (toval, fromval)
register value toval, fromval;
{
- register struct type *type = VALUE_TYPE (toval);
+ register struct type *type;
register value val;
char raw_buffer[MAX_REGISTER_RAW_SIZE];
int use_buffer = 0;
COERCE_ARRAY (fromval);
COERCE_REF (toval);
+ type = VALUE_TYPE (toval);
if (VALUE_LVAL (toval) != lval_internalvar)
fromval = value_cast (type, fromval);
CORE_ADDR
push_word (sp, word)
CORE_ADDR sp;
- REGISTER_TYPE word;
+ unsigned LONGEST word;
{
- register int len = sizeof (REGISTER_TYPE);
+ register int len = REGISTER_SIZE;
char buffer[MAX_REGISTER_RAW_SIZE];
store_unsigned_integer (buffer, len, word);
register CORE_ADDR sp;
register int i;
CORE_ADDR start_sp;
- /* CALL_DUMMY is an array of words (REGISTER_TYPE), but each word
- is in host byte order. It is switched to target byte order before calling
- FIX_CALL_DUMMY. */
- static REGISTER_TYPE dummy[] = CALL_DUMMY;
- REGISTER_TYPE dummy1[sizeof dummy / sizeof (REGISTER_TYPE)];
+ /* CALL_DUMMY is an array of words (REGISTER_SIZE), but each word
+ is in host byte order. Before calling FIX_CALL_DUMMY, we byteswap it
+ and remove any extra bytes which might exist because unsigned LONGEST is
+ bigger than REGISTER_SIZE. */
+ static unsigned LONGEST dummy[] = CALL_DUMMY;
+ char dummy1[REGISTER_SIZE * sizeof dummy / sizeof (unsigned LONGEST)];
CORE_ADDR old_sp;
struct type *value_type;
unsigned char struct_return;
/* Create a call sequence customized for this function
and the number of arguments for it. */
- for (i = 0; i < sizeof dummy / sizeof (REGISTER_TYPE); i++)
- store_unsigned_integer (&dummy1[i], sizeof (REGISTER_TYPE),
+ for (i = 0; i < sizeof dummy / sizeof (dummy[0]); i++)
+ store_unsigned_integer (&dummy1[i * REGISTER_SIZE],
+ REGISTER_SIZE,
(unsigned LONGEST)dummy[i]);
#ifdef GDB_TARGET_IS_HPPA
{
int i;
value v;
- static int name_matched = 0;
+ int name_matched = 0;
char dem_opname[64];
check_stub_type (type);
v = search_struct_method (name, argp, args, 0, static_memfuncp, t);
- if (v == 0 || v == (value) -1)
+ if (v == (value) -1)
+ error ("Cannot take address of a method");
+ else if (v == 0)
{
if (TYPE_NFN_FIELDS (t))
error ("There is no member or method named %s.", name);