+/* Not all avr devices support the BREAK insn. Those that don't should treat
+ it as a NOP. Thus, it should be ok. Since the avr is currently a remote
+ only target, this shouldn't be a problem (I hope). TRoth/2003-05-14 */
+
+static const unsigned char *
+avr_breakpoint_from_pc (CORE_ADDR * pcptr, int *lenptr)
+{
+ static unsigned char avr_break_insn [] = { 0x98, 0x95 };
+ *lenptr = sizeof (avr_break_insn);
+ return avr_break_insn;
+}
+
+/* Given a return value in `regbuf' with a type `valtype',
+ extract and copy its value into `valbuf'.
+
+ Return values are always passed via registers r25:r24:... */
+
+static void
+avr_extract_return_value (struct type *type, struct regcache *regcache,
+ void *valbuf)
+{
+ if (TYPE_LENGTH (type) == 1)
+ {
+ ULONGEST c;
+
+ /* For single byte return values, r25 is always cleared, so we can
+ ignore it. */
+ regcache_cooked_read_unsigned (regcache, 24, &c);
+ store_unsigned_integer (valbuf, 1, c);
+ }
+ else
+ {
+ int i;
+ /* The MSB of the return value is always in r25, calculate which
+ register holds the LSB. */
+ int lsb_reg = 25 - TYPE_LENGTH (type) + 1;
+
+ for (i=0; i< TYPE_LENGTH (type); i++)
+ {
+ regcache_cooked_read (regcache, lsb_reg + i,
+ (bfd_byte *) valbuf + i);
+ }
+ }
+}
+