]> Zhao Yanbai Git Server - minix.git/commitdiff
kernel: fixes for DEBUG_DUMPIPC mode 30/830/4
authorBen Gras <ben@minix3.org>
Tue, 24 Sep 2013 08:32:11 +0000 (10:32 +0200)
committerBen Gras <ben@minix3.org>
Tue, 24 Sep 2013 08:26:53 +0000 (08:26 +0000)
. add dependency of headers on debug.d
. put the generated headers in the right dir
. also resilience against future ELAST duplicate errno

Change-Id: I9d10702c8e09699a40138193f14defe902399da6

kernel/Makefile
kernel/debug.c
kernel/extract-errno.sh

index c16eadcc93c18f68cbbfa8e3a9bbcf3f6bf4f1cf..3df00d3f1c3f49bbcb93efa8c258cc487e96d30c 100644 (file)
@@ -80,7 +80,7 @@ CPPFLAGS+= -DUSE_TRACE
 
 CLEANFILES+=extracted-errno.h extracted-mfield.h extracted-mtype.h procoffsets.h
 
-debug.o: extracted-errno.h extracted-mfield.h extracted-mtype.h
+debug.o debug.d: extracted-errno.h extracted-mfield.h extracted-mtype.h
 
 extracted-errno.h: extract-errno.sh ../include/errno.h
        ${_MKTARGET_CREATE}
index 751d17a6b6d90dea2f4b4c040d0e673cdb8f47e8..793749e9ec8d36d319d96eecb570beb8296f354a 100644 (file)
@@ -326,12 +326,12 @@ static const char *mtypename(int mtype, int *possible_callname)
         */
        switch(mtype) {
 #define IDENT(x) case x: callname = #x; *possible_callname = 1; break;
-#include "extracted-mtype.h"
+#include "kernel/extracted-mtype.h"
 #undef IDENT
        }
        switch(mtype) {
 #define IDENT(x) case x: errname = #x; break;
-#include "extracted-errno.h"
+#include "kernel/extracted-errno.h"
 #undef IDENT
        }
 
@@ -419,7 +419,7 @@ static void printmsg(message *msg, struct proc *src, struct proc *dst,
 
        if (mightbecall && printparams) {
 #define IDENT(x, y) if (mtype == x) printparam(#y, &msg->y, sizeof(msg->y));
-#include "extracted-mfield.h"
+#include "kernel/extracted-mfield.h"
 #undef IDENT
        }
        printf("\n");
index 0629f03a04199a7a7f602a2ad7d1457387c2b1a3..09ba67bbafb4e6763d59ef651fef8a49777808bc 100644 (file)
@@ -8,5 +8,5 @@ tr -s ' \t' ' ' | \
 sed 's/^# /#/' | \
 egrep '^#define [A-Z_][A-Z0-9_]* \( ?_SIGN ?[0-9]+ ?\)' | \
 cut -d' ' -f2 | \
-sed 's/\(.*\)/IDENT(\1)/' | \
+sed 's/\(.*\)/IDENT(\1)/' | grep -v ELAST | \
 sort