const struct comp_unit_head *,
unsigned int *);
-static unsigned long read_unsigned_leb128 (bfd *, gdb_byte *, unsigned int *);
+static ULONGEST read_unsigned_leb128 (bfd *, gdb_byte *, unsigned int *);
-static long read_signed_leb128 (bfd *, gdb_byte *, unsigned int *);
+static LONGEST read_signed_leb128 (bfd *, gdb_byte *, unsigned int *);
static gdb_byte *skip_leb128 (bfd *, gdb_byte *);
struct type *type,
const char *name,
struct obstack *obstack,
- struct dwarf2_cu *cu, long *value,
+ struct dwarf2_cu *cu, LONGEST *value,
gdb_byte **bytes,
struct dwarf2_locexpr_baton **baton);
for (child = die->child; child != NULL; child = child->sibling)
{
struct type *type;
- long value;
+ LONGEST value;
gdb_byte *bytes;
struct dwarf2_locexpr_baton *baton;
struct value *v;
return read_indirect_string_at_offset (abfd, str_offset);
}
-static unsigned long
+static ULONGEST
read_unsigned_leb128 (bfd *abfd, gdb_byte *buf, unsigned int *bytes_read_ptr)
{
- unsigned long result;
+ ULONGEST result;
unsigned int num_read;
int i, shift;
unsigned char byte;
byte = bfd_get_8 (abfd, buf);
buf++;
num_read++;
- result |= ((unsigned long)(byte & 127) << shift);
+ result |= ((ULONGEST) (byte & 127) << shift);
if ((byte & 128) == 0)
{
break;
return result;
}
-static long
+static LONGEST
read_signed_leb128 (bfd *abfd, gdb_byte *buf, unsigned int *bytes_read_ptr)
{
- long result;
+ LONGEST result;
int i, shift, num_read;
unsigned char byte;
byte = bfd_get_8 (abfd, buf);
buf++;
num_read++;
- result |= ((long)(byte & 127) << shift);
+ result |= ((LONGEST) (byte & 127) << shift);
shift += 7;
if ((byte & 128) == 0)
{
}
}
if ((shift < 8 * sizeof (result)) && (byte & 0x40))
- result |= -(((long)1) << shift);
+ result |= -(((LONGEST) 1) << shift);
*bytes_read_ptr = num_read;
return result;
}
static gdb_byte *
dwarf2_const_value_data (struct attribute *attr, struct type *type,
const char *name, struct obstack *obstack,
- struct dwarf2_cu *cu, long *value, int bits)
+ struct dwarf2_cu *cu, LONGEST *value, int bits)
{
struct objfile *objfile = cu->objfile;
enum bfd_endian byte_order = bfd_big_endian (objfile->obfd) ?
dwarf2_const_value_attr (struct attribute *attr, struct type *type,
const char *name, struct obstack *obstack,
struct dwarf2_cu *cu,
- long *value, gdb_byte **bytes,
+ LONGEST *value, gdb_byte **bytes,
struct dwarf2_locexpr_baton **baton)
{
struct objfile *objfile = cu->objfile;
{
struct objfile *objfile = cu->objfile;
struct comp_unit_head *cu_header = &cu->header;
- long value;
+ LONGEST value;
gdb_byte *bytes;
struct dwarf2_locexpr_baton *baton;