* 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.
+2008-08-21 Pedro Alves <pedro@codesourcery.com>
+
+ * 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.
+
2008-08-21 Paul N. Hilfinger <hilfinger@adacore.com>
* NEWS: Amplify last entry on boolean types in Ada.
{
struct arm_per_objfile *data;
VEC(arm_mapping_symbol_s) *map;
- struct arm_mapping_symbol map_key = { memaddr - sec->addr, 0 };
+ struct arm_mapping_symbol map_key = { memaddr - obj_section_addr (sec),
+ 0 };
unsigned int idx;
data = objfile_data (sec->objfile, arm_objfile_data_key);
{
/* First try the lowest address in the section; we can use it as long
as it is "regular" code (i.e. not a stub) */
- u = find_unwind_entry (sec->addr);
+ u = find_unwind_entry (obj_section_addr (sec));
if (!u || u->stub_unwind.stub_type == 0)
- return sec->addr;
+ return obj_section_addr (sec);
/* Otherwise, we need to find a symbol for a regular function. We
do this by walking the list of msymbols in the objfile. The symbol
if (osect < faddr_sect->objfile->sections_end)
{
- CORE_ADDR addr;
+ CORE_ADDR addr, endaddr;
- addr = osect->addr;
- while (addr < osect->endaddr)
+ addr = obj_section_addr (osect);
+ endaddr = obj_section_endaddr (osect);
+
+ while (addr < endaddr)
{
int status;
LONGEST tag;
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];
break;
opdaddr = extract_unsigned_integer (tmp, sizeof (tmp));
- if (opdaddr == code)
+ if (opdaddr == code)
return addr - 16;
}
}
if (sec < faddr_sec->objfile->sections_end)
{
- CORE_ADDR addr = sec->addr;
+ CORE_ADDR addr = obj_section_addr (sec);
+ CORE_ADDR endaddr = obj_section_endaddr (sec);
- while (addr < sec->endaddr)
+ while (addr < endaddr)
{
gdb_byte buf[4];
LONGEST tag;
if (osect < faddr_sect->objfile->sections_end)
{
- CORE_ADDR addr;
+ CORE_ADDR addr, endaddr;
- addr = osect->addr;
- while (addr < osect->endaddr)
+ addr = obj_section_addr (osect);
+ endaddr = obj_section_endaddr (osect);
+
+ while (addr < endaddr)
{
int status;
LONGEST tag;
if (osect < faddr_sect->objfile->sections_end)
{
- CORE_ADDR addr;
+ CORE_ADDR addr, endaddr;
+
+ addr = obj_section_addr (osect);
+ endaddr = obj_section_endaddr (osect);
- addr = osect->addr;
- while (addr < osect->endaddr)
+ while (addr < endaddr)
{
int status;
LONGEST faddr2;
osect_idx = osect->the_bfd_section->index;
/* Current address of section. */
- addr = osect->addr;
+ addr = obj_section_addr (osect);
/* Offset from where this section started. */
offset = ANOFFSET (symfile_objfile->section_offsets, osect_idx);
/* Original address prior to any past relocations. */
if (osect < faddr_sect->objfile->sections_end)
{
- CORE_ADDR addr;
- for (addr = osect->addr;
- addr < osect->endaddr; addr += 2 * xstormy16_inst_size)
+ CORE_ADDR addr, endaddr;
+
+ addr = obj_section_addr (osect);
+ endaddr = obj_section_endaddr (osect);
+
+ for (; addr < endaddr; addr += 2 * xstormy16_inst_size)
{
LONGEST inst, inst2, faddr2;
char buf[2 * xstormy16_inst_size];