All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Amit S. Kale" <amitkale@emsyssoft.com>
To: Pavel Machek <pavel@suse.cz>
Cc: George Anzinger <george@mvista.com>,
	Andrew Morton <akpm@osdl.org>,
	jim.houston@comcast.net, discuss@x86-64.org, ak@suse.de,
	shivaram.upadhyayula@wipro.com,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [discuss] Re: kgdb for x86_64 2.6 kernels
Date: Mon, 12 Jan 2004 20:01:59 +0530	[thread overview]
Message-ID: <200401122001.29151.amitkale@emsyssoft.com> (raw)
In-Reply-To: <20040110193049.GA252@elf.ucw.cz>

Done. Thanks.

On Sunday 11 Jan 2004 1:00 am, Pavel Machek wrote:
> Hi!
>
> > Well said!
> >
> > I have released kgdb 2.0.1 for kernel 2.6.1:
> > http://kgdb.sourceforge.net/linux-2.6.1-kgdb-2.0.1.tar.bz2
> >
> > It doesn't contain any assert stuff. I have split it into multiple parts
> > to make a merge easier. Please let me know if you want me to further
> > split them or if you want something to be changed. The README file from
> > this tarball is pasted below.
> >
> > Here is two possible starting points:
> > 1. SMP stuff -> Replace my old smp and nmi handling code.
> > 2. Early boot -> Change 8250.patch to make configuration of serial port
> > either through config options or through command line.
> >
> > I'll attempt reading your patch and merging as much stuff as
> > possible.
>
> Fix round of changes:
>
> * kgdbeth_opt does not initialize ipaddrptr -> this could not have
> ever worked. [Okay, it still does not work].
>
> * Add some basic documentation
>
> * reply_arp can be static, AFAICS
>
> * getDebugChar() no longer exists, kill it from the docs, read_char()
> should be equivalent.
>
> * eth_PutDebugChar() seems to be no longer used. Kill it.
>
> Please apply,
> 									Pavel
>
>
> --- tmp/linux/drivers/net/kgdb_eth.c	2004-01-10 20:16:10.000000000 +0100
> +++ linux/drivers/net/kgdb_eth.c	2004-01-10 20:10:27.000000000 +0100
> @@ -72,8 +72,7 @@
>  read_char(void)
>  {
>  	/* intr routine has queued chars */
> -	if (atomic_read(&kgdb_buf_in_cnt) != 0)
> -	{
> +	if (atomic_read(&kgdb_buf_in_cnt) != 0) {
>  		int chr;
>
>  		chr = kgdb_buf[kgdb_buf_out_inx++] ;
> @@ -150,8 +149,6 @@
>  	kgdb_netdevice->hard_start_xmit(skb, kgdb_netdevice);
>  	kgdb_netdevice->xmit_lock_owner = -1;
>  	spin_unlock(&kgdb_netdevice->xmit_lock);
> -
> -	/* kfree_skb(skb); */
>  }
>
>  static void kgdbeth_flush(void)
> @@ -179,7 +176,7 @@
>
>  static struct sk_buff *send_skb = NULL;
>
> -void
> +static void
>  kgdb_eth_reply_arp(void)
>  {
>  	if (send_skb) {
> @@ -313,12 +310,12 @@
>   * Accept an skbuff from net_device layer and add the payload onto
>   * kgdb buffer
>   *
> - * When the kgdb stub routine getDebugChar() is called it draws characters
> + * When the kgdb stub routine read_char() is called it draws characters
>   * out of the buffer until it is empty and then reads directly from the
>   * serial port.
>   *
>   * We do not attempt to write chars from the interrupt routine since
> - * the stubs do all of that via putDebugChar() which writes one byte
> + * the stubs do all of that via write_char() which writes one byte
>   * after waiting for the interface to become ready.
>   *
>   * The debug stubs like to run with interrupts disabled since, after all,
> @@ -434,7 +431,7 @@
>  }
>
>  /*
> - * getDebugChar
> + * kgdbeth_read_char
>   *
>   * This is a GDB stub routine.  It waits for a character from the
>   * serial interface and then returns it.  If there is no serial
> @@ -455,42 +452,6 @@
>  	return chr;
>  }
>
> -#define ETH_QUEUE_SIZE 256
> -static char eth_queue[ETH_QUEUE_SIZE];
> -static int outgoing_queue;
> -
> -void
> -eth_flushDebugChar(void)
> -{
> -	if(outgoing_queue) {
> -		write_buffer(eth_queue, outgoing_queue);
> -
> -		outgoing_queue = 0;
> -	}
> -}
> -
> -static void
> -put_char_on_queue(int chr)
> -{
> -	eth_queue[outgoing_queue++] = chr;
> -	if(outgoing_queue == ETH_QUEUE_SIZE)
> -	{
> -		eth_flushDebugChar();
> -	}
> -}
> -
> -/*
> - * eth_putDebugChar
> - *
> - * This is a GDB stub routine.  It waits until the interface is ready
> - * to transmit a char and then sends it.
> - */
> -void
> -eth_putDebugChar(int chr)
> -{
> -	put_char_on_queue(chr); /* this routine will wait */
> -}
> -
>  static void kgdbeth_begin_session(void)
>  {
>  	kgdbeth_is_trapped = 1;
> @@ -546,7 +507,7 @@
>  static int __init kgdbeth_opt(char *str)
>  {
>  	char ipaddrstr[16];
> -	char *ipaddrptr;
> +	char *ipaddrptr = ipaddrstr;
>
>  	/* interfacenum */
>  	if (*str < '0' || *str > '9')
> --- /dev/null	2003-09-12 10:38:14.000000000 +0200
> +++ linux/Documentation/kgdb/kgdb_eth.txt	2004-01-10 19:53:37.000000000
> +0100 @@ -0,0 +1,10 @@
> +Some notes about kgdb over ethernet
> +
> + 2004 Pavel Machek <pavel@suse.cz>
> +
> +
> +kgdbeth=interfacenum,localmac,listenport,remoteip,remotemac
> +
> +Then
> +   % gdb ./vmlinux
> +   (gdb) target remote udp:HOSTNAME:6443

-- 
Amit Kale
EmSysSoft (http://www.emsyssoft.com)
KGDB: Linux Kernel Source Level Debugger (http://kgdb.sourceforge.net)


  reply	other threads:[~2004-01-12 14:33 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <000e01c3d476$2ebe03a0$4008720a@shivram.wipro.com>
     [not found] ` <1073603622.993.353.camel@new.localdomain>
     [not found]   ` <20040108153243.11e45156.akpm@osdl.org>
     [not found]     ` <200401091031.41493.amitkale@emsyssoft.com>
2004-01-09 22:16       ` [discuss] Re: kgdb for x86_64 2.6 kernels George Anzinger
2004-01-10 10:41         ` Amit S. Kale
2004-01-10 15:03           ` Pavel Machek
2004-01-10 18:14           ` Pavel Machek
2004-01-12 14:32             ` Amit S. Kale
2004-01-10 19:30           ` Pavel Machek
2004-01-12 14:31             ` Amit S. Kale [this message]
2004-01-12  6:00           ` George Anzinger
2004-01-12  9:47             ` Pavel Machek
2004-01-13 20:55               ` George Anzinger
2004-01-12 14:50             ` Amit S. Kale
2004-01-13 21:26               ` George Anzinger
2004-01-14  6:31                 ` Matt Mackall
2004-01-14 20:02                   ` George Anzinger
2004-01-14 23:26                     ` Greg KH
2004-01-15  0:02                       ` George Anzinger
2004-01-15  0:19                         ` Pavel Machek
2004-01-15  3:28                           ` George Anzinger
2004-01-15  0:23                         ` Greg KH
2004-01-15  3:30                           ` George Anzinger
2004-01-14 13:24                 ` Amit S. Kale
2004-01-14 22:32                   ` George Anzinger
     [not found] <1cd9t-4Su-65@gated-at.bofh.it>
     [not found] ` <1coR2-42n-19@gated-at.bofh.it>
     [not found]   ` <1d3r0-1tw-3@gated-at.bofh.it>
     [not found]     ` <1dbI9-89t-7@gated-at.bofh.it>
     [not found]       ` <1dEqx-F0-1@gated-at.bofh.it>
     [not found]         ` <1dMRc-6DQ-3@gated-at.bofh.it>
     [not found]           ` <1e2Mk-6YA-17@gated-at.bofh.it>
     [not found]             ` <1e2Mo-6YA-31@gated-at.bofh.it>
     [not found]               ` <1e3fi-4nG-5@gated-at.bofh.it>
2004-01-15  8:02                 ` Andi Kleen
2004-01-15  8:36                   ` George Anzinger
2004-01-15  8:52                     ` Andi Kleen
2004-01-16  1:15                       ` Matt Mackall
2004-01-16 18:04                         ` Randy.Dunlap
2004-01-16 21:07                           ` Andi Kleen

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=200401122001.29151.amitkale@emsyssoft.com \
    --to=amitkale@emsyssoft.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=discuss@x86-64.org \
    --cc=george@mvista.com \
    --cc=jim.houston@comcast.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@suse.cz \
    --cc=shivaram.upadhyayula@wipro.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.