-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DBGMSG debug flag on cause compiling error when TRACE_DBG used in source file #2
Comments
Hi Vincent, I have committed some changes to the mOS core files. With these changes, you will be able to compile the stack with debug macros. |
thanks Asim, I see you made some changes in debug.h +#define __PREPARE_DGBLOGGING() \
#define TRACE_DBG(f, m...) { so I tested by commenting out core/src/Makefile.in as below then run ./setup --compile-dpdk. i still got error CC tcp_stream.c it appears the mtcp you added in __PREPARE_DBGLOGGING did not take effect, maybe some syntax error? |
Apologies for the typo mess. This took place when I was synching files from my local version to the github version. There was a typo (DGB --> DBG). The latest commit should remove the problem. I checked :). |
typo happens :) great it compiles fine |
Hi Asim,
I turned on the debug flag on in core/src/Makefile and run into compiling error below:
DBG_OPT = -DDBGMSG -DDBGFUNC -DSTREAM -DSTATE -DTSTAT -DAPP -DEPOLL
DBG_OPT = -DDBGMSG -DDBGFUNC -DSTREAM -DSTATE
DBG_OPT += -DPKTDUMP
DBG_OPT += -DDUMP_STREAM
GCC_OPT += -g -DNETSTAT -DINFO -DDBGERR -DDBGCERR
GCC_OPT += -DNDEBUG -O3 -g -DNETSTAT -DINFO -DDBGERR -DDBGCERR
GCC_OPT += $(DBG_OPT)
CC tcp_stream.c
In file included from tcp_stream.c:14:0:
tcp_stream.c: In function ‘DisableBuf’:
./include/debug.h:50:16: error: ‘mtcp’ undeclared (first use in this function)
thread_printf(mtcp, mtcp->log_fp, "[%10s:%4d] "
^
tcp_stream.c:267:4: note: in expansion of macro ‘TRACE_DBG’
TRACE_DBG("Invalid side!\n");
^
./include/debug.h:50:16: note: each undeclared identifier is reported only once for each function it appears in
thread_printf(mtcp, mtcp->log_fp, "[%10s:%4d] "
^
tcp_stream.c:267:4: note: in expansion of macro ‘TRACE_DBG’
TRACE_DBG("Invalid side!\n");
^
tcp_stream.c: In function ‘GetLastTimestamp’:
./include/debug.h:50:16: error: ‘mtcp’ undeclared (first use in this function)
thread_printf(mtcp, mtcp->log_fp, "[%10s:%4d] "
^
tcp_stream.c:291:3: note: in expansion of macro ‘TRACE_DBG’
TRACE_DBG("Size passed is not >= sizeof(uint32_t)!\n");
^
make: *** [tcp_stream.o] Error 1
it seems TRACE_DGB used in quite a few sources need to be cleaned up properly?
The text was updated successfully, but these errors were encountered: