Hello,
Just wanted to share some debugging tips for tntnet:
(1) An obvious one is to compile with ecppc -L so that the
debugger will have the line numbers for the .cpp file, and
to compile tntnet and application the .cpp files with -g.
Then tntnet can be run under the debugger, or the debugger
can be used to debug core dumps.
(2) When debugging with Sun Studio it is useful to add the following
to your ~/.dbxrc file so that dbx will pre-load the debug
symbols for your shared library, so that Sun Studio will
be able to set the breakpoints before running tntnet:
_cb_aoutchange() {
loadobject -load /full_path_to_shared_lib/my_shared_lib.so
}
(3) tntnet will not be able to load the application shared library
if it has missing symbols. To debug that on Solaris:
% export LD_DEBUG_64=files
% tntnet -c tntnet.conf
Or LD_DEBUG_32 if its a 32 bit tntnet. Then check the output to
see if there are any relocation errors, like:
18846: 6: ld.so.1: tntnet: fatal: relocation error: file ./my_shared_lib.so:
symbol
__1cCBCMCurrencyCode2t6MrknDstdMbasic_string4Ccn0CLchar_traits4Cc__n0CJallocator4Cc_____v_:
referenced symbol not found
and if there are, the C++ symbol can be demangled with c++filt:
% echo
__1cCBCMCurrencyCode2t6MrknDstdMbasic_string4Ccn0CLchar_traits4Cc__n0CJallocator4Cc_____v_
| c++filt
BC::CurrencyCode::CurrencyCode(const std::string &)
%
In this case I think, hmm, looks like I need to add CurrencyCode.cpp to
the Makefile.
Regards, Mark
--
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general