[Libreoffice] getting debug symbols when running build unit tests under gdb?

Markus Mohrhard markus.mohrhard at googlemail.com
Wed Dec 14 07:52:28 PST 2011


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


More information about the LibreOffice mailing list