ppc64_linux_convert_from_func_ptr_addr is broken in many
ways:
- despite its name get_target_memory_unsigned does not read
memory, but
section contents, thus it will return some unrelocated
value instead of
the real memory contents.
- target_section_by_addr also matches unrelocated section
addresses, thus
can return a section that has nothing to do with the
running process.
I get much better results when reverting the function to the
state before
this commit:
2003-10-24 Andrew Cagney <cagney redhat.com>
* target.c: Include "gdbcore.h".
(get_target_memory, get_target_memory_unsigned): New
functions.
* target.h (get_target_memory, get_target_memory_unsigned):
Declare.
* ppc-linux-tdep.c
(ppc64_linux_convert_from_func_ptr_addr):
Use get_target_memory_unsigned.
* Makefile.in (target.o): Update dependencies.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg,
Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5
214B 8276 4ED5
"And now for something completely different."
|