/* Definitions for values of C expressions, for GDB.
- Copyright 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1996
- Free Software Foundation, Inc.
+ Copyright 1986, 1987, 1989, 1992-1996, 2000 Free Software Foundation, Inc.
This file is part of GDB.
/* Location of value (if lval). */
union
{
- /* Address in inferior or byte of registers structure. */
+ /* If lval == lval_memory, this is the address in the inferior.
+ If lval == lval_register, this is the byte offset into the
+ registers structure. */
CORE_ADDR address;
/* Pointer to internal variable. */
struct internalvar *internalvar;
}
location;
/* Describes offset of a value within lval of a structure in bytes.
- This is used in retrieving contents from target memory. [Note also
- the member embedded_offset below.] */
+ If lval == lval_memory, this is an offset to the address.
+ If lval == lval_register, this is a further offset from
+ location.address within the registers structure.
+ Note also the member embedded_offset below. */
int offset;
/* Only used for bitfields; number of bits contained in them. */
int bitsize;
do { struct type *value_type_arg_tmp = check_typedef (VALUE_TYPE (arg));\
if (TYPE_CODE (value_type_arg_tmp) == TYPE_CODE_REF) \
arg = value_at_lazy (TYPE_TARGET_TYPE (value_type_arg_tmp), \
- unpack_long (VALUE_TYPE (arg), \
- VALUE_CONTENTS (arg)), \
+ unpack_pointer (VALUE_TYPE (arg), \
+ VALUE_CONTENTS (arg)), \
VALUE_BFD_SECTION (arg)); \
} while (0)
struct frame_info;
struct fn_field;
-extern void
-print_address_demangle PARAMS ((CORE_ADDR, GDB_FILE *, int));
+extern void print_address_demangle (CORE_ADDR, struct ui_file *, int);
extern LONGEST value_as_long PARAMS ((value_ptr val));
extern value_ptr value_from_longest PARAMS ((struct type * type, LONGEST num));
+extern value_ptr value_from_pointer (struct type *type, CORE_ADDR addr);
+
extern value_ptr value_from_double PARAMS ((struct type * type, DOUBLEST num));
extern value_ptr value_from_string PARAMS ((char *string));
extern void
read_register_gen PARAMS ((int regno, char *myaddr));
+extern void
+write_register_gen PARAMS ((int regno, char *myaddr));
+
extern CORE_ADDR
read_register PARAMS ((int regno));
extern void
modify_field PARAMS ((char *addr, LONGEST fieldval, int bitpos, int bitsize));
-extern void
-type_print PARAMS ((struct type * type, char *varstring, GDB_FILE * stream,
- int show));
+extern void type_print (struct type * type, char *varstring,
+ struct ui_file * stream, int show);
extern char *baseclass_addr PARAMS ((struct type * type, int index,
char *valaddr,
value_ptr * valuep, int *errp));
-extern void
-print_longest PARAMS ((GDB_FILE * stream, int format, int use_local,
- LONGEST val));
+extern void print_longest (struct ui_file * stream, int format,
+ int use_local, LONGEST val);
-extern void
-print_floating PARAMS ((char *valaddr, struct type * type, GDB_FILE * stream));
+extern void print_floating (char *valaddr, struct type * type,
+ struct ui_file * stream);
-extern int value_print PARAMS ((value_ptr val, GDB_FILE * stream, int format,
- enum val_prettyprint pretty));
+extern int value_print (value_ptr val, struct ui_file *stream, int format,
+ enum val_prettyprint pretty);
-extern void
-value_print_array_elements PARAMS ((value_ptr val, GDB_FILE * stream,
- int format, enum val_prettyprint pretty));
+extern void value_print_array_elements (value_ptr val,
+ struct ui_file *stream,
+ int format,
+ enum val_prettyprint pretty);
extern value_ptr
value_release_to_mark PARAMS ((value_ptr mark));
-extern int
-val_print PARAMS ((struct type * type, char *valaddr, int embedded_offset, CORE_ADDR address,
- GDB_FILE * stream, int format, int deref_ref,
- int recurse, enum val_prettyprint pretty));
+extern int val_print (struct type * type, char *valaddr,
+ int embedded_offset, CORE_ADDR address,
+ struct ui_file * stream, int format,
+ int deref_ref, int recurse,
+ enum val_prettyprint pretty);
-extern int
-val_print_string PARAMS ((CORE_ADDR addr, int len, int width, GDB_FILE * stream));
+extern int val_print_string (CORE_ADDR addr, int len, int width, struct ui_file *stream);
-extern void
-print_variable_value PARAMS ((struct symbol * var, struct frame_info * frame,
- GDB_FILE * stream));
+extern void print_variable_value (struct symbol * var,
+ struct frame_info * frame,
+ struct ui_file *stream);
extern int check_field PARAMS ((value_ptr, const char *));
-extern void
-c_typedef_print PARAMS ((struct type * type, struct symbol * news, GDB_FILE * stream));
+extern void c_typedef_print (struct type * type, struct symbol * news,
+ struct ui_file * stream);
extern char *
internalvar_name PARAMS ((struct internalvar * var));
extern value_ptr call_function_by_hand PARAMS ((value_ptr, int, value_ptr *));
+extern int default_coerce_float_to_double (struct type *, struct type *);
+
+extern int standard_coerce_float_to_double (struct type *, struct type *);
+
extern value_ptr value_literal_complex PARAMS ((value_ptr, value_ptr, struct type *));
extern void find_rt_vbase_offset PARAMS ((struct type *, struct type *, char *, int, int *, int *));