(disassemble_current_function): Likewise.
(disassemble_command): Likewise.
+ * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
+ BLOCK_START.
+ * blockframe.c (get_pc_function_start): Likewise.
+ * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
+ (gcc_symbol_address): Likewise.
+ * compile/compile-object-run.c (compile_object_run): Likewise.
+ * compile/compile.c (get_expr_block_and_pc): Likewise.
+ * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
+ (func_addr_to_tail_call_list): Likewise.
+ * findvar.c (default_read_var_value): Likewise.
+ * inline-frame.c (inline_frame_this_id): Likewise.
+ (skip-inline_frames): Likewise.
+ * infcmd.c (until_next_command): Likewise.
+ * linespec.c (convert_linespec_to_sals): Likewise.
+ * parse.c (parse_exp_in_context_1): Likewise.
+ * printcmd.c (build_address_symbolic): likewise.
+ (info_address_command): Likewise.
+ symtab.c (find_function_start_sal): Likewise.
+ (skip_prologue_sal): Likewise.
+ (find_function_alias_target): Likewise.
+ (find_gnu_ifunc): Likewise.
+ * stack.c (find_frame_funname): Likewise.
+ * symtab.c (fixup_symbol_section): Likewise.
+ (find_function_start_sal): Likewise.
+ (skip_prologue_sal): Likewsie.
+ (find_function_alias_target): Likewise.
+ (find_gnu_ifunc): Likewise.
+ * tracepoint.c (info_scope_command): Likewise.
+ * value.c (value_fn_field): Likewise.
+
2018-08-23 Xavier Roirand <roirand@adacore.com>
* machoread.c (macho_symfile_read_all_oso): Remove uneeded
break;
case LOC_BLOCK:
- ax_const_l (ax, BLOCK_START (SYMBOL_BLOCK_VALUE (var)));
+ ax_const_l (ax, BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (var)));
value->kind = axs_rvalue;
break;
if (symbol)
{
bl = SYMBOL_BLOCK_VALUE (symbol);
- return BLOCK_START (bl);
+ return BLOCK_ENTRY_PC (bl);
}
}
{
struct symbol *sym = find_pc_function (pc);
- if (sym != NULL && BLOCK_START (SYMBOL_BLOCK_VALUE (sym)) == pc)
+ if (sym != NULL && BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (sym)) == pc)
return SYMBOL_TYPE (sym);
return NULL;
case LOC_BLOCK:
kind = GCC_C_SYMBOL_FUNCTION;
- addr = BLOCK_START (SYMBOL_BLOCK_VALUE (sym.symbol));
+ addr = BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (sym.symbol));
if (is_global && TYPE_GNU_IFUNC (SYMBOL_TYPE (sym.symbol)))
addr = gnu_ifunc_resolve_addr (target_gdbarch (), addr);
break;
fprintf_unfiltered (gdb_stdlog,
"gcc_symbol_address \"%s\": full symbol\n",
identifier);
- result = BLOCK_START (SYMBOL_BLOCK_VALUE (sym));
+ result = BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (sym));
if (TYPE_GNU_IFUNC (SYMBOL_TYPE (sym)))
result = gnu_ifunc_resolve_addr (target_gdbarch (), result);
found = 1;
gdb_assert (TYPE_CODE (func_type) == TYPE_CODE_FUNC);
func_val = value_from_pointer (lookup_pointer_type (func_type),
- BLOCK_START (SYMBOL_BLOCK_VALUE (func_sym)));
+ BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (func_sym)));
vargs = XALLOCAVEC (struct value *, TYPE_NFIELDS (func_type));
if (TYPE_NFIELDS (func_type) >= 1)
block = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (cursal.symtab),
STATIC_BLOCK);
if (block != NULL)
- *pc = BLOCK_START (block);
+ *pc = BLOCK_ENTRY_PC (block);
}
else
- *pc = BLOCK_START (block);
+ *pc = BLOCK_ENTRY_PC (block);
return block;
}
if (pc_block)
pc_func = block_linkage_function (pc_block);
- if (pc_func && pc == BLOCK_START (SYMBOL_BLOCK_VALUE (pc_func)))
+ if (pc_func && pc == BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (pc_func)))
{
*locexpr_length = length;
return loc_ptr;
struct symbol *sym = find_pc_function (addr);
struct type *type;
- if (sym == NULL || BLOCK_START (SYMBOL_BLOCK_VALUE (sym)) != addr)
+ if (sym == NULL || BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (sym)) != addr)
throw_error (NO_ENTRY_VALUE_ERROR,
_("DW_TAG_call_site resolving failed to find function "
"name for address %s"),
case LOC_BLOCK:
if (overlay_debugging)
addr = symbol_overlayed_address
- (BLOCK_START (SYMBOL_BLOCK_VALUE (var)),
+ (BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (var)),
SYMBOL_OBJ_SECTION (symbol_objfile (var), var));
else
- addr = BLOCK_START (SYMBOL_BLOCK_VALUE (var));
+ addr = BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (var));
break;
case LOC_REGISTER:
{
sal = find_pc_line (pc, 0);
- tp->control.step_range_start = BLOCK_START (SYMBOL_BLOCK_VALUE (func));
+ tp->control.step_range_start = BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (func));
tp->control.step_range_end = sal.end;
}
tp->control.may_range_step = 1;
in the frame ID (and eventually, to set breakpoints). */
func = get_frame_function (this_frame);
gdb_assert (func != NULL);
- (*this_id).code_addr = BLOCK_START (SYMBOL_BLOCK_VALUE (func));
+ (*this_id).code_addr = BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (func));
(*this_id).artificial_depth++;
}
if (block_inlined_p (cur_block))
{
/* See comments in inline_frame_this_id about this use
- of BLOCK_START. */
- if (BLOCK_START (cur_block) == this_pc
+ of BLOCK_ENTRY_PC. */
+ if (BLOCK_ENTRY_PC (cur_block) == this_pc
|| block_starting_point_at (this_pc, cur_block))
{
/* Do not skip the inlined frame if execution
&& SYMBOL_CLASS (sym) == LOC_BLOCK)
{
const CORE_ADDR addr
- = BLOCK_START (SYMBOL_BLOCK_VALUE (sym));
+ = BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (sym));
bound_minimal_symbol_d *elem;
for (int m = 0;
if (!expression_context_block)
expression_context_block = get_selected_block (&expression_context_pc);
else if (pc == 0)
- expression_context_pc = BLOCK_START (expression_context_block);
+ expression_context_pc = BLOCK_ENTRY_PC (expression_context_block);
else
expression_context_pc = pc;
= BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (cursal.symtab),
STATIC_BLOCK);
if (expression_context_block)
- expression_context_pc = BLOCK_START (expression_context_block);
+ expression_context_pc = BLOCK_ENTRY_PC (expression_context_block);
}
if (language_mode == language_mode_auto && block != NULL)
pointer is <function+3>. This matches the ISA behavior. */
addr = gdbarch_addr_bits_remove (gdbarch, addr);
- name_location = BLOCK_START (SYMBOL_BLOCK_VALUE (symbol));
+ name_location = BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (symbol));
if (do_demangle || asm_demangle)
name_temp = SYMBOL_PRINT_NAME (symbol);
else
case LOC_BLOCK:
printf_filtered (_("a function at address "));
- load_addr = BLOCK_START (SYMBOL_BLOCK_VALUE (sym));
+ load_addr = BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (sym));
fputs_filtered (paddress (gdbarch, load_addr), gdb_stdout);
if (section_is_overlay (section))
{
if (msymbol.minsym != NULL
&& (BMSYMBOL_VALUE_ADDRESS (msymbol)
- > BLOCK_START (SYMBOL_BLOCK_VALUE (func))))
+ > BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (func))))
{
/* We also don't know anything about the function besides
its address and name. */
addr = SYMBOL_VALUE_ADDRESS (sym);
break;
case LOC_BLOCK:
- addr = BLOCK_START (SYMBOL_BLOCK_VALUE (sym));
+ addr = BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (sym));
break;
default:
{
fixup_symbol_section (sym, NULL);
symtab_and_line sal
- = find_function_start_sal_1 (BLOCK_START (SYMBOL_BLOCK_VALUE (sym)),
+ = find_function_start_sal_1 (BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (sym)),
SYMBOL_OBJ_SECTION (symbol_objfile (sym), sym),
funfirstline);
sal.symbol = sym;
fixup_symbol_section (sym, NULL);
objfile = symbol_objfile (sym);
- pc = BLOCK_START (SYMBOL_BLOCK_VALUE (sym));
+ pc = BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (sym));
section = SYMBOL_OBJ_SECTION (objfile, sym);
name = SYMBOL_LINKAGE_NAME (sym);
}
/* Check if gdbarch_skip_prologue left us in mid-line, and the next
line is still part of the same function. */
if (skip && start_sal.pc != pc
- && (sym ? (BLOCK_START (SYMBOL_BLOCK_VALUE (sym)) <= start_sal.end
+ && (sym ? (BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (sym)) <= start_sal.end
&& start_sal.end < BLOCK_END (SYMBOL_BLOCK_VALUE (sym)))
: (lookup_minimal_symbol_by_pc_section (start_sal.end, section).minsym
== lookup_minimal_symbol_by_pc_section (pc, section).minsym)))
symbol *sym = find_pc_function (func_addr);
if (sym != NULL
&& SYMBOL_CLASS (sym) == LOC_BLOCK
- && BLOCK_START (SYMBOL_BLOCK_VALUE (sym)) == func_addr)
+ && BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (sym)) == func_addr)
return sym;
return NULL;
symbol_name_match_type::SEARCH_NAME);
struct objfile *objfile = symbol_objfile (sym);
- CORE_ADDR address = BLOCK_START (SYMBOL_BLOCK_VALUE (sym));
+ CORE_ADDR address = BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (sym));
minimal_symbol *ifunc = NULL;
iterate_over_minimal_symbols (objfile, lookup_name,
if (SYMBOL_COMPUTED_OPS (sym) != NULL)
SYMBOL_COMPUTED_OPS (sym)->describe_location (sym,
- BLOCK_START (block),
+ BLOCK_ENTRY_PC (block),
gdb_stdout);
else
{
case LOC_BLOCK:
printf_filtered ("a function at address ");
printf_filtered ("%s",
- paddress (gdbarch, BLOCK_START (SYMBOL_BLOCK_VALUE (sym))));
+ paddress (gdbarch, BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (sym))));
break;
case LOC_UNRESOLVED:
msym = lookup_minimal_symbol (SYMBOL_LINKAGE_NAME (sym),
VALUE_LVAL (v) = lval_memory;
if (sym)
{
- set_value_address (v, BLOCK_START (SYMBOL_BLOCK_VALUE (sym)));
+ set_value_address (v, BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (sym)));
}
else
{