summaryrefslogtreecommitdiff
path: root/gdb/ia64-tdep.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2008-05-06 20:03:03 +0000
committerJoel Brobecker <brobecker@gnat.com>2008-05-06 20:03:03 +0000
commitf249c6e196ff4e8d058ab60198d212d344d89bd0 (patch)
treeb33d890a842a013163e149e52fbd5fefc877bc39 /gdb/ia64-tdep.c
parentc1b0b5c980a6705ffc07b899373652282ee666d6 (diff)
downloadgdb-f249c6e196ff4e8d058ab60198d212d344d89bd0.tar.gz
* ia64-tdep.c (ia64_convert_from_func_ptr_addr): Treat addresses
pointing inside a non-executable section as function descriptors.
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 499213a8cb3..ec0d14ebbae 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)
{