aboutsummaryrefslogtreecommitdiff
path: root/gdb/ia64-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/ia64-tdep.c')
-rw-r--r--gdb/ia64-tdep.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index 499213a..ec0d14e 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -3229,6 +3229,12 @@ ia64_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr,
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. */
+ if (s && (s->the_bfd_section->flags & SEC_CODE) == 0)
+ return read_memory_unsigned_integer (addr, 8);
+
/* There are also descriptors embedded in vtables. */
if (s)
{