2007年6月20日星期三

Debugging OO

1. build debug=true dbglevel=2 for max output and dbglevel=1 or 0 for less output.
2.
gdb ./soffice.bin
(gdb) handle SIGPWR nostop noprint
(gdb) handle SIGXCPU nostop noprint
(gdb) handle SIG33 nostop noprint
(gdb) run -norestore -writer

3. (gdb) print dbg_dump(sWhatEver)

4. rebuild the module
gdb ./soffice.bin
...
bt
#0 0x40b4e0a1 in kill () from /lib/libc.so.6
#1 0x409acfe6 in raise () from /lib/libpthread.so.0
#2 0x447bcdbd in SfxMedium::DownLoad(Link const&) () from ./libsfx641li.so
#3 0x447be151 in SfxMedium::SfxMedium(String const&, unsigned short, unsigned char, SfxFilter const*, SfxItemSet*) ()
from ./libsfx641li.so
#4 0x448339d3 in getCppuType(com::sun::star::uno::Reference const*) () from ./libsfx641li.so
...
quit
cd base/OOO_STABLE_1/sfx2
ootouch SfxMedium
build debug=true
5. or
dmake killobj
dmake

6.Non-Product Builds are created using a special configure switch, namely --enable-dbgutil.

For available tools in non-product builds, have a look at the various DBG_foo macros in tools/debug.hxx

To actually fire up the debug settings dialog, press -D.

To use (or do QA for) the additional debug features: just run OO.o, and
when it's in full-flow, press --
'D' in that order

没有评论: