#include "gdbcore.h"
#include "inferior.h"
#include "target.h"
-#include "symfile.h" /* for overlay functions */
+#include "symfile.h"
#include "regcache.h"
#include "user-regs.h"
#include "block.h"
gdb_assert (frame_id_p (get_frame_id (next_frame)));
reg_val = value::allocate_lazy (register_type (gdbarch, regnum));
- VALUE_LVAL (reg_val) = lval_register;
+ reg_val->set_lval (lval_register);
VALUE_REGNUM (reg_val) = regnum;
VALUE_NEXT_FRAME_ID (reg_val) = get_frame_id (next_frame);
tests that embed global/static symbols with null location lists.
We want to get <optimized out> instead of <frame required> when evaluating
them so return a frame instead of raising an error. */
- else if (var_block == block_global_block (var_block)
- || var_block == block_static_block (var_block))
+ else if (var_block->is_global_block () || var_block->is_static_block ())
return frame;
/* We have to handle the "my_func::my_local_var" notation. This requires us
/* If we failed to find the proper frame, fallback to the heuristic
method below. */
- else if (frame_block == block_global_block (frame_block))
+ else if (frame_block->is_global_block ())
{
frame = NULL;
break;
else if (frame_block->function ())
{
const struct dynamic_prop *static_link
- = block_static_link (frame_block);
+ = frame_block->static_link ();
int could_climb_up = 0;
if (static_link != NULL)
if (frame == NULL)
{
if (var_block->function ()
- && !block_inlined_p (var_block)
+ && !var_block->inlined_p ()
&& var_block->function ()->print_name ())
error (_("No frame is currently executing in block %s."),
var_block->function ()->print_name ());
v = value::allocate (type);
store_signed_integer (v->contents_raw ().data (), type->length (),
type_byte_order (type), var->value_longest ());
- VALUE_LVAL (v) = not_lval;
+ v->set_lval (not_lval);
return v;
case LOC_LABEL:
struct type *void_ptr_type
= builtin_type (var->arch ())->builtin_data_ptr;
v = value_cast_pointers (void_ptr_type, v, 0);
- VALUE_LVAL (v) = not_lval;
+ v->set_lval (not_lval);
return v;
}
v = value::allocate (type);
memcpy (v->contents_raw ().data (), var->value_bytes (),
type->length ());
- VALUE_LVAL (v) = not_lval;
+ v->set_lval (not_lval);
return v;
case LOC_STATIC:
a TLS variable. */
if (obj_section == NULL
|| (obj_section->the_bfd_section->flags & SEC_THREAD_LOCAL) != 0)
- addr = bmsym.minsym->value_raw_address ();
+ addr = CORE_ADDR (bmsym.minsym->unrelocated_address ());
else
- addr = bmsym.value_address ();
+ addr = bmsym.value_address ();
if (overlay_debugging)
addr = symbol_overlayed_address (addr, obj_section);
/* Determine address of TLS variable. */
struct value *value = value::allocate (type);
frame_info_ptr frame;
- VALUE_LVAL (value) = lval_register;
+ value->set_lval (lval_register);
frame = frame_find_by_id (frame_id);
if (frame == NULL)
int regnum = VALUE_REGNUM (value);
int len = type_length_units (check_typedef (value->type ()));
- gdb_assert (VALUE_LVAL (value) == lval_register);
+ gdb_assert (value->lval () == lval_register);
/* Skip registers wholly inside of REG_OFFSET. */
while (reg_offset >= register_size (gdbarch, regnum))
is that gdbarch_register_to_value populates the entire value
including the location. */
v = value::allocate (type);
- VALUE_LVAL (v) = lval_register;
+ v->set_lval (lval_register);
VALUE_NEXT_FRAME_ID (v) = get_frame_id (get_next_frame_sentinel_okay (frame));
VALUE_REGNUM (v) = regnum;
ok = gdbarch_register_to_value (gdbarch, frame, regnum, type1,