All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Joseph Barrow <D.Barow@option.com>
To: Jason Wessel <jason.wessel@windriver.com>,
	KGDB Mailing List <kgdb-bugreport@lists.sourceforge.net>,
	gareth@valinux.com, markus.t.metzger@intel.com,
	Linux Serial <linux-serial@vger.kernel.org>
Cc: Filip Aben <f.aben@option.com>
Subject: [PATCH]l gdb serial debugging appears be broken since at least 2.6.28-rc6 by tty layer now hopefully fixed
Date: Fri, 16 Jan 2009 16:58:49 +0100	[thread overview]
Message-ID: <4970AEB9.5080702@option.com> (raw)
In-Reply-To: <49708E50.8080103@option.com>

[-- Attachment #1: Type: text/plain, Size: 1543 bytes --]

Hi all,
I changed the code back to something it was like in 2.6.27-rc6 & it now works again.

Changed tty_find_polling driver back to something
close to 2.6.27-rc6 the new stuff broke kgdb when
used with the usual kgdboc=/dev/ttyS0,115200 parameter & similar.
Signed-off-by: Denis Joseph Barrow <D.Barow@option.com>
---Index: linux-2.6/drivers/char/tty_io.c
===================================================================
Index: linux-2.6/drivers/char/tty_io.c
===================================================================
--- linux-2.6.orig/drivers/char/tty_io.c	2009-01-16 16:41:41.000000000 +0100
+++ linux-2.6/drivers/char/tty_io.c	2009-01-16 16:43:59.000000000 +0100
@@ -294,23 +294,13 @@
 {
 	struct tty_driver *p, *res = NULL;
 	int tty_line = 0;
-	int len;
 	char *str;
 
-	for (str = name; *str; str++)
-		if ((*str >= '0' && *str <= '9') || *str == ',')
-			break;
-	if (!*str)
-		return NULL;
-
-	len = str - name;
-	tty_line = simple_strtoul(str, &str, 10);
-
 	mutex_lock(&tty_mutex);
 	/* Search through the tty devices to look for a match */
 	list_for_each_entry(p, &tty_drivers, tty_drivers) {
-		if (strncmp(name, p->name, len) != 0)
-			continue;
+		str = name + strlen(p->name);
+		tty_line = simple_strtoul(str, &str, 10);
 		if (*str == ',')
 			str++;
 		if (*str == '\0')


best regards,
D.J. Barrow

Linux Kernel Developer
Option NV, Gaston Geenslaan 14, 3001 Leuven, Belgium
 
T: +32 16 311 621
F: +32 16 207 164
d.barow@option.com
www.option.com

Disclaimer:
http://www.option.com/company/disclaimer.shtml

[-- Attachment #2: tty_io_kgdbdoc_fix.patch --]
[-- Type: text/x-diff, Size: 1212 bytes --]

Changed tty_find_polling driver back to something
close to 2.6.27-rc6 the new stuff broke kgdb when
used with the usual kgdboc=/dev/ttyS0,115200 parameter & similar.
Signed-off-by: Denis Joseph Barrow <D.Barow@option.com>
---Index: linux-2.6/drivers/char/tty_io.c
===================================================================
Index: linux-2.6/drivers/char/tty_io.c
===================================================================
--- linux-2.6.orig/drivers/char/tty_io.c	2009-01-16 16:41:41.000000000 +0100
+++ linux-2.6/drivers/char/tty_io.c	2009-01-16 16:43:59.000000000 +0100
@@ -294,23 +294,13 @@
 {
 	struct tty_driver *p, *res = NULL;
 	int tty_line = 0;
-	int len;
 	char *str;
 
-	for (str = name; *str; str++)
-		if ((*str >= '0' && *str <= '9') || *str == ',')
-			break;
-	if (!*str)
-		return NULL;
-
-	len = str - name;
-	tty_line = simple_strtoul(str, &str, 10);
-
 	mutex_lock(&tty_mutex);
 	/* Search through the tty devices to look for a match */
 	list_for_each_entry(p, &tty_drivers, tty_drivers) {
-		if (strncmp(name, p->name, len) != 0)
-			continue;
+		str = name + strlen(p->name);
+		tty_line = simple_strtoul(str, &str, 10);
 		if (*str == ',')
 			str++;
 		if (*str == '\0')

  parent reply	other threads:[~2009-01-16 15:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-17 13:47 getting false SIGTRAP breakpoints in kernel i.e. kernel hung unless gdb remotely attached on x86 & cont is issued Denis Joseph Barrow
2008-09-17 13:55 ` Jason Wessel
2008-09-17 14:20   ` Denis Joseph Barrow
2008-09-18 14:53     ` Jason Wessel
2008-09-19 12:31       ` Denis Joseph Barrow
2008-09-19 12:57         ` Jason Wessel
2008-09-19 13:35           ` Denis Joseph Barrow
2008-09-19 19:38             ` Jason Wessel
     [not found]               ` <49708E50.8080103@option.com>
2009-01-16 15:58                 ` Denis Joseph Barrow [this message]
2008-09-17 15:40   ` Denis Joseph Barrow

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=4970AEB9.5080702@option.com \
    --to=d.barow@option.com \
    --cc=f.aben@option.com \
    --cc=gareth@valinux.com \
    --cc=jason.wessel@windriver.com \
    --cc=kgdb-bugreport@lists.sourceforge.net \
    --cc=linux-serial@vger.kernel.org \
    --cc=markus.t.metzger@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.