Date: Mon, 26 Mar 2001 13:22:47 -0500 (EST) From: Andrew Gallatin <gallatin@cs.duke.edu> To: "Michael Richards" <michael@fastmail.ca> Cc: freebsd-alpha@FreeBSD.ORG Subject: Re: Coding Conventions Message-ID: <15039.35063.539812.824792@grasshopper.cs.duke.edu> In-Reply-To: <3ABF833F.00018D.48828@frodo.searchcanada.ca>
index | next in thread | previous in thread | raw e-mail
Michael Richards writes:
> Just a quick question as I get down to a testable fix on the boot
> loader problem: I've been hacking up the code adding things like:
> #ifdef DEBUG
> printf("returning from prom_open\n");
> #endif
If I'm going to be using a lot of debugging printfs, then I tend to
prefer something like this, rather than having an #ifdef/endif pair
for every printf, but its a question of personal style..
#ifdef DEBUG
#define DPRINTF(x) printf x
#else
#define DPRINTF(x)
#endif
<...>
DPRINTF(("Debugging something\n"))
> Should these be left in for future debugging or should the patch only
> contain the real code changes? IE, if someone else needs to debug,
> let them go in and add their own printf's... One unfortunate side
I think it would be better to submit 2 patches -- 1 with just the fix,
and one with the debugging statements. Don't let this opinion get in
your way though, if you fix it, we'll take what we can get ;)
> effect is that the boot loader will no longer fit on a single floppy
> with the kernel. I deleted the kernel because it dies before getting
> that far.
Heh.
Drew
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15039.35063.539812.824792>
