Apache OpenOffice (AOO) Bugzilla – Issue 17560
debug into mozab
Last modified: 2010-11-10 16:46:10 UTC
To fix bugs in OpenOffice Address Book Integration Mozilla part codes,we need debug into Mozilla xpcom components integration with OO.But due to the mode we use mozilla code,we cann't simplely replace mozab with a debug version mozilla components,that will cast a crash.Because we use mozilla in binary mode,our mozab driver only know release xpcom.dll,so we cann't replace xpcom.dll with debug version one.And debug componets use debug functions in debug mode xpcom.dll,so we cann't replace any components with debug version ones. So you must build a "release" version components with debug infomations.You must set MOZ_PROFILE=1 and add --disable-debug ,--disable-optimize in mozconfig file.
mozconfig file may look like this ac_add_options --disable-tests ac_add_options --disable-xprint ac_add_options --without-zlib ac_add_options --enable-ldap ac_add_options --disable-debug ac_add_options --disable-optimize
Wind, we may consider suppliying debug version of the MOZ libs for a debug build of OOo (do you know that OOo has debug and product builds?) We once had this, but stopped because of a problem we had with assertions: Every time some mozilla code did an assertion, OOo crashed. Back at this time, we supposed the only way would be to _not_ have debug builds of Mozilla. Today I suppose that probably all which was missing is the separate executable which raises the assertion message box - when this executable is not present, a Mozilla assertion breaks into the debugger, which is observed as crash. If we would, in OOo DEBUG mode, also use MOZ debug components (and especially compile the mozab SDBC driver with moz-debug settings), then this could perhaps also help ...
>If we would, in OOo DEBUG mode, also use MOZ debug components >(and especially compile the mozab SDBC driver with moz-debug >settings),then this could perhaps also help ... Maybe after we fix threadsafe issue.Or there will be too much assertion message boxs,it will be suffering to use it. But I suggest for a developer a release build with debug info is easyer to debug than a debug version libs.Because you does not have to fall into debug code so frequently.
> But I suggest for a developer a release build with debug info is > easyer to debug than a debug version libs. sounds reasonable :)
edit mozilla\nsprpub\config\config.mk,add ifeq ($(OS_ARCH),WINNT) ifdef MOZ_PROFILE _WIN32_PROFILE_FLAGS=-Zi -O1 -UDEBUG -DNDEBUG OS_CFLAGS += $(_WIN32_PROFILE_FLAGS) OS_CXXFLAGS += $(_WIN32_PROFILE_FLAGS) OS_LDFLAGS += /DEBUG /DEBUGTYPE:CV /OPT:REF /OPT:nowin98 endif endif Now you can debug into nspr4.dll
change subcomponent to 'none'
closing
Created attachment 73283