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
This commit is contained in:
Ben Gras 2013-09-24 10:32:11 +02:00
parent cb5e2921b3
commit a64a836a3f
3 changed files with 5 additions and 5 deletions

View 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}

View 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");

View 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