Hi, I hope someone can assist here. I couldn't come with better title, sorry.
I write a test application and I want to run the compiled code without installing. So I build using make -f debian/rules build and then run
LD_LIBRARY_PATH=obj-x86_64-linux-gnu/src/testapp obj-x86_64-linux-gnu/src/testapp/testapp
but I do not get any debugging symbols and no debugging output with kdDebug. tqDebug works, but this is not what I want.
How can I compile so that I can have the debugging with kdDebug without building dbgsym packages.
Does someone have an advise.
thanks
On 2022/10/05 05:12 PM, deloptes wrote:
Hi, I hope someone can assist here. I couldn't come with better title, sorry.
I write a test application and I want to run the compiled code without installing. So I build using make -f debian/rules build and then run
LD_LIBRARY_PATH=obj-x86_64-linux-gnu/src/testapp obj-x86_64-linux-gnu/src/testapp/testapp
but I do not get any debugging symbols and no debugging output with kdDebug. tqDebug works, but this is not what I want.
How can I compile so that I can have the debugging with kdDebug without building dbgsym packages.
Does someone have an advise.
Hi Emanoil, first of all, kdDebug and debug symbols are two independent concepts. dbgsym are symbols that can be used when debugging the program within a debugger like gdb. kdDebug is a stream object that let you print messages to a stream, regardless of whether you have installed debug symbols or not. If tdelibs is built in release or RelWithDebInfo (in debian), kdDebug won't print any info. If tdelibs is built in debug mode, kdDebug will work as expected. Cheers Michele
Michele Calgaro via tde-devels wrote:
RelWithDebInfo
Thank you tdelibs is OK
tdelibs$ grep Debug -r debian/rules -DCMAKE_BUILD_TYPE=Debug
it seems that I had to set this flag in the application as well - obviously!
thank you for the hint
Michele Calgaro via tde-devels wrote:
first of all, kdDebug and debug symbols are two independent concepts. dbgsym are symbols that can be used when debugging the program within a debugger like gdb. kdDebug is a stream object that let you print messages to a stream, regardless of whether you have installed debug symbols or not.
in this context, what is DrKonqi using to display the debug? I do not see there the backtrace, when it crashes so what should I do to see it (when I run the application from the place it was build)
thanks
On 2022/10/09 07:38 AM, deloptes wrote:
Michele Calgaro via tde-devels wrote:
first of all, kdDebug and debug symbols are two independent concepts. dbgsym are symbols that can be used when debugging the program within a debugger like gdb. kdDebug is a stream object that let you print messages to a stream, regardless of whether you have installed debug symbols or not.
in this context, what is DrKonqi using to display the debug? I do not see there the backtrace, when it crashes so what should I do to see it (when I run the application from the place it was build)
DrKonqui uses a backtrace, pretty much capturing the same info you would see in gdb when looking at the backtrace after a crash. If you have debug symbols installed, those will be used to display additional info about the crash (either by DrKonqui or gdb). There is a kdBacktrace() function in kdebug.cpp in tdelibs which builds a backtrace. You can print a backtrace programmatically even without a crash by using it in your code. Cheers Michele