From a64a836a3ff64e3a392bb0c9088a4f8206fef6bf Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Tue, 24 Sep 2013 10:32:11 +0200 Subject: [PATCH] kernel: fixes for DEBUG_DUMPIPC mode . 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 | 2 +- kernel/debug.c | 6 +++--- kernel/extract-errno.sh | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/Makefile b/kernel/Makefile index c16eadcc9..3df00d3f1 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -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} diff --git a/kernel/debug.c b/kernel/debug.c index 751d17a6b..793749e9e 100644 --- a/kernel/debug.c +++ b/kernel/debug.c @@ -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"); diff --git a/kernel/extract-errno.sh b/kernel/extract-errno.sh index 0629f03a0..09ba67bba 100644 --- a/kernel/extract-errno.sh +++ b/kernel/extract-errno.sh @@ -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 -- 2.44.0