forked from Imagelibrary/binutils-gdb
DWARF-5: call sites
this patch updates all call sites related DWARF-5 renames. gdb/ChangeLog 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com> * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and DW_AT_GNU_*. * common/common-exceptions.h (enum errors): Likewise. * dwarf2-frame.c (class dwarf_expr_executor): Likewise. * dwarf2expr.c (dwarf_block_to_dwarf_reg) (dwarf_expr_context::execute_stack_op): Likewise. * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece): Likewise. * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type) (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value) (show_entry_values_debug, call_site_to_target_addr) (func_addr_to_tail_call_list, func_verify_no_selftailcall) (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value) (entry_data_value_free_closure, value_of_dwarf_reg_entry) (value_of_dwarf_block_entry, indirect_pieced_value) (symbol_needs_eval_context::push_dwarf_reg_entry_value): (disassemble_dwarf_expression): Likewise. * dwarf2read.c (process_die, inherit_abstract_dies) (read_call_site_scope): Likewise. * gdbtypes.h (struct func_type, struct call_site_parameter) (struct call_site): Likewise. * stack.c (read_frame_arg): Likewise. * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise. gdb/doc/ChangeLog 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com> * gdb.texinfo (Print Settings, Tail Call Frames): Rename DW_OP_GNU_*, DW_TAG_GNU_* and DW_AT_GNU_*. gdb/testsuite/ChangeLog 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com> * gdb.arch/amd64-entry-value-param-dwarf5.S: New file. * gdb.arch/amd64-entry-value-param-dwarf5.c: New file. * gdb.arch/amd64-entry-value-param-dwarf5.exp: New file. * gdb.arch/amd64-entry-value.exp: Rename DW_OP_GNU_*, DW_TAG_GNU_* and DW_AT_GNU_*.
This commit is contained in:
@@ -423,7 +423,7 @@ dwarf_block_to_dwarf_reg (const gdb_byte *buf, const gdb_byte *buf_end)
|
||||
return *buf - DW_OP_reg0;
|
||||
}
|
||||
|
||||
if (*buf == DW_OP_GNU_regval_type)
|
||||
if (*buf == DW_OP_regval_type || *buf == DW_OP_GNU_regval_type)
|
||||
{
|
||||
buf++;
|
||||
buf = gdb_read_uleb128 (buf, buf_end, &dwarf_reg);
|
||||
@@ -805,12 +805,13 @@ dwarf_expr_context::execute_stack_op (const gdb_byte *op_ptr,
|
||||
dwarf_expr_require_composition (op_ptr, op_end, "DW_OP_stack_value");
|
||||
goto no_push;
|
||||
|
||||
case DW_OP_implicit_pointer:
|
||||
case DW_OP_GNU_implicit_pointer:
|
||||
{
|
||||
int64_t len;
|
||||
|
||||
if (this->ref_addr_size == -1)
|
||||
error (_("DWARF-2 expression error: DW_OP_GNU_implicit_pointer "
|
||||
error (_("DWARF-2 expression error: DW_OP_implicit_pointer "
|
||||
"is not allowed in frame context"));
|
||||
|
||||
/* The referred-to DIE of sect_offset kind. */
|
||||
@@ -825,7 +826,7 @@ dwarf_expr_context::execute_stack_op (const gdb_byte *op_ptr,
|
||||
|
||||
this->location = DWARF_VALUE_IMPLICIT_POINTER;
|
||||
dwarf_expr_require_composition (op_ptr, op_end,
|
||||
"DW_OP_GNU_implicit_pointer");
|
||||
"DW_OP_implicit_pointer");
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -963,6 +964,7 @@ dwarf_expr_context::execute_stack_op (const gdb_byte *op_ptr,
|
||||
|
||||
case DW_OP_deref:
|
||||
case DW_OP_deref_size:
|
||||
case DW_OP_deref_type:
|
||||
case DW_OP_GNU_deref_type:
|
||||
{
|
||||
int addr_size = (op == DW_OP_deref ? this->addr_size : *op_ptr++);
|
||||
@@ -972,7 +974,7 @@ dwarf_expr_context::execute_stack_op (const gdb_byte *op_ptr,
|
||||
|
||||
pop ();
|
||||
|
||||
if (op == DW_OP_GNU_deref_type)
|
||||
if (op == DW_OP_deref_type || op == DW_OP_GNU_deref_type)
|
||||
{
|
||||
cu_offset type_die;
|
||||
|
||||
@@ -1299,6 +1301,7 @@ dwarf_expr_context::execute_stack_op (const gdb_byte *op_ptr,
|
||||
}
|
||||
goto no_push;
|
||||
|
||||
case DW_OP_entry_value:
|
||||
case DW_OP_GNU_entry_value:
|
||||
{
|
||||
uint64_t len;
|
||||
@@ -1307,7 +1310,7 @@ dwarf_expr_context::execute_stack_op (const gdb_byte *op_ptr,
|
||||
|
||||
op_ptr = safe_read_uleb128 (op_ptr, op_end, &len);
|
||||
if (op_ptr + len > op_end)
|
||||
error (_("DW_OP_GNU_entry_value: too few bytes available."));
|
||||
error (_("DW_OP_entry_value: too few bytes available."));
|
||||
|
||||
kind_u.dwarf_reg = dwarf_block_to_dwarf_reg (op_ptr, op_ptr + len);
|
||||
if (kind_u.dwarf_reg != -1)
|
||||
@@ -1332,7 +1335,7 @@ dwarf_expr_context::execute_stack_op (const gdb_byte *op_ptr,
|
||||
goto no_push;
|
||||
}
|
||||
|
||||
error (_("DWARF-2 expression error: DW_OP_GNU_entry_value is "
|
||||
error (_("DWARF-2 expression error: DW_OP_entry_value is "
|
||||
"supported only for single DW_OP_reg* "
|
||||
"or for DW_OP_breg*(0)+DW_OP_deref*"));
|
||||
}
|
||||
@@ -1350,6 +1353,7 @@ dwarf_expr_context::execute_stack_op (const gdb_byte *op_ptr,
|
||||
}
|
||||
goto no_push;
|
||||
|
||||
case DW_OP_const_type:
|
||||
case DW_OP_GNU_const_type:
|
||||
{
|
||||
cu_offset type_die;
|
||||
@@ -1368,6 +1372,7 @@ dwarf_expr_context::execute_stack_op (const gdb_byte *op_ptr,
|
||||
}
|
||||
break;
|
||||
|
||||
case DW_OP_regval_type:
|
||||
case DW_OP_GNU_regval_type:
|
||||
{
|
||||
cu_offset type_die;
|
||||
@@ -1382,7 +1387,9 @@ dwarf_expr_context::execute_stack_op (const gdb_byte *op_ptr,
|
||||
}
|
||||
break;
|
||||
|
||||
case DW_OP_convert:
|
||||
case DW_OP_GNU_convert:
|
||||
case DW_OP_reinterpret:
|
||||
case DW_OP_GNU_reinterpret:
|
||||
{
|
||||
cu_offset type_die;
|
||||
@@ -1399,7 +1406,7 @@ dwarf_expr_context::execute_stack_op (const gdb_byte *op_ptr,
|
||||
result_val = fetch (0);
|
||||
pop ();
|
||||
|
||||
if (op == DW_OP_GNU_convert)
|
||||
if (op == DW_OP_convert || op == DW_OP_GNU_convert)
|
||||
result_val = value_cast (type, result_val);
|
||||
else if (type == value_type (result_val))
|
||||
{
|
||||
@@ -1407,7 +1414,7 @@ dwarf_expr_context::execute_stack_op (const gdb_byte *op_ptr,
|
||||
}
|
||||
else if (TYPE_LENGTH (type)
|
||||
!= TYPE_LENGTH (value_type (result_val)))
|
||||
error (_("DW_OP_GNU_reinterpret has wrong size"));
|
||||
error (_("DW_OP_reinterpret has wrong size"));
|
||||
else
|
||||
result_val
|
||||
= value_from_contents (type,
|
||||
|
||||
Reference in New Issue
Block a user