+2003-06-13 Theodore A. Roth <troth@openavr.org>
+
+ * avr-tdep.c (avr_address_to_pointer): Shift code addrs right 1 bit.
+ (avr_pointer_to_address): Shift code addrs left 1 bit.
+ (avr_convert_from_func_ptr_addr): Delete function since operation is
+ better handled by avr_address_to_pointer and avr_pointer_to_address.
+ (avr_gdbarch_init): Don't set convert_from_func_ptr_add method.
+
2003-06-13 Mark Kettenis <kettenis@gnu.org>
From Kelley Cook <kelleycook@wideopenwest.com>:
|| TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_METHOD)
{
store_unsigned_integer (buf, TYPE_LENGTH (type),
- avr_convert_iaddr_to_raw (addr));
+ avr_convert_iaddr_to_raw (addr >> 1));
}
else
{
if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_FUNC
|| TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_METHOD
|| TYPE_CODE_SPACE (TYPE_TARGET_TYPE (type)))
- return avr_make_iaddr (addr);
+ return avr_make_iaddr (addr << 1);
else
return avr_make_saddr (addr);
}
*targ_len = nr_bytes;
}
-/* Function pointers obtained from the target are half of what gdb expects so
- multiply by 2. */
-
-static CORE_ADDR
-avr_convert_from_func_ptr_addr (CORE_ADDR addr)
-{
- return addr * 2;
-}
-
/* avr_scan_prologue is also used as the
deprecated_frame_init_saved_regs().
set_gdbarch_frame_locals_address (gdbarch, avr_frame_address);
set_gdbarch_deprecated_saved_pc_after_call (gdbarch, avr_saved_pc_after_call);
- set_gdbarch_convert_from_func_ptr_addr (gdbarch,
- avr_convert_from_func_ptr_addr);
-
return gdbarch;
}