* value.h (address_of_variable): Add prototype.

(locate_var_value): Remove prototype.

	* findvar.c (read_var_value): Do not attempt to default frame
	to selected frame.
	(locate_var_value): Remove function.
	* valops.c (value_of_variable): Retrieve selected frame for
	symbols that require a frame when called with NULL block.
	* valops.c (address_of_variable): New function.

	* eval.c (evaluate_subexp_for_address): Call address_of_variable
	instead of calling locate_var_value.
	(evaluate_subexp_with_coercion): Likewise.
This commit is contained in:
Ulrich Weigand
2009-01-15 15:38:07 +00:00
parent cc2420d5bb
commit 61212c0fb1
5 changed files with 81 additions and 90 deletions

View File

@@ -310,6 +310,8 @@ extern CORE_ADDR address_from_register (struct type *type, int regnum,
extern struct value *value_of_variable (struct symbol *var, struct block *b);
extern struct value *address_of_variable (struct symbol *var, struct block *b);
extern struct value *value_of_register (int regnum, struct frame_info *frame);
struct value *value_of_register_lazy (struct frame_info *frame, int regnum);
@@ -319,9 +321,6 @@ extern int symbol_read_needs_frame (struct symbol *);
extern struct value *read_var_value (struct symbol *var,
struct frame_info *frame);
extern struct value *locate_var_value (struct symbol *var,
struct frame_info *frame);
extern struct value *allocate_value (struct type *type);
extern struct value *allocate_value_lazy (struct type *type);
extern void allocate_value_contents (struct value *value);