I am new to Haiku. I am looking at haikuports/app-text/mandoc to see if I can get makewhatis and apropos working. The code is pretty intense but I’ve got a rough idea of what is going on.
Instead of littering printf() calls all about, a nice debugging GUI session would be great. In digging about I see that there is gdb and something called QTcreator, which I have installed. With the setup in haikuports I am not sure how to point a debugger to the source files and all. Let alone how to start a debugger. I have learned that to build things in debug I needed to edit the .recipe file and add to the build target -DCMAKE_BUILD_TYPE=debug and rebuild.
Any ideas, guidance, or suggestions would be appreciated.
Thanks in advance.
If you have build in debug version, you can try the native Haiku Debugger app.
[Documentation de Debugger dans le User Guide](file:///boot/system/documentation/userguide/en/applications/debugger.html)
Launch the makewhatis / apropos command from the start window, you can either attach to an already running process or launch a new one, giving you time to setup some breakpoints before the program start to run.
On loading, you will get dialog asking you if you want to load the debug version of some system and foundation libs, for the moment try without.
If the source file is not displayed, you can click above on the text saying “No source file…” to help locate the source file.
OK. I run the Debugger on the file created in the build at ~/haikuports/app-text/mandoc/work-1.14.6/sources/mandoc-1.14.6/mandoc As it runs under different names through symlinks to the executable with internal logic based on the main argv[0] name I honor that with a
symlink of ln -s mandoc makewhatis
That way it supports multiple shell commands with one unified set of source files all sharing common definitions and logic.
In running: Debugger makewhatis
No source displayed. Your suggestion of clicking on the text ‘Source not available’ does nothing, and checking with what is displayed I cannot find a source-related control.
Am I missing something? BTW, the file you reference has a link in it :
Debugger Reference Manual which when clicked gives a security warning. I cannot get what it says it is pointing to.
So I do not have a link to a Debugger Reference Manual. Is there one on the Haiku site?
Some progress.
I do have a link to the Debugger Reference Manual. It is a .pdf file.
But it does not talk about how to point to source files.
I have found:
Going through that at the “Debug > Start Debugging” step I get a QTcreator error
with options to Terminate, Debug and the like for QTcreator itself.
Still no debugger with source showing.
Any thoughts/clues?