aboutsummaryrefslogtreecommitdiff
path: root/gdb/hppa-tdep.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2008-08-21 13:19:18 +0000
committerPedro Alves <palves@redhat.com>2008-08-21 13:19:18 +0000
commitaded6f54f0cb9d9b44d72d06af7b940cdeb1876b (patch)
tree153a15e75764db0005c7b5b325abd0415ed889e5 /gdb/hppa-tdep.c
parent2b60860a4c823c5de508a6af53fcfd1c57c31cba (diff)
downloadgdb-aded6f54f0cb9d9b44d72d06af7b940cdeb1876b.zip
gdb-aded6f54f0cb9d9b44d72d06af7b940cdeb1876b.tar.gz
gdb-aded6f54f0cb9d9b44d72d06af7b940cdeb1876b.tar.bz2
* arm-tdep.c (arm_pc_is_thumb): Use obj_section_addr.
* hppa-hpux-tdep.c (hppa_hpux_find_dummy_bpaddr): Likewise. * hppa-linux-tdep.c (hppa_linux_find_global_pointer): Use obj_section_addr and obj_section_endaddr. * hppa-tdep.c (hppa64_convert_code_addr_to_fptr): Likewise. * hppabsd-tdep.c (hppabsd_find_global_pointer): Likewise. * ia64-tdep.c (ia64_find_global_pointer): Likewise. (find_extant_func_descr): Likewise. * solib-frv.c (frv_relocate_main_executable): Use obj_section_addr. * xstormy16-tdep.c (xstormy16_find_jmp_table_entry): Use obj_section_addr and obj_section_endaddr.
Diffstat (limited to 'gdb/hppa-tdep.c')
-rw-r--r--gdb/hppa-tdep.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index ace04a3..11ef093 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -912,15 +912,17 @@ hppa64_convert_code_addr_to_fptr (CORE_ADDR code)
ALL_OBJFILE_OSECTIONS (sec->objfile, opd)
{
if (strcmp (opd->the_bfd_section->name, ".opd") == 0)
- break;
+ break;
}
if (opd < sec->objfile->sections_end)
{
CORE_ADDR addr;
- for (addr = opd->addr; addr < opd->endaddr; addr += 2 * 8)
- {
+ for (addr = obj_section_addr (opd);
+ addr < obj_section_endaddr (opd);
+ addr += 2 * 8)
+ {
ULONGEST opdaddr;
char tmp[8];
@@ -928,7 +930,7 @@ hppa64_convert_code_addr_to_fptr (CORE_ADDR code)
break;
opdaddr = extract_unsigned_integer (tmp, sizeof (tmp));
- if (opdaddr == code)
+ if (opdaddr == code)
return addr - 16;
}
}