mirror of https://github.com/thesofproject/sof.git
GDB: Added the possibility to remove breakpoints.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This commit is contained in:
parent
cbd5b297a9
commit
031fc9fc11
|
@ -205,6 +205,39 @@ while (1) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'z': /* remove HW breakpoint */
|
||||||
|
switch (*request++) {
|
||||||
|
/* remove HW breakpoint */
|
||||||
|
case '1':
|
||||||
|
if (*request++ == ',' && hex_to_int(&request, &addr) &&
|
||||||
|
*request++ == ',' && hex_to_int(&request, &length)) {
|
||||||
|
for (i = 0; i < XCHAL_NUM_IBREAK; ++i) {
|
||||||
|
if (sregs[IBREAKENABLE] & (1 << i) &&
|
||||||
|
sregs[IBREAKA + i] == addr) {
|
||||||
|
sregs[IBREAKENABLE]
|
||||||
|
&= ~(1 << i);
|
||||||
|
write_sr(IBREAKENABLE);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (i == XCHAL_NUM_IBREAK)
|
||||||
|
strcpy((char *)remcom_out_buffer,
|
||||||
|
"E02");
|
||||||
|
else
|
||||||
|
strcpy((char *)remcom_out_buffer, "OK");
|
||||||
|
} else {
|
||||||
|
strcpy((char *)remcom_out_buffer, "E01");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
/* SW breakpoints */
|
||||||
|
default:
|
||||||
|
/* send empty response to indicate thet SW breakpoints
|
||||||
|
* are not supported
|
||||||
|
*/
|
||||||
|
strcpy((char *)remcom_out_buffer, "");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
gdb_log_exception("Unknown GDB command.");
|
gdb_log_exception("Unknown GDB command.");
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue