Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/gmon fix debugging printf formats.
details: https://anonhg.NetBSD.org/src/rev/51f4256472e6
branches: trunk
changeset: 587442:51f4256472e6
user: christos <christos%NetBSD.org@localhost>
date: Tue Jan 24 17:33:44 2006 +0000
description:
fix debugging printf formats.
diffstat:
lib/libc/gmon/gmon.c | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diffs (61 lines):
diff -r 7f983f5ac768 -r 51f4256472e6 lib/libc/gmon/gmon.c
--- a/lib/libc/gmon/gmon.c Tue Jan 24 17:30:51 2006 +0000
+++ b/lib/libc/gmon/gmon.c Tue Jan 24 17:33:44 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gmon.c,v 1.24 2006/01/24 17:30:51 christos Exp $ */
+/* $NetBSD: gmon.c,v 1.25 2006/01/24 17:33:44 christos Exp $ */
/*
* Copyright (c) 2003, 2004 Wasabi Systems, Inc.
@@ -69,7 +69,7 @@
#if 0
static char sccsid[] = "@(#)gmon.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: gmon.c,v 1.24 2006/01/24 17:30:51 christos Exp $");
+__RCSID("$NetBSD: gmon.c,v 1.25 2006/01/24 17:33:44 christos Exp $");
#endif
#endif
@@ -380,7 +380,7 @@
const char *proffile;
char buf[PATH_MAX];
#ifdef DEBUG
- int log, len;
+ int logfd, len;
char buf2[200];
#endif
@@ -438,14 +438,14 @@
return;
}
#ifdef DEBUG
- log = open("gmon.log", O_CREAT|O_TRUNC|O_WRONLY, 0664);
- if (log < 0) {
+ logfd = open("gmon.log", O_CREAT|O_TRUNC|O_WRONLY, 0664);
+ if (logfd < 0) {
warn("mcount: Cannot open `gmon.log'");
return;
}
- len = snprintf(buf2, sizeof buf2, "[mcleanup1] kcount 0x%x ssiz %d\n",
+ len = snprintf(buf2, sizeof buf2, "[mcleanup1] kcount %p ssiz %lu\n",
p->kcount, p->kcountsize);
- (void)write(log, buf2, (size_t)len);
+ (void)write(logfd, buf2, (size_t)len);
#endif
#ifdef _REENTRANT
_m_gmon_merge();
@@ -469,10 +469,10 @@
toindex = p->tos[toindex].link) {
#ifdef DEBUG
len = snprintf(buf2, sizeof buf2,
- "[mcleanup2] frompc 0x%x selfpc 0x%x count %d\n" ,
- frompc, p->tos[toindex].selfpc,
- p->tos[toindex].count);
- (void)write(log, buf2, (size_t)len);
+ "[mcleanup2] frompc 0x%lx selfpc 0x%lx count %lu\n" ,
+ (u_long)frompc, (u_long)p->tos[toindex].selfpc,
+ (u_long)p->tos[toindex].count);
+ (void)write(logfd, buf2, (size_t)len);
#endif
rawarc.raw_frompc = frompc;
rawarc.raw_selfpc = p->tos[toindex].selfpc;
Home |
Main Index |
Thread Index |
Old Index