Re: [Libreoffice] getting debug symbols when running build unit tests under gdb?
Hello Noel, his is under Ubuntu Linux. I'm trying to track down a stack overflow in my code, and I'm having some trouble running the unit tests under GDB and getting debugging symbols. I'm doing EXPORT GDBCPPUNITTRACE=gdb --args then running the module build under /sc build and then breaking the runaway process using kill -5 and then doing 'bt' in GDB I think you should enable symbols in sc by running make clean make -sr debug=true in sc. Then normally EXPORT GDBCPPUNITTRACE=gdb --args should open a gdb shell where you just type run and can debug the unit test like a normal program. It might be a bit tricky depending on which unit test you want to debug because this works only for the first one. So you might need to remove the second one from Module_sc.mk if you want to debug the other one. Markus ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] getting debug symbols when running build unit tests under gdb?
Thanks Markus, I'll try that in the morning. Do you know of any trick for catching stack-overflow problems? The trick I'm using is pretty painful. On Wed, Dec 14, 2011 at 17:52, Markus Mohrhard markus.mohrh...@googlemail.com wrote: Hello Noel, his is under Ubuntu Linux. I'm trying to track down a stack overflow in my code, and I'm having some trouble running the unit tests under GDB and getting debugging symbols. I'm doing EXPORT GDBCPPUNITTRACE=gdb --args then running the module build under /sc build and then breaking the runaway process using kill -5 and then doing 'bt' in GDB I think you should enable symbols in sc by running make clean make -sr debug=true in sc. Then normally EXPORT GDBCPPUNITTRACE=gdb --args should open a gdb shell where you just type run and can debug the unit test like a normal program. It might be a bit tricky depending on which unit test you want to debug because this works only for the first one. So you might need to remove the second one from Module_sc.mk if you want to debug the other one. Markus ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] getting debug symbols when running build unit tests under gdb?
Hello Noel, Do you know of any trick for catching stack-overflow problems? The trick I'm using is pretty painful. Did you try to run the tests with memcheck? If you do some serious rework in calc it would be nice if you could as soon as the normal unit tests pass run them one time with sc_subsequent_filters_test moved from the subsequentcheck target to the normal in-build test target. Therefore just copy the line in Module_sc.mk from one target to the other one. Markus ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] getting debug symbols when running build unit tests under gdb?
On Wednesday 14 of December 2011, Noel Grandin wrote: Thanks Markus, I'll try that in the morning. Do you know of any trick for catching stack-overflow problems? The trick I'm using is pretty painful. Reduce the maximum allowed stack size using 'ulimit -s', the app then will crash as soon as it reaches the limit. -- Lubos Lunak l.lu...@suse.cz ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice