From: Sam Ravnborg <sam@ravnborg.org>
To: Pavel Machek <pavel@ucw.cz>
Cc: Andrew Morton <akpm@zip.com.au>,
kernel list <linux-kernel@vger.kernel.org>,
"Amit S. Kale" <akale@users.sourceforge.net>
Subject: Re: [1/3] kgdb-lite for 2.6.3
Date: Sun, 22 Feb 2004 21:22:11 +0100 [thread overview]
Message-ID: <20040222202211.GA2063@mars.ravnborg.org> (raw)
In-Reply-To: <20040222160417.GA9535@elf.ucw.cz>
Just some random comments after browsing the code.
Sam
> +
> +int kgdb_hexToLong(char **ptr, long *longValue);
A patch has been posted by Tom Rini to convert this to the
linux naming: kgdb_hex2long(...).
+static const char hexchars[] = "0123456789abcdef";
Grepping after 0123456789 in the src tree gives a lot of hits.
Maybe we should pull in some functionality from klibc, and place it in lib/
at some point in time.
+
+static char remcomInBuffer[BUFMAX];
+static char remcomOutBuffer[BUFMAX];
This does not follow usual Linux naming convention.
Something like: remcom_in_buf, remcom_out_buf?
> +static void getpacket(char *buffer)
> +{
> + unsigned char checksum;
> + unsigned char xmitcsum;
> + int i;
> + int count;
> + char ch;
> +
> + do {
> + /* wait around for the start character, ignore all other characters */
> + while ((ch = (kgdb_serial->read_char() & 0x7f)) != '$');
Placing ';' on a seperate line would be good for the readability.
> +int kgdb_handle_exception(int exVector, int signo, int err_code,
> + struct pt_regs *linux_regs)
> +{
> + unsigned long length, addr;
> + char *ptr;
> + unsigned long flags;
> + unsigned long gdb_regs[NUMREGBYTES / sizeof (unsigned long)];
> + int i;
> + long threadid;
> + threadref thref;
> + struct task_struct *thread = NULL;
> + unsigned procid;
> + static char tmpstr[256];
Too? large varriable on the stack.
next prev parent reply other threads:[~2004-02-22 19:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-22 16:04 Pavel Machek
2004-02-22 20:22 ` Sam Ravnborg [this message]
2004-02-22 19:54 ` Bartlomiej Zolnierkiewicz
2004-02-22 19:54 ` Pavel Machek
2004-02-22 21:15 ` Sam Ravnborg
2004-02-22 21:02 ` Pavel Machek
2004-02-23 10:24 ` Amit S. Kale
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=20040222202211.GA2063@mars.ravnborg.org \
--to=sam@ravnborg.org \
--cc=akale@users.sourceforge.net \
--cc=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--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 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®