repair gdbstub to match the gdbserial protocol specification

The gdbserial protocol handler should return an empty packet instead
of an error string when ever it responds to a command it does not
implement.

The problem cases come from a debugger client sending
qTBuffer, qTStatus, qSearch, qSupported.

The incorrect response from the gdbstub leads the debugger clients to
not function correctly. Recent versions of gdb will not detach correctly as a result of this behavior.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Dongdong Deng <dongdong.deng@windriver.com>

+3 -6
+3 -6
kernel/debug/gdbstub.c
··· 621 621 switch (remcom_in_buffer[1]) { 622 622 case 's': 623 623 case 'f': 624 - if (memcmp(remcom_in_buffer + 2, "ThreadInfo", 10)) { 625 - error_packet(remcom_out_buffer, -EINVAL); 624 + if (memcmp(remcom_in_buffer + 2, "ThreadInfo", 10)) 626 625 break; 627 - } 628 626 629 627 i = 0; 630 628 remcom_out_buffer[0] = 'm'; ··· 663 665 pack_threadid(remcom_out_buffer + 2, thref); 664 666 break; 665 667 case 'T': 666 - if (memcmp(remcom_in_buffer + 1, "ThreadExtraInfo,", 16)) { 667 - error_packet(remcom_out_buffer, -EINVAL); 668 + if (memcmp(remcom_in_buffer + 1, "ThreadExtraInfo,", 16)) 668 669 break; 669 - } 670 + 670 671 ks->threadid = 0; 671 672 ptr = remcom_in_buffer + 17; 672 673 kgdb_hex2long(&ptr, &ks->threadid);