[complement-svn] SF.net SVN: complement: [1767] trunk/complement/explore
Status: Pre-Alpha
Brought to you by:
complement
From: <com...@us...> - 2007-10-24 14:25:15
|
Revision: 1767 http://complement.svn.sourceforge.net/complement/?rev=1767&view=rev Author: complement Date: 2007-10-24 07:25:11 -0700 (Wed, 24 Oct 2007) Log Message: ----------- allow build without BFD; libxmt 1.14.1 Modified Paths: -------------- trunk/complement/explore/include/config/_linux.h trunk/complement/explore/include/config/feature.h trunk/complement/explore/lib/mt/ChangeLog trunk/complement/explore/lib/mt/Makefile.inc trunk/complement/explore/lib/mt/callstack.cc Modified: trunk/complement/explore/include/config/_linux.h =================================================================== --- trunk/complement/explore/include/config/_linux.h 2007-10-16 08:03:28 UTC (rev 1766) +++ trunk/complement/explore/include/config/_linux.h 2007-10-24 14:25:11 UTC (rev 1767) @@ -82,4 +82,12 @@ #define __FIT_EPOLL */ +/* + * Normally, in Linux present BFD mechanism + */ + +#ifndef __FIT_DISABLE_BFD +# define __FIT_PRESENT_BFD +#endif + #endif /* __config__linux_h */ Modified: trunk/complement/explore/include/config/feature.h =================================================================== --- trunk/complement/explore/include/config/feature.h 2007-10-16 08:03:28 UTC (rev 1766) +++ trunk/complement/explore/include/config/feature.h 2007-10-24 14:25:11 UTC (rev 1767) @@ -114,9 +114,27 @@ /* Store information about stack before create thread in xmt::Thread; - useful for debugging. + useful for debugging. Real implementation require BFD. */ +/* #define __FIT_CREATE_THREAD_STACK_INFO +*/ +/* + Don't use bfd, even if it available on platform; printing stack + impossible without BFD (Binary File Descriptor). +*/ + +#define __FIT_DISABLE_BFD + +#if 0 +#ifdef __FIT_DISABLE_BFD +/* Without BFD we can't take info about stack */ +# ifdef __FIT_CREATE_THREAD_STACK_INFO +# undef __FIT_CREATE_THREAD_STACK_INFO +# endif +#endif +#endif + #endif /* __config_feature_h */ Modified: trunk/complement/explore/lib/mt/ChangeLog =================================================================== --- trunk/complement/explore/lib/mt/ChangeLog 2007-10-16 08:03:28 UTC (rev 1766) +++ trunk/complement/explore/lib/mt/ChangeLog 2007-10-24 14:25:11 UTC (rev 1767) @@ -1,3 +1,11 @@ +2007-10-24 Petr Ovtchenkov <pt...@is...> + + * config/feature.h, config/_linux.h: allow build without BFD; + + * callstack.cc: suggest dummy call, if no BFD available; + + * libxmt: version 1.14.1 + 2007-09-24 Petr Ovtchenkov <pt...@is...> * callstack.h, callstack.cc: print call stack to ostream, initial Modified: trunk/complement/explore/lib/mt/Makefile.inc =================================================================== --- trunk/complement/explore/lib/mt/Makefile.inc 2007-10-16 08:03:28 UTC (rev 1766) +++ trunk/complement/explore/lib/mt/Makefile.inc 2007-10-24 14:25:11 UTC (rev 1767) @@ -3,6 +3,6 @@ LIBNAME = xmt MAJOR = 1 MINOR = 14 -PATCH = 0 +PATCH = 1 SRC_CC = xmt.cc thr_mgr.cc time.cc uid.cc shm.cc callstack.cc SRC_C = fl.c Modified: trunk/complement/explore/lib/mt/callstack.cc =================================================================== --- trunk/complement/explore/lib/mt/callstack.cc 2007-10-16 08:03:28 UTC (rev 1766) +++ trunk/complement/explore/lib/mt/callstack.cc 2007-10-24 14:25:11 UTC (rev 1767) @@ -28,6 +28,23 @@ // #include <stdlib.h> // #include <stdio.h> +#ifndef __FIT_PRESENT_BFD + +#include <mt/callstack.h> + +namespace xmt { + +using namespace std; + +void callstack( std::ostream& s ) +{ + s << "Sorry, compiled without BFD\n"; +} + +} // namespace xmt + +#else // __FIT_PRESENT_BFD + #include <bfd.h> #include <signal.h> #include <ucontext.h> @@ -302,3 +319,4 @@ } // namespace xmt +#endif // __FIT_PRESENT_BFD This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |