diff options
author | Joel Brobecker <brobecker@gnat.com> | 2008-05-06 20:03:03 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2008-05-06 20:03:03 +0000 |
commit | b1e6fd1961bf6906b9990e2a260f410b6b474272 (patch) | |
tree | f41b270f86f23a6b7cefcef4d2401da6a054e535 | |
parent | 02b19d84634b886502f86700748971b42dc77465 (diff) | |
download | gdb-b1e6fd1961bf6906b9990e2a260f410b6b474272.zip gdb-b1e6fd1961bf6906b9990e2a260f410b6b474272.tar.gz gdb-b1e6fd1961bf6906b9990e2a260f410b6b474272.tar.bz2 |
* ia64-tdep.c (ia64_convert_from_func_ptr_addr): Treat addresses
pointing inside a non-executable section as function descriptors.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/ia64-tdep.c | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7eb3b7b..4e3cf01 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2008-05-06 Joel Brobecker <brobecker@adacore.com> + + * ia64-tdep.c (ia64_convert_from_func_ptr_addr): Treat addresses + pointing inside a non-executable section as function descriptors. + 2008-05-06 Pedro Alves <pedro@codesourcery.com> * inf-loop.c (inferior_event_handler): Run all continuations and 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) { |