- (*bp) = gdbarch_convert_from_func_ptr_addr (current_gdbarch,
- (CORE_ADDR) notify.u.bptaddr,
- ¤t_target);
+ gdb_assert (exec_bfd);
+ (*bp) = (gdbarch_convert_from_func_ptr_addr
+ (current_gdbarch,
+ /* Do proper sign extension for the target. */
+ (bfd_get_sign_extend_vma (exec_bfd) > 0
+ ? (CORE_ADDR) (intptr_t) notify.u.bptaddr
+ : (CORE_ADDR) (uintptr_t) notify.u.bptaddr),
+ ¤t_target));