|
Libcwd is a C++ library, written by (Carlo Wood ), to add run-time debugging support for C++ applications, particularly for code developed with the GNU Compiler Collection. The functionality that the library adds to an application can be divided into three categories: # Ostream-based debug output. # Run-time access to debug information. # Run-time access to memory allocation administration. ==Supported platforms== Although the library code itself attempts to be strictly ISO C++, and conform to POSIX as much as possible, in order to achieve points 2 and 3, rather specialized code is needed, specific to the architecture the application runs on. Libcwd restricts itself to a narrow architecture for this reason: It has to be compiled with the GNU compiler, and demands the object code to be 32 or 64 bits ELF and the compiler generated debug information to be DWARF-2. Compiling libcwd results in two libraries: one that is thread-safe (libcwd_r) and a slightly faster version (libcwd) without thread support. The thread-safe version depends on even more architecture specific details (namely, the GNU C library). As a result, a full featured libcwd is basically only suitable for development on Linux platforms. However, libcwd may be ''configured'' to drop thread support, memory allocation debugging and/or reading the ELF and DWARF-2 debugging information—until only the ostream debug support is left. This way one can use it to develop an application on linux until it is robust, and still have the debug output on other (POSIX) platforms, even though a full-fledged libcwd isn't available there—provided no thread-safety is needed for the debug output on those platforms: two or more threads writing debug output to the same ostream might cause a rather messy output where the output of one line starts in the middle of another, without thread-support. 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Libcwd」の詳細全文を読む スポンサード リンク
|