How to add debug select when building linuxcnc source code?

More
12 Oct 2021 09:25 #222910 by curran209
Building linuxcnc source code need using make comand.
How to add debug select when building linuxcnc source code?

Please Log in or Create an account to join the conversation.

More
13 Oct 2021 23:36 #223048 by andypugh
I don't fully understand your question.

LinuxCNC has a few separate debug levels that might be set. They all control the debug level of different things.

There is an entry in the INI, but I suspect that you don't mean that.
linuxcnc.org/docs/2.8/html/config/ini-config.html#_emc_section

You can add a line of code in a relevant place:
linuxcnc.org/docs/2.8/html/man/man3/rtap...sg_level.3rtapi.html

(you used to be able to set this with echo 5 > /proc/rtapi/debug but something broke that).
Try "man debuglevel" for another way. (basically issue the "debuglevel" command in a terminal window when LinuxCNC is running)

And then there is the option of adding debugging at the kernel level:
github.com/LinuxCNC/linuxcnc/blob/2.7-buster/docs/rtfaults.txt

Please Log in or Create an account to join the conversation.

More
14 Oct 2021 03:34 #223056 by curran209
I want to debug my new code added in linuxcnc project with gdb . How can i add debug selection when building? Because use gcc -g when i building a small project.

Please Log in or Create an account to join the conversation.

More
14 Oct 2021 08:01 #223065 by andypugh
The last link in my reply above says where the -g flag should be inserted.

Please Log in or Create an account to join the conversation.

Time to create page: 0.061 seconds
Powered by Kunena Forum