From a7f5378e2449fc8ae3f92739a6cc2239748ef86a Mon Sep 17 00:00:00 2001 From: David Howells Date: Wed, 9 Jun 2010 19:52:22 +0100 Subject: 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 Signed-off-by: Linus Torvalds --- arch/frv/kernel/gdb-stub.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch/frv') diff --git a/arch/frv/kernel/gdb-stub.c b/arch/frv/kernel/gdb-stub.c index 84d103c33c9..a4dba6b20bd 100644 --- a/arch/frv/kernel/gdb-stub.c +++ b/arch/frv/kernel/gdb-stub.c @@ -1789,6 +1789,12 @@ void gdbstub(int sigval) flush_cache = 1; 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 */ case 'P': ptr = &input_buffer[1]; -- cgit v1.2.3-70-g09d2