diff options
Diffstat (limited to 'gdb/value.h')
-rw-r--r-- | gdb/value.h | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/gdb/value.h b/gdb/value.h index 7ebd041..ae2545a 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -101,6 +101,8 @@ struct value /* If nonzero, this is the value of a variable which does not actually exist in the program. */ char optimized_out; + /* The BFD section associated with this value. */ + asection *bfd_section; /* Actual contents of the value. For use of this value; setting it uses the stuff above. Not valid if lazy is nonzero. Target byte-order. We force it to be aligned properly for any @@ -111,7 +113,6 @@ struct value LONGEST force_longlong_align; char *literal_data; } aligner; - }; typedef struct value *value_ptr; @@ -141,16 +142,18 @@ extern int value_fetch_lazy PARAMS ((value_ptr val)); #define VALUE_NEXT(val) (val)->next #define VALUE_REGNO(val) (val)->regno #define VALUE_OPTIMIZED_OUT(val) ((val)->optimized_out) +#define VALUE_BFD_SECTION(val) ((val)->bfd_section) /* Convert a REF to the object referenced. */ #define COERCE_REF(arg) \ -do { CHECK_TYPEDEF (VALUE_TYPE (arg)); \ - if (TYPE_CODE (VALUE_TYPE (arg)) == TYPE_CODE_REF) \ - arg = value_at_lazy (TYPE_TARGET_TYPE (VALUE_TYPE (arg)), \ - unpack_long (VALUE_TYPE (arg), \ - VALUE_CONTENTS (arg))); \ -} while (0) +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)), \ + VALUE_BFD_SECTION (arg)); \ + } while (0) /* If ARG is an array, convert it to a pointer. If ARG is an enum, convert it to an integer. @@ -177,7 +180,7 @@ do { COERCE_REF(arg); \ /* If ARG is an enum, convert it to an integer. */ #define COERCE_ENUM(arg) { \ - if (TYPE_CODE (VALUE_TYPE (arg)) == TYPE_CODE_ENUM) \ + if (TYPE_CODE (check_typedef (VALUE_TYPE (arg))) == TYPE_CODE_ENUM) \ arg = value_cast (builtin_type_unsigned_int, arg); \ } @@ -230,9 +233,9 @@ extern value_ptr value_from_longest PARAMS ((struct type *type, LONGEST num)); extern value_ptr value_from_double PARAMS ((struct type *type, DOUBLEST num)); -extern value_ptr value_at PARAMS ((struct type *type, CORE_ADDR addr)); +extern value_ptr value_at PARAMS ((struct type *type, CORE_ADDR addr, asection *sect)); -extern value_ptr value_at_lazy PARAMS ((struct type *type, CORE_ADDR addr)); +extern value_ptr value_at_lazy PARAMS ((struct type *type, CORE_ADDR addr, asection *sect)); extern value_ptr value_from_register PARAMS ((struct type *type, int regnum, struct frame_info * frame)); @@ -297,6 +300,8 @@ extern value_ptr value_struct_elt_for_reference PARAMS ((struct type *domain, char *name, struct type *intype)); +extern value_ptr value_static_field PARAMS ((struct type *type, int fieldno)); + extern value_ptr value_field PARAMS ((value_ptr arg1, int fieldno)); extern value_ptr value_primitive_field PARAMS ((value_ptr arg1, int offset, @@ -412,10 +417,16 @@ read_register_gen PARAMS ((int regno, char *myaddr)); extern CORE_ADDR read_register PARAMS ((int regno)); +extern CORE_ADDR +read_register_pid PARAMS ((int regno, int pid)); + extern void write_register PARAMS ((int regno, LONGEST val)); extern void +write_register_pid PARAMS ((int regno, LONGEST val, int pid)); + +extern void supply_register PARAMS ((int regno, char *val)); extern void @@ -457,7 +468,7 @@ val_print PARAMS ((struct type *type, char *valaddr, CORE_ADDR address, int recurse, enum val_prettyprint pretty)); extern int -val_print_string PARAMS ((CORE_ADDR addr, unsigned int len, GDB_FILE *stream)); +val_print_string PARAMS ((CORE_ADDR addr, int len, int width, GDB_FILE *stream)); extern void print_variable_value PARAMS ((struct symbol *var, struct frame_info *frame, @@ -497,4 +508,6 @@ extern value_ptr find_function_in_inferior PARAMS ((char *)); extern value_ptr value_allocate_space_in_inferior PARAMS ((int)); +extern void _initialize_values PARAMS ((void)); + #endif /* !defined (VALUE_H) */ |