diff options
author | Jim Blandy <jimb@codesourcery.com> | 2003-06-24 23:02:10 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2003-06-24 23:02:10 +0000 |
commit | 470883fa912d0abdf47bc8a8bc9a00a1a9eebccd (patch) | |
tree | a78f300062be4818899febd3547ee91febd7de37 | |
parent | 3a8c25de76013051d87151dd63c3b7d59d3971eb (diff) | |
download | gdb-470883fa912d0abdf47bc8a8bc9a00a1a9eebccd.tar.gz |
* ppc-linux-tdep.c (ppc64_desc_entry_point): New function.
(ppc64_standard_linkage_target): Use it.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/ppc-linux-tdep.c | 12 |
2 files changed, 16 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e7d32b2ea42..cf526c099a2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2003-06-24 Jim Blandy <jimb@redhat.com> + + * ppc-linux-tdep.c (ppc64_desc_entry_point): New function. + (ppc64_standard_linkage_target): Use it. + 2003-06-23 Andrew Cagney <cagney@redhat.com> * rs6000-tdep.c (rs6000_register_virtual_type): Add explict cases diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c index ab038b7a2e9..2f369cdccc6 100644 --- a/gdb/ppc-linux-tdep.c +++ b/gdb/ppc-linux-tdep.c @@ -731,6 +731,16 @@ insn_ds_field (unsigned int insn) } +/* If DESC is the address of a 64-bit PowerPC Linux function + descriptor, return the descriptor's entry point. */ +static CORE_ADDR +ppc64_desc_entry_point (CORE_ADDR desc) +{ + /* The first word of the descriptor is the entry point. */ + return (CORE_ADDR) read_memory_unsigned_integer (desc, 8); +} + + /* Pattern for the standard linkage function. These are built by build_plt_stub in elf64-ppc.c, whose GLINK argument is always zero. */ @@ -865,7 +875,7 @@ ppc64_standard_linkage_target (CORE_ADDR pc, unsigned int *insn) + insn_ds_field (insn[2])); /* The first word of the descriptor is the entry point. Return that. */ - return (CORE_ADDR) read_memory_unsigned_integer (desc, 8); + return ppc64_desc_entry_point (desc); } |