Date: Thu, 10 Oct 2002 06:40:41 +1000 (EST) From: Bruce Evans <bde@zeta.org.au> To: John Baldwin <jhb@FreeBSD.ORG> Cc: Andrew Gallatin <gallatin@cs.duke.edu>, Peter Wemm <peter@wemm.org>, <freebsd-arch@FreeBSD.ORG> Subject: Re: lp64 vs lp32 printf Message-ID: <20021010062921.T6622-100000@gamplex.bde.org> In-Reply-To: <XFMail.20021009143029.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 9 Oct 2002, John Baldwin wrote:
> ... Hmm, I was incorrect
> (my grep re was busted) and %z is actually used in two places in ddb.
> We can either pick a letter to use or just use %x with explicit signs
> in those two cases:
>
> ddb/db_examine.c: db_printf("%-*lz", width, (long)value);
> ddb/db_examine.c: db_printf("%8lz", (long)addr);
>
> Hmm, the second case doesn't even use a sign so it can be %x anyways.
This seems to be just a bug. The original db_printf() prints -1 as -1
for %z format. From db_output.c rev.1.1:
%%%
case 'z':
ul = lflag ? va_arg(ap, u_long) : va_arg(ap, u_int);
if ((long)ul < 0) {
neg = 1;
ul = -(long)ul;
}
base = 16;
goto number;
%%%
I "restored" this wrong in subr_prf.c 1.47.
Bruce
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021010062921.T6622-100000>
