This is not a request for patch approval.. more for assistance in getting the right patch given what this tells us.. The problem, is evaluating malloc in the target of a gcc -m64 compiled binary.. "p (((void* (*) (int)) &malloc) (sizeof(int)))" will cause a segfault in the inferior (certainly if malloc is not used by the target). I have discovered.. that the problem is when reading using get_target_memory_unsigned inside ppc64_linux_convert_from_func_ptr_addr. This goes down to target_read, which doesn't go through the whole checking down the stack of targets for a better reader., so when presented with current_target, it goes for default_xfer_partial - which, for some reason related to deprecated_xfer_partial, means it never goes to linux_nat_xfer_partial.. Moving to target_memory_read instead of get_target_memory inside get_target_memory_unsigned is a non-winner --- because this is used with a "temporary bfd" target to set a breakpoint whilst things are starting (I think..). So, any attempt to moving to using proper memory reading hierarchy is doomed by that. So, my attached patch, checks to see whether the target provided to ppc64_linux_convert_from_func_ptr_addr is the current target (not the bfd temp one). If it is, then it goes and uses the "nice" memory readers. Otherwise it falls back to the old.. It's a classic fixing the symptom, not the cause.. I'd prefer to fix the cause (hence I'm not suggesting including this, unless anyone really wants me to). d. -- David Lecomber