Re: [PATCH] Cleanup i386-nat.c

Mark Kettenis
2004-02-29T09:41:21Z

Date: 29 Feb 2004 08:06:56 +0200
From: Eli Zaretskii <eliz@elta.co.il>

> Date: Sat, 28 Feb 2004 16:38:23 +0100 (CET)
> From: Mark Kettenis <kettenis@chello.nl>
>
> The coding style in this file had some quirks, so I committed the
> attached.

That's largely my code, so please explain the changes, so that I
never repeat any mistakes I've committed. I've read the entire
patch, and I must say that I don't understand even a single change
you made.

* I did some s/x86/i386/g because i386-nat.c was the only file talking
about x86.

* The coding standards say that every comment should be a full
sentence, starting with a capital and ending with a full stop (a
dot). This also applies to comments on lines with code. To prevent
some unnecessary line-wrapping, I used M-; to start them at what's
the canonical column according to Emacs.

* There were some lines in the code that were too long. Some of these
were hard to break, so I used some creativity here.

In the comments reformatting department, I guess we have different
setting for fill-column (what is the canonical one, btw?), but as
for the rest, I don't have a clue. So please do explain.

According to Emacs, the default setting for the fill-column is 70.

> - /* Four(eigth on x86_64) is the maximum length an x86 debug register
> + int align = addr % max_wp_len;
> + /* Four (eigth on AMD64) is the maximum length a debug register

Here, there's a real typo in the comment, but it wasn't fixed.

Hmm, sorry about that. Will fix it sometime after Andrew's cut the
branch.

Mark