const gdb_byte *
safe_read_uleb128 (const gdb_byte *buf, const gdb_byte *buf_end,
- unsigned long long *r)
+ uint64_t *r)
{
buf = gdb_read_uleb128 (buf, buf_end, r);
if (buf == NULL)
const gdb_byte *
safe_read_sleb128 (const gdb_byte *buf, const gdb_byte *buf_end,
- long long *r)
+ int64_t *r)
{
buf = gdb_read_sleb128 (buf, buf_end, r);
if (buf == NULL)
int
dwarf_block_to_dwarf_reg (const gdb_byte *buf, const gdb_byte *buf_end)
{
- unsigned long long dwarf_reg;
+ uint64_t dwarf_reg;
if (buf_end <= buf)
return -1;
dwarf_block_to_dwarf_reg_deref (const gdb_byte *buf, const gdb_byte *buf_end,
CORE_ADDR *deref_size_return)
{
- unsigned long long dwarf_reg;
- long long offset;
+ uint64_t dwarf_reg;
+ int64_t offset;
if (buf_end <= buf)
return -1;
dwarf_block_to_fb_offset (const gdb_byte *buf, const gdb_byte *buf_end,
CORE_ADDR *fb_offset_return)
{
- long long fb_offset;
+ int64_t fb_offset;
if (buf_end <= buf)
return 0;
dwarf_block_to_sp_offset (struct gdbarch *gdbarch, const gdb_byte *buf,
const gdb_byte *buf_end, CORE_ADDR *sp_offset_return)
{
- unsigned long long dwarf_reg;
- long long sp_offset;
+ uint64_t dwarf_reg;
+ int64_t sp_offset;
if (buf_end <= buf)
return 0;
This is just an optimization, so it's always ok to punt
and leave this as 0. */
int in_stack_memory = 0;
- unsigned long long uoffset, reg;
- long long offset;
+ uint64_t uoffset, reg;
+ int64_t offset;
struct value *result_val = NULL;
/* The DWARF expression might have a bug causing an infinite
case DW_OP_implicit_value:
{
- unsigned long long len;
+ uint64_t len;
op_ptr = safe_read_uleb128 (op_ptr, op_end, &len);
if (op_ptr + len > op_end)
case DW_OP_GNU_implicit_pointer:
{
- long long len;
+ int64_t len;
if (ctx->ref_addr_size == -1)
error (_("DWARF-2 expression error: DW_OP_GNU_implicit_pointer "
case DW_OP_piece:
{
- unsigned long long size;
+ uint64_t size;
/* Record the piece. */
op_ptr = safe_read_uleb128 (op_ptr, op_end, &size);
case DW_OP_bit_piece:
{
- unsigned long long size, offset;
+ uint64_t size, offset;
/* Record the piece. */
op_ptr = safe_read_uleb128 (op_ptr, op_end, &size);
case DW_OP_GNU_entry_value:
{
- unsigned long long len;
- int dwarf_reg;
+ uint64_t len;
CORE_ADDR deref_size;
+ union call_site_parameter_u kind_u;
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."));
- dwarf_reg = dwarf_block_to_dwarf_reg (op_ptr, op_ptr + len);
- if (dwarf_reg != -1)
+ kind_u.dwarf_reg = dwarf_block_to_dwarf_reg (op_ptr, op_ptr + len);
+ if (kind_u.dwarf_reg != -1)
{
op_ptr += len;
- ctx->funcs->push_dwarf_reg_entry_value (ctx, dwarf_reg,
- 0 /* unused */,
+ ctx->funcs->push_dwarf_reg_entry_value (ctx,
+ CALL_SITE_PARAMETER_DWARF_REG,
+ kind_u,
-1 /* deref_size */);
goto no_push;
}
- dwarf_reg = dwarf_block_to_dwarf_reg_deref (op_ptr, op_ptr + len,
- &deref_size);
- if (dwarf_reg != -1)
+ kind_u.dwarf_reg = dwarf_block_to_dwarf_reg_deref (op_ptr,
+ op_ptr + len,
+ &deref_size);
+ if (kind_u.dwarf_reg != -1)
{
if (deref_size == -1)
deref_size = ctx->addr_size;
op_ptr += len;
- ctx->funcs->push_dwarf_reg_entry_value (ctx, dwarf_reg,
- 0 /* unused */,
- deref_size);
+ ctx->funcs->push_dwarf_reg_entry_value (ctx,
+ CALL_SITE_PARAMETER_DWARF_REG,
+ kind_u, deref_size);
goto no_push;
}
"or for DW_OP_breg*(0)+DW_OP_deref*"));
}
+ case DW_OP_GNU_parameter_ref:
+ {
+ union call_site_parameter_u kind_u;
+
+ kind_u.param_offset.cu_off = extract_unsigned_integer (op_ptr, 4,
+ byte_order);
+ op_ptr += 4;
+ ctx->funcs->push_dwarf_reg_entry_value (ctx,
+ CALL_SITE_PARAMETER_PARAM_OFFSET,
+ kind_u,
+ -1 /* deref_size */);
+ }
+ goto no_push;
+
case DW_OP_GNU_const_type:
{
cu_offset type_die;
void
ctx_no_push_dwarf_reg_entry_value (struct dwarf_expr_context *ctx,
- int dwarf_reg, CORE_ADDR fb_offset,
+ enum call_site_parameter_kind kind,
+ union call_site_parameter_u kind_u,
int deref_size)
{
internal_error (__FILE__, __LINE__,