int64_t change to leb128 API.
(read_encoded_value, decode_frame_entry_1): Ditto.
* dwarf2expr.c (safe_read_uleb128, safe_read_sleb128): Ditto.
(dwarf_block_to_dwarf_reg, dwarf_block_to_dwarf_reg_deref): Ditto.
(dwarf_block_to_fb_offset, dwarf_block_to_sp_offset): Ditto.
(execute_stack_op): Ditto.
* dwarf2expr.h (gdb_read_uleb128, gdb_read_sleb128): Ditto.
(safe_read_uleb128, safe_read_sleb128): Ditto.
* dwarf2loc.c (decode_debug_loc_dwo_addresses): Ditto.
(dwarf2_compile_expr_to_ax): Ditto.
(locexpr_describe_location_piece): Ditto.
(disassemble_dwarf_expression): Ditto.
(locexpr_describe_location_1): Ditto.
+2012-05-23 Doug Evans <dje@google.com>
+
+ * dwarf2-frame.c (execute_cfa_program): Update to handle long long ->
+ int64_t change to leb128 API.
+ (read_encoded_value, decode_frame_entry_1): Ditto.
+ * dwarf2expr.c (safe_read_uleb128, safe_read_sleb128): Ditto.
+ (dwarf_block_to_dwarf_reg, dwarf_block_to_dwarf_reg_deref): Ditto.
+ (dwarf_block_to_fb_offset, dwarf_block_to_sp_offset): Ditto.
+ (execute_stack_op): Ditto.
+ * dwarf2expr.h (gdb_read_uleb128, gdb_read_sleb128): Ditto.
+ (safe_read_uleb128, safe_read_sleb128): Ditto.
+ * dwarf2loc.c (decode_debug_loc_dwo_addresses): Ditto.
+ (dwarf2_compile_expr_to_ax): Ditto.
+ (locexpr_describe_location_piece): Ditto.
+ (disassemble_dwarf_expression): Ditto.
+ (locexpr_describe_location_1): Ditto.
+
2012-05-23 Stan Shebs <stan@codesourcery.com>
Kwok Cheung Yeung <kcy@codesourcery.com>
while (insn_ptr < insn_end && fs->pc <= pc)
{
gdb_byte insn = *insn_ptr++;
- unsigned long long utmp, reg;
- long long offset;
+ uint64_t utmp, reg;
+ int64_t offset;
if ((insn & 0xc0) == DW_CFA_advance_loc)
fs->pc += (insn & 0x3f) * fs->code_align;
{
case DW_EH_PE_uleb128:
{
- unsigned long long value;
+ uint64_t value;
const gdb_byte *end_buf = buf + (sizeof (value) + 1) * 8 / 7;
*bytes_read_ptr += safe_read_uleb128 (buf, end_buf, &value) - buf;
return (base + bfd_get_64 (unit->abfd, (bfd_byte *) buf));
case DW_EH_PE_sleb128:
{
- long long value;
+ int64_t value;
const gdb_byte *end_buf = buf + (sizeof (value) + 1) * 8 / 7;
*bytes_read_ptr += safe_read_sleb128 (buf, end_buf, &value) - buf;
int dwarf64_p;
ULONGEST cie_id;
ULONGEST cie_pointer;
- long long sleb128;
- unsigned long long uleb128;
+ int64_t sleb128;
+ uint64_t uleb128;
buf = start;
length = read_initial_length (unit->abfd, buf, &bytes_read);
cie->saw_z_augmentation = (*augmentation == 'z');
if (cie->saw_z_augmentation)
{
- unsigned long long length;
+ uint64_t length;
buf = gdb_read_uleb128 (buf, end, &length);
if (buf == NULL)
can skip the whole thing. */
if (fde->cie->saw_z_augmentation)
{
- unsigned long long length;
+ uint64_t length;
buf = gdb_read_uleb128 (buf, end, &length);
if (buf == NULL)
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;
+ uint64_t len;
int dwarf_reg;
CORE_ADDR deref_size;
static inline const gdb_byte *
gdb_read_uleb128 (const gdb_byte *buf, const gdb_byte *buf_end,
- unsigned long long *r)
+ uint64_t *r)
{
- size_t bytes_read = read_uleb128_to_ull (buf, buf_end, r);
+ size_t bytes_read = read_uleb128_to_uint64 (buf, buf_end, r);
if (bytes_read == 0)
return NULL;
static inline const gdb_byte *
gdb_read_sleb128 (const gdb_byte *buf, const gdb_byte *buf_end,
- long long *r)
+ int64_t *r)
{
- size_t bytes_read = read_sleb128_to_ll (buf, buf_end, r);
+ size_t bytes_read = read_sleb128_to_int64 (buf, buf_end, r);
if (bytes_read == 0)
return NULL;
extern const gdb_byte *safe_read_uleb128 (const gdb_byte *buf,
const gdb_byte *buf_end,
- unsigned long long *r);
+ uint64_t *r);
extern const gdb_byte *safe_read_sleb128 (const gdb_byte *buf,
const gdb_byte *buf_end,
- long long *r);
+ int64_t *r);
extern const gdb_byte *safe_skip_leb128 (const gdb_byte *buf,
const gdb_byte *buf_end);
const gdb_byte **new_ptr,
CORE_ADDR *low, CORE_ADDR *high)
{
- unsigned long long low_index, high_index;
+ uint64_t low_index, high_index;
if (loc_ptr == buf_end)
return DEBUG_LOC_BUFFER_OVERFLOW;
while (op_ptr < op_end)
{
enum dwarf_location_atom op = *op_ptr;
- unsigned long long uoffset, reg;
- long long offset;
+ uint64_t uoffset, reg;
+ int64_t offset;
int i;
offsets[op_ptr - base] = expr->len;
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_piece:
case DW_OP_bit_piece:
{
- unsigned long long size, offset;
+ uint64_t size, offset;
if (op_ptr - 1 == previous_piece)
error (_("Cannot translate empty pieces to agent expressions"));
}
else if (data[0] == DW_OP_regx)
{
- unsigned long long reg;
+ uint64_t reg;
data = safe_read_uleb128 (data + 1, end, ®);
fprintf_filtered (stream, _("a variable in $%s"),
struct block *b;
struct symbol *framefunc;
int frame_reg = 0;
- long long frame_offset;
+ int64_t frame_offset;
const gdb_byte *base_data, *new_data, *save_data = data;
size_t base_size;
- long long base_offset = 0;
+ int64_t base_offset = 0;
new_data = safe_read_sleb128 (data + 1, end, &frame_offset);
if (!piece_end_p (new_data, end))
else if (data[0] >= DW_OP_breg0 && data[0] <= DW_OP_breg31
&& piece_end_p (data, end))
{
- long long offset;
+ int64_t offset;
data = safe_read_sleb128 (data + 1, end, &offset);
|| (data[0] != DW_OP_piece && data[0] != DW_OP_bit_piece)))
{
enum dwarf_location_atom op = *data++;
- unsigned long long ul;
- long long l;
+ uint64_t ul;
+ int64_t l;
const char *name;
name = get_DW_OP_name (op);
case DW_OP_bit_piece:
{
- unsigned long long offset;
+ uint64_t offset;
data = safe_read_uleb128 (data, end, &ul);
data = safe_read_uleb128 (data, end, &offset);
case DW_OP_GNU_regval_type:
{
- unsigned long long reg;
+ uint64_t reg;
cu_offset type_die;
struct type *type;
fprintf_filtered (stream, " ");
if (data[0] == DW_OP_piece)
{
- unsigned long long bytes;
+ uint64_t bytes;
data = safe_read_uleb128 (data + 1, end, &bytes);
}
else if (data[0] == DW_OP_bit_piece)
{
- unsigned long long bits, offset;
+ uint64_t bits, offset;
data = safe_read_uleb128 (data + 1, end, &bits);
data = safe_read_uleb128 (data, end, &offset);