uint8_t signal )
{
char cmd[64];
+ uint8_t sreg;
+
+ READ_SREG_INTO(g->avr, sreg);
sprintf(cmd, "T%02x20:%02x;21:%02x%02x;22:%02x%02x%02x00;",
- signal ? signal : 5, g->avr->data[R_SREG],
+ signal ? signal : 5, sreg,
g->avr->data[R_SPL], g->avr->data[R_SPH],
g->avr->pc & 0xff, (g->avr->pc>>8)&0xff, (g->avr->pc>>16)&0xff);
gdb_send_reply(g, cmd);
if (kind & type) {
/* Send gdb reply (see GDB user manual appendix E.3). */
char cmd[78];
+ uint8_t sreg;
+
+ READ_SREG_INTO(g->avr, sreg);
sprintf(cmd, "T%02x20:%02x;21:%02x%02x;22:%02x%02x%02x00;%s:%06x;",
- 5, g->avr->data[R_SREG],
+ 5, sreg,
g->avr->data[R_SPL], g->avr->data[R_SPH],
g->avr->pc & 0xff, (g->avr->pc>>8)&0xff, (g->avr->pc>>16)&0xff,
kind & AVR_GDB_WATCH_ACCESS ? "awatch" :