瀏覽代碼

FRV: Reinstate null behaviour for the GDB remote protocol 'p' command

Reinstate the null behaviour that the in-kernel gdbstub had for the GDB
remote protocol 'p' command (retrieve a single register value) prior to
commit 7ca8b9c0dafd ("frv: extend gdbstub to support more features of
gdb").

Before that, the 'p' command just returned an empty reply, which causes
gdb to then go and use the 'g' command.  However, since that commit, the
'p' command returns an error string, which causes gdb to abort its
connection to the target.

Not all gdb versions are affected, some use try 'g' first, and if that
works, don't bother with 'p', and so don't see the error.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Howells 15 年之前
父節點
當前提交
a7f5378e24
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      arch/frv/kernel/gdb-stub.c

+ 6 - 0
arch/frv/kernel/gdb-stub.c

@@ -1789,6 +1789,12 @@ void gdbstub(int sigval)
 			flush_cache = 1;
 			flush_cache = 1;
 			break;
 			break;
 
 
+			/* pNN: Read value of reg N and return it */
+		case 'p':
+			/* return no value, indicating that we don't support
+			 * this command and that gdb should use 'g' instead */
+			break;
+
 			/* PNN,=RRRRRRRR: Write value R to reg N return OK */
 			/* PNN,=RRRRRRRR: Write value R to reg N return OK */
 		case 'P':
 		case 'P':
 			ptr = &input_buffer[1];
 			ptr = &input_buffer[1];