aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/debug/gdbstub.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/debug/gdbstub.c')
-rw-r--r--kernel/debug/gdbstub.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/kernel/debug/gdbstub.c b/kernel/debug/gdbstub.c
index 3c000490a7dd..4b17b3269525 100644
--- a/kernel/debug/gdbstub.c
+++ b/kernel/debug/gdbstub.c
@@ -201,6 +201,9 @@ void gdbstub_msg_write(const char *s, int len)
201 int wcount; 201 int wcount;
202 int i; 202 int i;
203 203
204 if (len == 0)
205 len = strlen(s);
206
204 /* 'O'utput */ 207 /* 'O'utput */
205 gdbmsgbuf[0] = 'O'; 208 gdbmsgbuf[0] = 'O';
206 209
@@ -685,6 +688,25 @@ static void gdb_cmd_query(struct kgdb_state *ks)
685 kgdb_mem2hex(tmpstr, remcom_out_buffer, strlen(tmpstr)); 688 kgdb_mem2hex(tmpstr, remcom_out_buffer, strlen(tmpstr));
686 } 689 }
687 break; 690 break;
691#ifdef CONFIG_KGDB_KDB
692 case 'R':
693 if (strncmp(remcom_in_buffer, "qRcmd,", 6) == 0) {
694 int len = strlen(remcom_in_buffer + 6);
695
696 if ((len % 2) != 0) {
697 strcpy(remcom_out_buffer, "E01");
698 break;
699 }
700 kgdb_hex2mem(remcom_in_buffer + 6,
701 remcom_out_buffer, len);
702 len = len / 2;
703 remcom_out_buffer[len++] = 0;
704
705 kdb_parse(remcom_out_buffer);
706 strcpy(remcom_out_buffer, "OK");
707 }
708 break;
709#endif
688 } 710 }
689} 711}
690 712