From: Ben Gamari <bgamari.foss@gmail.com>
To: xiyou.wangcong@gmail.com, Christoph Egger <siccegge@cs.fau.de>,
linux-kernel@vger.kernel.org,
linux-kbuild <linux-kbuild@vger.kernel.org>,
Michal Marek <mmarek@suse.cz>
Cc: Ben Gamari <bgamari.foss@gmail.com>
Subject: [PATCH] Debug fixdep
Date: Sun, 7 Nov 2010 11:48:53 -0500 [thread overview]
Message-ID: <1289148533-15106-1-git-send-email-bgamari.foss@gmail.com> (raw)
In-Reply-To: <87tyjtjd7m.fsf@gmail.com>
---
scripts/basic/fixdep.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index ea26b23..f1b58d6 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -303,6 +303,9 @@ static void parse_dep_file(void *map, size_t len)
char *p;
char s[PATH_MAX];
+ fprintf(stderr, "map=%p, len=%zx\n", map, len);
+ fprintf(stderr, "m=%p, end=%p\n", m, end);
+ fprintf(stderr, "eh?=%zx\n", (size_t)end - (size_t)len);
p = strchr(m, ':');
if (!p) {
fprintf(stderr, "fixdep: parse error\n");
@@ -314,16 +317,23 @@ static void parse_dep_file(void *map, size_t len)
clear_config();
+ fprintf(stderr, "map=%p, len=%zx, end=%p\n", map, len, end);
while (m < end) {
- while (m < end && (*m == ' ' || *m == '\\' || *m == '\n'))
+ while (m <= end && (*m == ' ' || *m == '\\' || *m == '\n')) {
+ fprintf(stderr, "m=%p\n", m);
m++;
+ }
p = m;
- while (p < end && *p != ' ') p++;
+ fprintf(stderr, "A: p=%p, end=%p, str=%s\n", p, end, p);
+ while (p <= end && *p != ' ') p++;
+ fprintf(stderr, "B: p=%p, end=%p\n", p, end);
if (p == end) {
do p--; while (!isalnum(*p));
+ fprintf(stderr, "c%c ", *p);
p++;
}
memcpy(s, m, p-m); s[p-m] = 0;
+ fprintf(stderr, "C: p=%p, s=%s\n", p, s);
if (strrcmp(s, "include/generated/autoconf.h") &&
strrcmp(s, "arch/um/include/uml-config.h") &&
strrcmp(s, ".ver")) {
@@ -342,6 +352,7 @@ static void print_deps(void)
int fd;
void *map;
+ fprintf(stderr, "file=%s\n", depfile);
fd = open(depfile, O_RDONLY);
if (fd < 0) {
fprintf(stderr, "fixdep: ");
@@ -354,6 +365,7 @@ static void print_deps(void)
close(fd);
return;
}
+ fprintf(stderr, "st.size=%zx\n", st.st_size);
map = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
if ((long) map == -1) {
perror("fixdep: mmap");
--
1.7.0.4
next prev parent reply other threads:[~2010-11-07 16:49 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-29 10:52 Bus error on make allyesconfig, kernelbuild with HEAD Christoph Egger
2010-07-29 11:26 ` Américo Wang
2010-07-29 11:57 ` Christoph Egger
2010-07-29 12:10 ` Christoph Egger
2010-07-30 8:43 ` Américo Wang
2010-11-06 15:07 ` Ben Gamari
2010-11-06 15:49 ` Ben Gamari
2010-11-06 16:24 ` Sam Ravnborg
2010-11-07 16:39 ` Ben Gamari
2010-11-07 16:44 ` Ben Gamari
2010-11-07 16:48 ` Ben Gamari [this message]
2010-11-07 17:07 ` Sam Ravnborg
2010-11-07 18:09 ` Ben Gamari
2010-11-07 22:30 ` fstat suddenly return -EINVAL [Was: Bus error on make allyesconfig, kernelbuild with HEAD] Sam Ravnborg
2010-11-07 23:07 ` Ben Gamari
2010-11-08 10:20 ` Américo Wang
2010-11-08 12:38 ` Ben Gamari
2010-11-08 18:22 ` Sam Ravnborg
2010-11-08 18:42 ` Ben Gamari
2010-11-08 19:05 ` Sam Ravnborg
2010-11-08 20:17 ` Ben Gamari
2010-11-09 10:29 ` Américo Wang
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=1289148533-15106-1-git-send-email-bgamari.foss@gmail.com \
--to=bgamari.foss@gmail.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mmarek@suse.cz \
--cc=siccegge@cs.fau.de \
--cc=xiyou.wangcong@gmail.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
Powered by JetHome