/* This is entry PC record present only at entry point
of a function. Verify it is really the function entry point. */
- struct block *pc_block = block_for_pc (pc);
+ const struct block *pc_block = block_for_pc (pc);
struct symbol *pc_func = NULL;
if (pc_block)
{
struct dwarf_expr_baton *debaton = (struct dwarf_expr_baton *) baton;
struct gdbarch *gdbarch = get_frame_arch (debaton->frame);
- CORE_ADDR result;
- int regnum;
+ int regnum = gdbarch_dwarf2_reg_to_regnum (gdbarch, dwarf_regnum);
- regnum = gdbarch_dwarf2_reg_to_regnum (gdbarch, dwarf_regnum);
- result = address_from_register (builtin_type (gdbarch)->builtin_data_ptr,
- regnum, debaton->frame);
- return result;
+ return address_from_register (regnum, debaton->frame);
}
/* Implement struct dwarf_expr_context_funcs' "get_reg_value" callback. */
this_base method. */
struct symbol *framefunc;
struct dwarf_expr_baton *debaton = (struct dwarf_expr_baton *) baton;
- struct block *bl = get_frame_block (debaton->frame, NULL);
+ const struct block *bl = get_frame_block (debaton->frame, NULL);
if (bl == NULL)
error (_("frame address is not available."));
static int
dwarf2_locexpr_baton_eval (const struct dwarf2_locexpr_baton *dlbaton,
- CORE_ADDR addr, CORE_ADDR *valp)
+ CORE_ADDR *valp)
{
struct dwarf_expr_context *ctx;
struct dwarf_expr_baton baton;
/* See dwarf2loc.h. */
int
-dwarf2_evaluate_property (const struct dynamic_prop *prop, CORE_ADDR address,
- CORE_ADDR *value)
+dwarf2_evaluate_property (const struct dynamic_prop *prop, CORE_ADDR *value)
{
if (prop == NULL)
return 0;
{
const struct dwarf2_property_baton *baton = prop->data.baton;
- if (dwarf2_locexpr_baton_eval (&baton->locexpr, address, value))
+ if (dwarf2_locexpr_baton_eval (&baton->locexpr, value))
{
if (baton->referenced_type)
{
{
const gdb_byte *datastart;
size_t datalen;
- struct block *b;
+ const struct block *b;
struct symbol *framefunc;
b = block_for_pc (expr->scope);
}
else if (data[0] == DW_OP_fbreg)
{
- struct block *b;
+ const struct block *b;
struct symbol *framefunc;
int frame_reg = 0;
int64_t frame_offset;