mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-26 22:07:58 +08:00
2005-07-08 Paul Koning <pkoning@equallogic.com>
* dwarf2.c (read_address): Check sign_extend_vma to handle targets where addresses are sign extended.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2005-07-08 Paul Koning <pkoning@equallogic.com>
|
||||||
|
|
||||||
|
* dwarf2.c (read_address): Check sign_extend_vma to handle targets
|
||||||
|
where addresses are sign extended.
|
||||||
|
|
||||||
2005-07-08 Ralf Corsepius <ralf.corsepius@rtems.org>
|
2005-07-08 Ralf Corsepius <ralf.corsepius@rtems.org>
|
||||||
|
|
||||||
* config.bfd: Mark i960-*-rtems*, or32-*-rtems* as obsolete.
|
* config.bfd: Mark i960-*-rtems*, or32-*-rtems* as obsolete.
|
||||||
|
37
bfd/dwarf2.c
37
bfd/dwarf2.c
@ -347,16 +347,35 @@ read_indirect_string (struct comp_unit* unit,
|
|||||||
static bfd_uint64_t
|
static bfd_uint64_t
|
||||||
read_address (struct comp_unit *unit, bfd_byte *buf)
|
read_address (struct comp_unit *unit, bfd_byte *buf)
|
||||||
{
|
{
|
||||||
switch (unit->addr_size)
|
int signed_vma = get_elf_backend_data (unit->abfd)->sign_extend_vma;
|
||||||
|
|
||||||
|
if (signed_vma)
|
||||||
{
|
{
|
||||||
case 8:
|
switch (unit->addr_size)
|
||||||
return bfd_get_64 (unit->abfd, buf);
|
{
|
||||||
case 4:
|
case 8:
|
||||||
return bfd_get_32 (unit->abfd, buf);
|
return bfd_get_signed_64 (unit->abfd, buf);
|
||||||
case 2:
|
case 4:
|
||||||
return bfd_get_16 (unit->abfd, buf);
|
return bfd_get_signed_32 (unit->abfd, buf);
|
||||||
default:
|
case 2:
|
||||||
abort ();
|
return bfd_get_signed_16 (unit->abfd, buf);
|
||||||
|
default:
|
||||||
|
abort ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
switch (unit->addr_size)
|
||||||
|
{
|
||||||
|
case 8:
|
||||||
|
return bfd_get_64 (unit->abfd, buf);
|
||||||
|
case 4:
|
||||||
|
return bfd_get_32 (unit->abfd, buf);
|
||||||
|
case 2:
|
||||||
|
return bfd_get_16 (unit->abfd, buf);
|
||||||
|
default:
|
||||||
|
abort ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user