2003-06-05 Andrew Cagney <cagney@redhat.com>
* Makefile.in (value_h): Add $(frame_h). * value.h: Include "frame.h". (struct value): Replace "frame_addr" with "frame_id". (VALUE_FRAME_ID): Replace VALUE_FRAME. * values.c (allocate_value): Use VALUE_FRAME_ID. (value_copy): Use VALUE_FRAME_ID. * findvar.c (value_from_register): Use VALUE_FRAME_ID. * valops.c (value_assign): Update. Use frame_find_by_id.
This commit is contained in:
parent
b1bd302e10
commit
1df6926e87
6 changed files with 24 additions and 15 deletions
|
@ -1,3 +1,14 @@
|
|||
2003-06-05 Andrew Cagney <cagney@redhat.com>
|
||||
|
||||
* Makefile.in (value_h): Add $(frame_h).
|
||||
* value.h: Include "frame.h".
|
||||
(struct value): Replace "frame_addr" with "frame_id".
|
||||
(VALUE_FRAME_ID): Replace VALUE_FRAME.
|
||||
* values.c (allocate_value): Use VALUE_FRAME_ID.
|
||||
(value_copy): Use VALUE_FRAME_ID.
|
||||
* findvar.c (value_from_register): Use VALUE_FRAME_ID.
|
||||
* valops.c (value_assign): Update. Use frame_find_by_id.
|
||||
|
||||
2003-06-05 Michal Ludvig <mludvig@suse.cz>
|
||||
|
||||
* x86-64-tdep.c (x86_64_push_arguments): Don't clear offset
|
||||
|
|
|
@ -735,7 +735,7 @@ typeprint_h = typeprint.h
|
|||
ui_file_h = ui-file.h
|
||||
ui_out_h = ui-out.h
|
||||
valprint_h = valprint.h
|
||||
value_h = value.h $(doublest_h) $(symtab_h) $(gdbtypes_h) $(expression_h)
|
||||
value_h = value.h $(doublest_h) $(frame_h) $(symtab_h) $(gdbtypes_h) $(expression_h)
|
||||
varobj_h = varobj.h $(symtab_h) $(gdbtypes_h)
|
||||
vax_tdep_h = vax-tdep.h
|
||||
version_h = version.h
|
||||
|
|
|
@ -769,7 +769,7 @@ value_from_register (struct type *type, int regnum, struct frame_info *frame)
|
|||
for some good purpose. */
|
||||
{
|
||||
VALUE_LVAL (v) = lval_reg_frame_relative;
|
||||
VALUE_FRAME (v) = get_frame_base (frame);
|
||||
VALUE_FRAME_ID (v) = get_frame_id (frame);
|
||||
VALUE_FRAME_REGNUM (v) = regnum;
|
||||
}
|
||||
else if (mem_stor)
|
||||
|
|
|
@ -605,10 +605,7 @@ value_assign (struct value *toval, struct value *fromval)
|
|||
}
|
||||
else
|
||||
{
|
||||
for (frame = get_current_frame ();
|
||||
frame && get_frame_base (frame) != VALUE_FRAME (toval);
|
||||
frame = get_prev_frame (frame))
|
||||
;
|
||||
frame = frame_find_by_id (VALUE_FRAME_ID (toval));
|
||||
value_reg = VALUE_FRAME_REGNUM (toval);
|
||||
}
|
||||
|
||||
|
|
15
gdb/value.h
15
gdb/value.h
|
@ -25,6 +25,7 @@
|
|||
#define VALUE_H 1
|
||||
|
||||
#include "doublest.h"
|
||||
#include "frame.h" /* For struct frame_id. */
|
||||
|
||||
struct block;
|
||||
struct expression;
|
||||
|
@ -77,12 +78,12 @@ struct value
|
|||
For BITS_BIG_ENDIAN=1 targets, it is the position of the MSB. */
|
||||
int bitpos;
|
||||
|
||||
/* Frame value is relative to. In practice, this address is only
|
||||
used if the value is stored in several registers in other than
|
||||
the current frame, and these registers have not all been saved
|
||||
at the same place in memory. This will be described in the
|
||||
lval enum above as "lval_reg_frame_relative". */
|
||||
CORE_ADDR frame_addr;
|
||||
/* Frame value is relative to. In practice, this ID is only used if
|
||||
the value is stored in several registers in other than the
|
||||
current frame, and these registers have not all been saved at the
|
||||
same place in memory. This will be described in the lval enum
|
||||
above as "lval_reg_frame_relative". */
|
||||
struct frame_id frame_id;
|
||||
|
||||
/* Type of the value. */
|
||||
struct type *type;
|
||||
|
@ -216,7 +217,7 @@ extern int value_fetch_lazy (struct value *val);
|
|||
#define VALUE_ADDRESS(val) (val)->location.address
|
||||
#define VALUE_INTERNALVAR(val) (val)->location.internalvar
|
||||
#define VALUE_FRAME_REGNUM(val) ((val)->location.regnum)
|
||||
#define VALUE_FRAME(val) ((val)->frame_addr)
|
||||
#define VALUE_FRAME_ID(val) ((val)->frame_id)
|
||||
#define VALUE_OFFSET(val) (val)->offset
|
||||
#define VALUE_BITSIZE(val) (val)->bitsize
|
||||
#define VALUE_BITPOS(val) (val)->bitpos
|
||||
|
|
|
@ -90,7 +90,7 @@ allocate_value (struct type *type)
|
|||
VALUE_ENCLOSING_TYPE (val) = type;
|
||||
VALUE_LVAL (val) = not_lval;
|
||||
VALUE_ADDRESS (val) = 0;
|
||||
VALUE_FRAME (val) = 0;
|
||||
VALUE_FRAME_ID (val) = null_frame_id;
|
||||
VALUE_OFFSET (val) = 0;
|
||||
VALUE_BITPOS (val) = 0;
|
||||
VALUE_BITSIZE (val) = 0;
|
||||
|
@ -222,7 +222,7 @@ value_copy (struct value *arg)
|
|||
VALUE_OFFSET (val) = VALUE_OFFSET (arg);
|
||||
VALUE_BITPOS (val) = VALUE_BITPOS (arg);
|
||||
VALUE_BITSIZE (val) = VALUE_BITSIZE (arg);
|
||||
VALUE_FRAME (val) = VALUE_FRAME (arg);
|
||||
VALUE_FRAME_ID (val) = VALUE_FRAME_ID (arg);
|
||||
VALUE_REGNO (val) = VALUE_REGNO (arg);
|
||||
VALUE_LAZY (val) = VALUE_LAZY (arg);
|
||||
VALUE_OPTIMIZED_OUT (val) = VALUE_OPTIMIZED_OUT (arg);
|
||||
|
|
Loading…
Reference in a new issue