+static const unsigned char *
+avr_breakpoint_from_pc (struct gdbarch *gdbarch,
+ CORE_ADDR *pcptr, int *lenptr)
+{
+ static const unsigned char avr_break_insn [] = { 0x98, 0x95 };
+ *lenptr = sizeof (avr_break_insn);
+ return avr_break_insn;
+}
+
+/* Determine, for architecture GDBARCH, how a return value of TYPE
+ should be returned. If it is supposed to be returned in registers,
+ and READBUF is non-zero, read the appropriate value from REGCACHE,
+ and copy it into READBUF. If WRITEBUF is non-zero, write the value
+ from WRITEBUF into REGCACHE. */
+
+static enum return_value_convention
+avr_return_value (struct gdbarch *gdbarch, struct value *function,
+ struct type *valtype, struct regcache *regcache,
+ gdb_byte *readbuf, const gdb_byte *writebuf)
+{
+ int i;
+ /* Single byte are returned in r24.
+ Otherwise, the MSB of the return value is always in r25, calculate which
+ register holds the LSB. */
+ int lsb_reg;
+
+ if ((TYPE_CODE (valtype) == TYPE_CODE_STRUCT
+ || TYPE_CODE (valtype) == TYPE_CODE_UNION
+ || TYPE_CODE (valtype) == TYPE_CODE_ARRAY)
+ && TYPE_LENGTH (valtype) > 8)
+ return RETURN_VALUE_STRUCT_CONVENTION;
+
+ if (TYPE_LENGTH (valtype) <= 2)
+ lsb_reg = 24;
+ else if (TYPE_LENGTH (valtype) <= 4)
+ lsb_reg = 22;
+ else if (TYPE_LENGTH (valtype) <= 8)
+ lsb_reg = 18;
+ else
+ gdb_assert_not_reached ("unexpected type length");