From: Kevin Buettner <kevinb@cygnus.com>
To: Stan Shebs <shebs@cygnus.com>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: (patch) hpjyg15: hppah-nat.c & related
Date: Thu, 11 Nov 1999 17:13:00 -0000 [thread overview]
Message-ID: <991112011245.ZM3290@ocotillo.lan> (raw)
In-Reply-To: <199911120046.QAA29304@andros.cygnus.com>
On Nov 11, 4:46pm, Stan Shebs wrote:
> I've seen some inconsistent behavior from indent, and was planning to
> investigate further one of these days. Nothing to get too excited
> about, the oddities amounting to about ~100 in 400K lines of code,
> but good to be aware of. diff -w is useful for separating out the
> "real" diffs from the uninteresting ones.
The output of indent should be idempotent wrt indent; i.e, if you run
indent on the output of a previous indent run, you should get the same
output from the second run of indent. E.g,
indent foo.c
cp foo.c foo1.c
indent foo1.c
diff foo.c foo1.c
The diff at the end should show no changes.
Unfortunately, this is not the case. In particular, indent seems to
want to move comments around and add/delete whitespace from the ends
of lines.
I used to have some patches (for a much older version of indent) that
fixed many of these problems at least for the code that I was
indenting at the time. If there is sufficient interest, I can rumage
around on my backup tapes to see if I can find these patches.
Kevin
From kevinb@cygnus.com Fri Nov 12 10:42:00 1999
From: Kevin Buettner <kevinb@cygnus.com>
To: cagney@cygnus.com
Cc: gdb-patches@sourceware.cygnus.com
Subject: RFA: PACKET_OVERHEAD constant added to remote.c
Date: Fri, 12 Nov 1999 10:42:00 -0000
Message-id: <991112184146.ZM22052@ocotillo.lan>
X-SW-Source: 1999-q4/msg00247.html
Content-length: 2427
Hi Andrew,
Jesper Skov alerted me to the fact that we were getting some "Remote
packet too long" messages when attempting to debug using a gdbserver
for i386 linux. The problem was that the memory packet size
computations were not taking into account the packet overhead. This
would've been a one line fix, but I decided to define PACKET_OVERHEAD
instead of adding another hard-coded instance of the constant 32.
Kevin
* remote.c (PACKET_OVERHEAD): Define.
(get_memory_packet_size): Take PACKET_OVERHEAD into account when
computing memory packet size.
(build_remote_packet_sizes): Use PACKET_OVERHEAD instead of
hard-coded constants.
Index: remote.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/remote.c,v
retrieving revision 1.258
diff -u -r1.258 remote.c
--- remote.c 1999/11/08 13:14:17 1.258
+++ remote.c 1999/11/12 17:57:13
@@ -315,6 +315,11 @@
/* compatibility. */
#define PBUFSIZ (remote_packet_size)
+/* Overhead for packet header / footer. NOTE: cagney/1999-10-26: I suspect
+ that 8 (``$NN:G...#NN'') is a better guess, the below has been padded a
+ little. */
+#define PACKET_OVERHEAD 32
+
/* User configurable variables for the number of characters in a
memory read/write packet. MIN (PBUFSIZ, g-packet-size) is the
default. Some targets need smaller values (fifo overruns, et.al.)
@@ -358,7 +363,7 @@
}
else
{
- what_they_get = remote_packet_size;
+ what_they_get = remote_packet_size - PACKET_OVERHEAD;
/* Limit the packet to the size specified by the user. */
if (config->size > 0
&& what_they_get > config->size)
@@ -502,12 +507,9 @@
remote_packet_size = 400;
/* Should REGISTER_BYTES needs more space than the default, adjust
the size accordingly. Remember that each byte is encoded as two
- characters. 32 is the overhead for the packet header /
- footer. NOTE: cagney/1999-10-26: I suspect that 8
- (``$NN:G...#NN'') is a better guess, the below has been padded a
- little. */
- if (REGISTER_BYTES > ((remote_packet_size - 32) / 2))
- remote_packet_size = (REGISTER_BYTES * 2 + 32);
+ characters. */
+ if (REGISTER_BYTES > ((remote_packet_size - PACKET_OVERHEAD) / 2))
+ remote_packet_size = (REGISTER_BYTES * 2 + PACKET_OVERHEAD);
/* This one is filled in when a ``g'' packet is received. */
actual_register_packet_size = 0;
next prev parent reply other threads:[~1999-11-11 17:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.10.9911111610120.6426-100000@hpcll168.cup.hp.com>
1999-11-11 16:46 ` Stan Shebs
1999-11-11 17:13 ` Kevin Buettner [this message]
[not found] <Pine.LNX.4.10.9912150951120.29808-100000@hpcll168.cup.hp.com>
1999-12-16 0:07 ` Jeffrey A Law
1999-12-16 0:32 ` Andrew Cagney
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=991112011245.ZM3290@ocotillo.lan \
--to=kevinb@cygnus.com \
--cc=gdb-patches@sourceware.cygnus.com \
--cc=shebs@cygnus.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox