if (reg >= IA64_FR0_REGNUM && reg <= IA64_FR127_REGNUM)
return builtin_type_ia64_ext;
else
- return builtin_type_long;
+ return builtin_type (arch)->builtin_long;
}
static int
"segbase=0x%s, length=%s, gp=0x%s\n",
(char *) di->u.ti.name_ptr,
paddr_nz (di->u.ti.segbase),
- paddr_u (di->u.ti.table_len),
+ pulongest (di->u.ti.table_len),
paddr_nz (di->gp));
return 0;
}
paddr_nz (di.u.ti.segbase),
paddr_nz (di.start_ip), paddr_nz (di.end_ip),
paddr_nz (di.gp),
- paddr_u (di.u.ti.table_len),
+ pulongest (di.u.ti.table_len),
paddr_nz ((CORE_ADDR)di.u.ti.table_data));
}
else
paddr_nz (di.u.rti.segbase),
paddr_nz (di.start_ip), paddr_nz (di.end_ip),
paddr_nz (di.gp),
- paddr_u (di.u.rti.table_len),
+ pulongest (di.u.rti.table_len),
paddr_nz (di.u.rti.table_data));
}
void *buf = NULL;
text_sec = objfile->sections + SECT_OFF_TEXT (objfile);
- ip = text_sec->addr;
+ ip = obj_section_addr (text_sec);
ret = ia64_find_unwind_table (objfile, ip, &di, &buf);
if (ret >= 0)
{
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;
if (s && strcmp (s->the_bfd_section->name, ".opd") == 0)
return read_memory_unsigned_integer (addr, 8);
- /* If ADDR points to a section that is not executable, then it cannot
- be pointing to a function. So it must be pointing to a function
- descriptor. */
+ /* Normally, functions live inside a section that is executable.
+ So, if ADDR points to a non-executable section, then treat it
+ as a function descriptor and return the target address iff
+ the target address itself points to a section that is executable. */
if (s && (s->the_bfd_section->flags & SEC_CODE) == 0)
- return read_memory_unsigned_integer (addr, 8);
+ {
+ CORE_ADDR pc = read_memory_unsigned_integer (addr, 8);
+ struct obj_section *pc_section = find_pc_section (pc);
+
+ if (pc_section && (pc_section->the_bfd_section->flags & SEC_CODE))
+ return pc;
+ }
/* There are also descriptors embedded in vtables. */
if (s)
if (gdbarch_debug >= 1)
fprintf_unfiltered (gdb_stdlog,
"dummy frame id: code 0x%s, stack 0x%s, special 0x%s\n",
- paddr_nz (frame_pc_unwind (this_frame)),
+ paddr_nz (get_frame_pc (this_frame)),
paddr_nz (sp), paddr_nz (bsp));
return frame_id_build_special (sp, get_frame_pc (this_frame), bsp);