mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: torvalds@osdl.org, akpm@linux-foundation.org
Cc: dhowells@redhat.com, linux-kernel@vger.kernel.org
Subject: [PATCH] FRV: Reinstate null behaviour for the GDB remote protocol 'p' command
Date: Wed, 09 Jun 2010 19:52:22 +0100	[thread overview]
Message-ID: <20100609185222.21720.31044.stgit@warthog.procyon.org.uk> (raw)

Reinstate the null behaviour that the in-kernel gdbstub had for the GDB remote
protocol 'p' command (retrieve a single register value) prior to the following
commit:

	commit 7ca8b9c0dafd1cb36289aa4c92c7beae7adcd34f
	Author: David Howells <dhowells@redhat.com>
	Date:   Mon May 24 14:32:54 2010 -0700
	Subject: 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>
---

 arch/frv/kernel/gdb-stub.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)


diff --git a/arch/frv/kernel/gdb-stub.c b/arch/frv/kernel/gdb-stub.c
index 84d103c..a4dba6b 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];


                 reply	other threads:[~2010-06-09 18:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100609185222.21720.31044.stgit@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®