/* Definitions for values of C expressions, for GDB.
- Copyright 1986, 1987, 1989, 1992, 1993, 1994 Free Software Foundation, Inc.
+ Copyright 1986, 1987, 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
This file is part of GDB.
variables or put into the value history are taken off this
list. */
struct value *next;
+
+ /* ??? When is this used? */
+ union {
+ CORE_ADDR memaddr;
+ char *myaddr;
+ } substring_addr;
+
/* If an lval is forced to repeat, a new value is created with
these fields set. The new value is not an lval. */
short repeated;
long contents[1];
double force_double_align;
LONGEST force_longlong_align;
+ char *literal_data;
} aligner;
};
#define COERCE_ARRAY(arg) \
{ COERCE_REF(arg); \
- if (VALUE_REPEATED (arg) \
- || TYPE_CODE (VALUE_TYPE (arg)) == TYPE_CODE_ARRAY) \
+ if (current_language->c_style_arrays \
+ && (VALUE_REPEATED (arg) \
+ || TYPE_CODE (VALUE_TYPE (arg)) == TYPE_CODE_ARRAY)) \
arg = value_coerce_array (arg); \
if (TYPE_CODE (VALUE_TYPE (arg)) == TYPE_CODE_FUNC) \
arg = value_coerce_function (arg); \
arg = value_cast (builtin_type_unsigned_int, arg); \
}
+#define COERCE_VARYING_ARRAY(arg) \
+{ if (chill_varying_type (VALUE_TYPE (arg))) arg = varying_to_slice (arg); }
+
/* If ARG is an enum, convert it to an integer. */
#define COERCE_ENUM(arg) \
extern value_ptr value_at_lazy PARAMS ((struct type *type, CORE_ADDR addr));
-/* FIXME: Assumes equivalence of "struct frame_info *" and "FRAME" */
extern value_ptr value_from_register PARAMS ((struct type *type, int regnum,
struct frame_info * frame));
extern int symbol_read_needs_frame PARAMS ((struct symbol *));
-/* FIXME: Assumes equivalence of "struct frame_info *" and "FRAME" */
extern value_ptr read_var_value PARAMS ((struct symbol *var,
struct frame_info *frame));
-/* FIXME: Assumes equivalence of "struct frame_info *" and "FRAME" */
extern value_ptr locate_var_value PARAMS ((struct symbol *var,
struct frame_info *frame));
extern void value_free_to_mark PARAMS ((value_ptr mark));
extern value_ptr value_string PARAMS ((char *ptr, int len));
+extern value_ptr value_bitstring PARAMS ((char *ptr, int len));
extern value_ptr value_array PARAMS ((int lowbound, int highbound,
value_ptr *elemvec));
extern value_ptr value_complement PARAMS ((value_ptr arg1));
-extern value_ptr value_struct_elt PARAMS ((value_ptr *argp, value *args,
+extern value_ptr value_struct_elt PARAMS ((value_ptr *argp, value_ptr *args,
char *name,
int *static_memfuncp, char *err));
extern void
supply_register PARAMS ((int regno, char *val));
-/* FIXME: Assumes equivalence of "struct frame_info *" and "FRAME" */
extern void
get_saved_register PARAMS ((char *raw_buffer, int *optimized,
CORE_ADDR *addrp, struct frame_info *frame,
extern int value_print PARAMS ((value_ptr val, GDB_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 value_ptr
+value_release_to_mark PARAMS ((value_ptr mark));
+
extern int
val_print PARAMS ((struct type *type, char *valaddr, CORE_ADDR address,
GDB_FILE *stream, int format, int deref_ref,
extern int
val_print_string PARAMS ((CORE_ADDR addr, unsigned int len, GDB_FILE *stream));
-/* FIXME: Assumes equivalence of "struct frame_info *" and "FRAME" */
extern void
print_variable_value PARAMS ((struct symbol *var, struct frame_info *frame,
GDB_FILE *stream));
-extern value_ptr value_arg_coerce PARAMS ((value_ptr));
-
extern int check_field PARAMS ((value_ptr, const char *));
extern void
-c_typedef_print PARAMS ((struct type *type, struct symbol *new, GDB_FILE *stream));
+c_typedef_print PARAMS ((struct type *type, struct symbol *news, GDB_FILE *stream));
extern char *
internalvar_name PARAMS ((struct internalvar *var));
/* From valops.c */
+extern value_ptr varying_to_slice PARAMS ((value_ptr));
+
+extern value_ptr value_slice PARAMS ((value_ptr, int, int));
+
extern value_ptr call_function_by_hand PARAMS ((value_ptr, int, value_ptr *));
+extern value_ptr value_literal_complex PARAMS ((value_ptr, value_ptr, struct type*));
+
#endif /* !defined (VALUE_H) */