All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Anzinger <george@mvista.com>
To: "Amit S. Kale" <amitkale@emsyssoft.com>
Cc: Matt Mackall <mpm@selenic.com>, Pavel Machek <pavel@ucw.cz>,
	kernel list <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@zip.com.au>
Subject: Re: kgdb cleanups
Date: Wed, 14 Jan 2004 12:40:06 -0800	[thread overview]
Message-ID: <4005A926.2000902@mvista.com> (raw)
In-Reply-To: <200401141850.25650.amitkale@emsyssoft.com>

Amit S. Kale wrote:
> On Wednesday 14 Jan 2004 2:50 am, George Anzinger wrote:
> 
>>Amit S. Kale wrote:
>>
>>>Regarding pluggable iterfaces -
>>>The version I have lets a user to choose the interface by supplying
>>>appropriate command line. (e.g. kgdbwait kgdb8250=... or kgdbwait
>>>kgdbeth=...) It supports an arbitrary number of interfaces. The kgdb core
>>>itself is independent of an interface. All interfaces are defined by a
>>>structure described below. An interface registers itself with kgdb core
>>>by assigning this structure to pointer kgdb_serial.
>>>
>>>struct kgdb_serial {
>>>	int chunksize;
>>
>>Do we really need this?  The only place I saw it used it did not seem to
>>matter where the split occured and there was now endchunck/beginchunck
>>stuff.  I would MUCH rather see the interface code take care of this with
>>out mucking up the core code (as the eth code already does).  Did I miss
>>something here?
> 
> 
> Having an interface recognize a kgdb core record isn't a good design.
> Having kgdb core record know interface limitations isn't good either.
> 
> If kgdb calls flush at end of a packet and an interface splits a packet 
> whenever its length goes above its limit, that'll be the right way of doing 
> it.

I think this is what happens in the current eth code.

> 
>>>	int (*read_char)(void);
>>>	void (*write_char)(int);
>>>	void (*flush)(void);
>>>	int (*hook)(void);
>>>	void (*begin_session)(void);
>>>	void (*end_session)(void);
>>>};
>>>
>>>Where chunksize is maximum chunksize an interface can handle.
>>>
>>>read_char and write_char are derived from getDebugChar and putDebugChar
>>>flush flushes written characters. Flush control is given to kgdb core so
>>>that it can ensure that #checksum doesn't split.
>>
>>Actually, I think it is needed so that gdb knows that the kgdb stub has
>>exited. This could, of course, be done with out the flush, but then the
>>write code would have to recognize an end of record (not hard with the
>>given protocol).  I don't think there is any requirement that a checksum
>>not be split.  My assumption here is that the logical record is reassembled
>>on the gdb end without concern about how many physical records are
>>involved.  Is this not true?
> 
> 
> I guess yes. Splitting of #checksum may not matter.
> 
> 
>>>begin_session and end_session inform an interface about a gdb
>>>communication session. (Haven't decided about console packets to gdb yet)
>>
>>I assume you mean entry to the stub/ exit the stub as a "session".  This
>>eliminates the old hook, right?
> 
> 
> Yes. begin_session and end_session mark entry and exit points into 
> handle_exception. They are required to mark ethernet interface in trap mode.
> 
> What's old hook?

I think it was a function in eth that was called to mark the begin and end just 
as begin_session and end_session do.  Might want to consider one function for 
this, with a parameter.

-g


-- 
George Anzinger   george@mvista.com
High-res-timers:  http://sourceforge.net/projects/high-res-timers/
Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml


  reply	other threads:[~2004-01-14 23:22 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-09 18:38 kgdb cleanups Pavel Machek
2004-01-09 21:41 ` Andrew Morton
2004-01-09 21:54 ` George Anzinger
2004-01-10  4:47   ` Matt Mackall
2004-01-10  8:12     ` George Anzinger
2004-01-10 17:56       ` Matt Mackall
2004-01-10 19:34         ` Pavel Machek
2004-01-10 19:37           ` Matt Mackall
2004-01-12  5:41         ` George Anzinger
2004-01-12  6:49           ` Matt Mackall
2004-01-12  9:45             ` Pavel Machek
2004-01-13 20:54               ` George Anzinger
2004-01-13 21:00                 ` Pavel Machek
2004-01-12 13:53             ` Amit S. Kale
2004-01-13 21:20               ` George Anzinger
2004-01-14 13:20                 ` Amit S. Kale
2004-01-14 20:40                   ` George Anzinger [this message]
2004-01-13 20:53             ` George Anzinger
2004-01-14 13:04               ` Amit S. Kale
2004-01-14 20:35                 ` George Anzinger
2004-01-10 15:15   ` Pavel Machek
  -- strict thread matches above, loose matches on Subject: below --
2003-12-28 14:13 Pavel Machek
2003-12-28 20:14 ` Robert Walsh

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=4005A926.2000902@mvista.com \
    --to=george@mvista.com \
    --cc=akpm@zip.com.au \
    --cc=amitkale@emsyssoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.com \
    --cc=pavel@ucw.cz \
    /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.