mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jason Wessel <jason.wessel@windriver.com>
To: torvalds@linux-foundation.org
Cc: linux-kernel@vger.kernel.org,
	kgdb-bugreport@lists.sourceforge.net,
	Jason Wessel <jason.wessel@windriver.com>
Subject: [PATCH 6/8] kgdbts,sh: Add in breakpoint pc offset for superh
Date: Mon, 22 Mar 2010 14:17:27 -0500	[thread overview]
Message-ID: <1269285449-1424-7-git-send-email-jason.wessel@windriver.com> (raw)
In-Reply-To: <1269285449-1424-6-git-send-email-jason.wessel@windriver.com>

The kgdb test suite mimics the behavior of gdb.  For the sh
architecture the pc must be decremented by 2 for software breakpoint.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
---
 drivers/misc/kgdbts.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c
index fcb6ec1..7245023 100644
--- a/drivers/misc/kgdbts.c
+++ b/drivers/misc/kgdbts.c
@@ -295,6 +295,10 @@ static int check_and_rewind_pc(char *put_str, char *arg)
 	/* On x86 a breakpoint stop requires it to be decremented */
 	if (addr + 1 == kgdbts_regs.ip)
 		offset = -1;
+#elif defined(CONFIG_SUPERH)
+	/* On SUPERH a breakpoint stop requires it to be decremented */
+	if (addr + 2 == kgdbts_regs.pc)
+		offset = -2;
 #endif
 	if (strcmp(arg, "silent") &&
 		instruction_pointer(&kgdbts_regs) + offset != addr) {
@@ -305,6 +309,8 @@ static int check_and_rewind_pc(char *put_str, char *arg)
 #ifdef CONFIG_X86
 	/* On x86 adjust the instruction pointer if needed */
 	kgdbts_regs.ip += offset;
+#elif defined(CONFIG_SUPERH)
+	kgdbts_regs.pc += offset;
 #endif
 	return 0;
 }
-- 
1.6.4.rc1


  reply	other threads:[~2010-03-22 19:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-22 19:17 [GIT PULL] kgdb fixes for 2.6.34-rc2 Jason Wessel
2010-03-22 19:17 ` [PATCH 1/8] Move kernel/kgdb.c to kernel/debug/debug_core.c Jason Wessel
2010-03-22 19:17   ` [PATCH 2/8] Separate the gdbstub from the debug core Jason Wessel
2010-03-22 19:17     ` [PATCH 3/8] kgdb: eliminate kgdb_wait(), all cpus enter the same way Jason Wessel
2010-03-22 19:17       ` [PATCH 4/8] kgdb: have ebin2mem call probe_kernel_write once Jason Wessel
2010-03-22 19:17         ` [PATCH 5/8] kgdb,debug_core: Use atomic operators which use barriers Jason Wessel
2010-03-22 19:17           ` Jason Wessel [this message]
2010-03-22 19:17             ` [PATCH 7/8] debug_core: Turn off tracing while in the debugger Jason Wessel
2010-03-22 19:17               ` [PATCH 8/8] MAINTAINERS: update kgdb, and debug_core info Jason Wessel
2010-03-29 14:01 ` [GIT PULL] kgdb fixes for 2.6.34-rc2 Jason Wessel
2010-04-01 16:04   ` Linus Torvalds
2010-04-02 18:38     ` Jason Wessel

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=1269285449-1424-7-git-send-email-jason.wessel@windriver.com \
    --to=jason.wessel@windriver.com \
    --cc=kgdb-bugreport@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.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

Powered by JetHome