*** /home/mark/skyride.sw/gdb-6.3.50.20051116/gdb/ppc-linux-tdep.c 2005-07-13 17:29:04.000000000 +0100 --- gdb/ppc-linux-tdep.c 2006-03-05 11:39:13.012233208 +0000 *************** *** 38,43 **** --- 38,44 ---- #include "trad-frame.h" #include "frame-unwind.h" #include "tramp-frame.h" + #include "gdb_assert.h" /* The following instructions are used in the signal trampoline code on GNU/Linux PPC. The kernel used to use magic syscalls 0x6666 and *************** ppc64_linux_convert_from_func_ptr_addr ( *** 794,805 **** CORE_ADDR addr, struct target_ops *targ) { struct section_table *s = target_section_by_addr (targ, addr); /* Check if ADDR points to a function descriptor. */ if (s && strcmp (s->the_bfd_section->name, ".opd") == 0) ! return get_target_memory_unsigned (targ, addr, 8); ! return addr; } --- 795,816 ---- CORE_ADDR addr, struct target_ops *targ) { + char buf[sizeof (ULONGEST)]; struct section_table *s = target_section_by_addr (targ, addr); + /* Check if ADDR points to a function descriptor. */ if (s && strcmp (s->the_bfd_section->name, ".opd") == 0) ! { ! if (targ != ¤t_target) ! return get_target_memory_unsigned (targ, addr, 8); ! else ! { ! gdb_assert (8 <= sizeof (buf)); ! target_read_memory(addr, buf, 8); ! return extract_unsigned_integer (buf, 8); ! } ! } return addr; }