32 unsigned int *bytes_read_ptr)
35 unsigned int num_read;
44 byte = bfd_get_8 (abfd, buf);
47 result |= ((ULONGEST) (
byte & 127) << shift);
48 if ((
byte & 128) == 0)
54 *bytes_read_ptr = num_read;
60 unsigned int *bytes_read_ptr)
71 byte = bfd_get_8 (abfd, buf);
74 result |= ((ULONGEST) (
byte & 127) << shift);
76 if ((
byte & 128) == 0)
81 if ((shift < 8 *
sizeof (result)) && (
byte & 0x40))
82 result |= -(((ULONGEST) 1) << shift);
83 *bytes_read_ptr = num_read;
93 LONGEST length = bfd_get_32 (abfd, buf);
95 if (length == 0xffffffff)
97 length = bfd_get_64 (abfd, buf + 4);
100 else if (handle_nonstd && length == 0)
103 length = bfd_get_64 (abfd, buf);
117read_offset (bfd *abfd,
const gdb_byte *buf,
unsigned int offset_size)
124 retval = bfd_get_32 (abfd, buf);
127 retval = bfd_get_64 (abfd, buf);
130 internal_error (_(
"read_offset_1: bad switch [in module %s]"),
131 bfd_get_filename (abfd));
LONGEST read_signed_leb128(bfd *abfd, const gdb_byte *buf, unsigned int *bytes_read_ptr)
LONGEST read_initial_length(bfd *abfd, const gdb_byte *buf, unsigned int *bytes_read, bool handle_nonstd)
ULONGEST read_unsigned_leb128(bfd *abfd, const gdb_byte *buf, unsigned int *bytes_read_ptr)
LONGEST read_offset(bfd *abfd, const gdb_byte *buf, unsigned int offset_size)