aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-eh-frame.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2005-01-17 17:12:00 +0000
committerH.J. Lu <hjl.tools@gmail.com>2005-01-17 17:12:00 +0000
commitc0c28ab8b2757069a1abf73fcb4714f077e76995 (patch)
tree686027415dd9fb54b14f026b032457cea5376965 /bfd/elf-eh-frame.c
parent4bcff7eb8534c90270f0b574a244d99648906f36 (diff)
downloadgdb-c0c28ab8b2757069a1abf73fcb4714f077e76995.zip
gdb-c0c28ab8b2757069a1abf73fcb4714f077e76995.tar.gz
gdb-c0c28ab8b2757069a1abf73fcb4714f077e76995.tar.bz2
2005-01-17 H.J. Lu <hongjiu.lu@intel.com>
* dwarf2.c (dwarf2_debug): Move info_ptr_unit to ... (comp_unit): Here. (read_unsigned_leb128): Removed. (read_signed_leb128): Removed. (find_abstract_instance_name): Updated. (parse_comp_unit): Accept info_ptr_unit. (_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each comp unit and pass it to parse_comp_unit. * elf-eh-frame.c (read_unsigned_leb128): Moved to ... (read_signed_leb128): Moved to ... * libbfd.c: Here. * libbfd-in.h (read_unsigned_leb128): New prototype. (read_signed_leb128): Likewise. * libbfd.h: Regenerated.
Diffstat (limited to 'bfd/elf-eh-frame.c')
-rw-r--r--bfd/elf-eh-frame.c58
1 files changed, 0 insertions, 58 deletions
diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c
index 0c0b32c..6e811b3 100644
--- a/bfd/elf-eh-frame.c
+++ b/bfd/elf-eh-frame.c
@@ -26,64 +26,6 @@
#define EH_FRAME_HDR_SIZE 8
-/* Helper function for reading uleb128 encoded data. */
-
-static bfd_vma
-read_unsigned_leb128 (bfd *abfd ATTRIBUTE_UNUSED,
- char *buf,
- unsigned int *bytes_read_ptr)
-{
- bfd_vma result;
- unsigned int num_read;
- int shift;
- unsigned char byte;
-
- result = 0;
- shift = 0;
- num_read = 0;
- do
- {
- byte = bfd_get_8 (abfd, (bfd_byte *) buf);
- buf++;
- num_read++;
- result |= (((bfd_vma) byte & 0x7f) << shift);
- shift += 7;
- }
- while (byte & 0x80);
- *bytes_read_ptr = num_read;
- return result;
-}
-
-/* Helper function for reading sleb128 encoded data. */
-
-static bfd_signed_vma
-read_signed_leb128 (bfd *abfd ATTRIBUTE_UNUSED,
- char *buf,
- unsigned int * bytes_read_ptr)
-{
- bfd_vma result;
- int shift;
- int num_read;
- unsigned char byte;
-
- result = 0;
- shift = 0;
- num_read = 0;
- do
- {
- byte = bfd_get_8 (abfd, (bfd_byte *) buf);
- buf ++;
- num_read ++;
- result |= (((bfd_vma) byte & 0x7f) << shift);
- shift += 7;
- }
- while (byte & 0x80);
- if (byte & 0x40)
- result |= (((bfd_vma) -1) << (shift - 7)) << 7;
- *bytes_read_ptr = num_read;
- return result;
-}
-
#define read_uleb128(VAR, BUF) \
do \
{ \