Raspberry Zero W: Running ok but Debugger with error

General questions regarding the usage of CodeLite
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Raspy: Running ok but Debugger with error

Post by DavidGH »

What happens if you do, in the terminal:
gdb sudo ./Debug/program
GDB brings error
OK, then that explains why all the above things fail.

I think what you need to do is to change the debugger command from 'gdb' to '/usr/bin/sudo /usr/bin/gdb'. You can probably do that in the project settings 'Debugger' section. I say 'probably' because it fails for me: when I try to debug, it demands a password and there's no way to provide it. However you don't need one, so...
codemonster
CodeLite Enthusiast
Posts: 31
Joined: Tue Feb 26, 2019 12:50 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Raspy: Running ok but Debugger with error

Post by codemonster »

You can probably do that in the project settings 'Debugger' section.
I havn't found this field :shock:
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Raspy: Running ok but Debugger with error

Post by DavidGH »

Using the icon in the Workspace View, open the Project Settings dialog. Look on the left; you'll see 'General', 'Compiler'...'Debugger'...

Click 'Debugger'
codemonster
CodeLite Enthusiast
Posts: 31
Joined: Tue Feb 26, 2019 12:50 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Raspy: Running ok but Debugger with error

Post by codemonster »

Hi,
thouthands of time beeing in this settings. There are fields like:
-Select Debugger path. Leave empty to use Default
-Debugger Search Paths
-StartupCommands
-Remote Attach Commands

...but I have new Informations:
I have made a completly new project with the same c++ code and now the debugger is running :shock: . Stepping through the program is possible but with command "pinMode(1, PWM_OUTPUT);" the debugger fades away. See below.
I will invest still a short time and then I will give up and will make the debugging in gdb terminal.

Code: Select all

DEBUG>>~"Breakpoint 3, main () at /home/pi/myprod/cpptest/p13_servo/main.cpp:21\n"
Breakpoint 3, main () at /home/pi/myprod/cpptest/p13_servo/main.cpp:21
DEBUG>>~"21\t\tpinMode(1, PWM_OUTPUT);\n"
21\t\tpinMode(1, PWM_OUTPUT);
DEBUG>>*stopped,reason="breakpoint-hit",disp="keep",bkptno="3",frame={addr="0x00010b40",func="main",args=[],file="/home/pi/myprod/cpptest/p13_servo/main.cpp",fullname="/home/pi/myprod/cpptest/p13_servo/main.cpp",line="21"},thread-id="1",stopped-threads="all",core="0"
DEBUG>>00000085-stack-info-frame
DEBUG>>00000086-break-list
DEBUG>>00000085^done,frame={level="0",addr="0x00010b40",func="main",file="/home/pi/myprod/cpptest/p13_servo/main.cpp",fullname="/home/pi/myprod/cpptest/p13_servo/main.cpp",line="21"}
DEBUG>>00000086^done,BreakpointTable={nr_rows="4",nr_cols="6",hdr=[{width="7",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alignment="-1",col_name="addr",colhdr="Address"},{width="40",alignment="2",col_name="what",colhdr="What"}],body=[bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="<PENDING>",pending="/home/pi/myprod/cpptest/hello/hello.cpp:6",times="0",original-location="/home/pi/myprod/cpptest/hello/hello.cpp:6"},bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="<PENDING>",pending="/home/pi/myprod/cpptest/p12-servo/servo-test.cpp:26",times="0",original-location="/home/pi/myprod/cpptest/p12-servo/servo-test.cpp:26"},bkpt={number="3",type="breakpoint",disp="keep",enabled="y",addr="0x00010b40",func="main()",file="/home/pi/myprod/cpptest/p13_servo/main.cpp",fullname="/home/pi/myprod/cpptest/p13_servo/main.cpp",line="21",thread-groups=["i1"],times="1",original-location="/home/pi/myprod/cpptest/p13_servo/main.cpp:21"},bkpt={number="4",type="breakpoint",disp="keep",enabled="y",addr="0x00010b98",func="main()",file="/home/pi/myprod/cpptest/p13_servo/main.cpp",fullname="/home/pi/myprod/cpptest/p13_servo/main.cpp",line="31",thread-groups=["i1"],times="0",original-location="/home/pi/myprod/cpptest/p13_servo/main.cpp:31"}]}

========= and now     "pinMode(1, PWM_OUTPUT);" ====debugger fades away ===================

DEBUG>>00000087^running
Continuing...
DEBUG>>*running,thread-id="all"
*running,thread-id="all"
DEBUG>>~"[Inferior 1 (process 11715) exited with code 01]\n"
[Inferior 1 (process 11715) exited with code 01]
DEBUG>>=thread-exited,id="1",group-id="i1"
=thread-exited,id="1",group-id="i1"
DEBUG>>=thread-group-exited,id="i1",exit-code="01"
=thread-group-exited,id="i1",exit-code="01"
DEBUG>>*stopped,reason="exited",exit-code="01"
Program exited normally.
Debug session ended
codemonster
CodeLite Enthusiast
Posts: 31
Joined: Tue Feb 26, 2019 12:50 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Raspberry Zero W: Running ok but Debugger with error

Post by codemonster »

...but I want to highligt that I'm developing with codelite on an small and cheap (10 Euro) Raspberry Zero W "computer". It's great that this is possible. I think, that no other IDE with so much features can provide this as codelite can on this slow computer.
codemonster
CodeLite Enthusiast
Posts: 31
Joined: Tue Feb 26, 2019 12:50 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Raspberry Zero W: Running ok but Debugger with error

Post by codemonster »

… I can' give up :D … so I'm examining the gdb output protocol.
Following below:
Part 1: stepping possible :D
Part 2: Debugger breaks :cry:
Protocol of running program in gdb-terminal (all ok, servo is moving) :D

Perhaps someone can help?

Part 1: all ok, I can stepp through the program … couts are ok till pinMode(1, PWM_OUTPUT);

Code: Select all

Using gdbinit file: /tmp/codelite_gdbinit.txt
Current working dir: /home/pi/myprod/cpptest/p13_servo
Launching gdb from : ./Debug
Starting debugger  : /usr/bin/gdb --command="/tmp/codelite_gdbinit.txt" --tty=/dev/pts/6 --interpreter=mi "./p13_servo"
DEBUG>>set unwindonsignal on
DEBUG>>set breakpoint pending on
DEBUG>>set print object on
DEBUG>>set width 0
DEBUG>>set height 0
DEBUG>>set print elements 200
DEBUG>>00000066-break-insert -f "/home/pi/myprod/cpptest/p13_servo/main.cpp:21"
DEBUG>>00000067-break-insert -f "/home/pi/myprod/cpptest/p13_servo/main.cpp:22"
DEBUG>>00000068-enable-pretty-printing
Debug session started successfully!
DEBUG>>00000069-exec-arguments 
DEBUG>>00000070-exec-run 
DEBUG>>=thread-group-added,id="i1"
=thread-group-added,id="i1"
DEBUG>>~"GNU gdb (Raspbian 7.12-6) 7.12.0.20161007-git\n"
GNU gdb (Raspbian 7.12-6) 7.12.0.20161007-git
DEBUG>>~"Copyright (C) 2016 Free Software Foundation, Inc.\n"
Copyright (C) 2016 Free Software Foundation, Inc.
DEBUG>>~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\nand \"show warranty\" for details.\n"
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.  Type "show copying"\nand "show warranty" for details.
DEBUG>>~"This GDB was configured as \"arm-linux-gnueabihf\".\nType \"show configuration\" for configuration details."
This GDB was configured as "arm-linux-gnueabihf".\nType "show configuration" for configuration details.
DEBUG>>~"\nFor bug reporting instructions, please see:\n"
\nFor bug reporting instructions, please see:
DEBUG>>~"<http://www.gnu.org/software/gdb/bugs/>.\n"
<http://www.gnu.org/software/gdb/bugs/>.
DEBUG>>~"Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/>.\n"
Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/>.
DEBUG>>~"For help, type \"help\".\n"
For help, type "help".
DEBUG>>~"Type \"apropos word\" to search for commands related to \"word\"...\n"
Type "apropos word" to search for commands related to "word"...
DEBUG>>~"Reading symbols from ./p13_servo..."
Reading symbols from ./p13_servo...
DEBUG>>~"done.\n"
done.
DEBUG>>&"set unwindonsignal on\n"
DEBUG>>=cmd-param-changed,param="unwindonsignal",value="on"
=cmd-param-changed,param="unwindonsignal",value="on"
DEBUG>>^done
DEBUG>>&"set breakpoint pending on\n"
DEBUG>>=cmd-param-changed,param="breakpoint pending",value="on"
=cmd-param-changed,param="breakpoint pending",value="on"
DEBUG>>^done
DEBUG>>&"set print object on\n"
DEBUG>>=cmd-param-changed,param="print object",value="on"
=cmd-param-changed,param="print object",value="on"
DEBUG>>^done
DEBUG>>&"set width 0\n"
DEBUG>>=cmd-param-changed,param="width",value="4294967295"
=cmd-param-changed,param="width",value="4294967295"
DEBUG>>^done
DEBUG>>&"set height 0\n"
DEBUG>>=cmd-param-changed,param="height",value="4294967295"
=cmd-param-changed,param="height",value="4294967295"
DEBUG>>^done
DEBUG>>&"set print elements 200\n"
DEBUG>>^done
DEBUG>>00000066^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x00010b40",func="main()",file="/home/pi/myprod/cpptest/p13_servo/main.cpp",fullname="/home/pi/myprod/cpptest/p13_servo/main.cpp",line="21",thread-groups=["i1"],times="0",original-location="/home/pi/myprod/cpptest/p13_servo/main.cpp:21"}
Found the breakpoint ID!
Storing debugger breakpoint Id=1
Successfully set breakpoint 1 at: /home/pi/myprod/cpptest/p13_servo/main.cpp:21
DEBUG>>00000067^done,bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="0x00010b4c",func="main()",file="/home/pi/myprod/cpptest/p13_servo/main.cpp",fullname="/home/pi/myprod/cpptest/p13_servo/main.cpp",line="22",thread-groups=["i1"],times="0",original-location="/home/pi/myprod/cpptest/p13_servo/main.cpp:22"}
Found the breakpoint ID!
Storing debugger breakpoint Id=2
Successfully set breakpoint 2 at: /home/pi/myprod/cpptest/p13_servo/main.cpp:22
DEBUG>>00000068^done
DEBUG>>00000069^done
>> Debuggee process ID: 1976
DEBUG>>=thread-group-started,id="i1",pid="1976"
=thread-group-started,id="i1",pid="1976"
DEBUG>>=thread-created,id="1",group-id="i1"
=thread-created,id="1",group-id="i1"
DEBUG>>=library-loaded,id="/lib/ld-linux-armhf.so.3",target-name="/lib/ld-linux-armhf.so.3",host-name="/lib/ld-linux-armhf.so.3",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/ld-linux-armhf.so.3",target-name="/lib/ld-linux-armhf.so.3",host-name="/lib/ld-linux-armhf.so.3",symbols-loaded="0",thread-group="i1"
DEBUG>>00000070^running
Continuing...
DEBUG>>*running,thread-id="all"
*running,thread-id="all"
DEBUG>>=library-loaded,id="/usr/lib/arm-linux-gnueabihf/libarmmem.so",target-name="/usr/lib/arm-linux-gnueabihf/libarmmem.so",host-name="/usr/lib/arm-linux-gnueabihf/libarmmem.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/arm-linux-gnueabihf/libarmmem.so",target-name="/usr/lib/arm-linux-gnueabihf/libarmmem.so",host-name="/usr/lib/arm-linux-gnueabihf/libarmmem.so",symbols-loaded="0",thread-group="i1"
DEBUG>>=library-loaded,id="/usr/lib/libwiringPi.so",target-name="/usr/lib/libwiringPi.so",host-name="/usr/lib/libwiringPi.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/libwiringPi.so",target-name="/usr/lib/libwiringPi.so",host-name="/usr/lib/libwiringPi.so",symbols-loaded="0",thread-group="i1"
DEBUG>>=library-loaded,id="/usr/lib/arm-linux-gnueabihf/libstdc++.so.6",target-name="/usr/lib/arm-linux-gnueabihf/libstdc++.so.6",host-name="/usr/lib/arm-linux-gnueabihf/libstdc++.so.6",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/arm-linux-gnueabihf/libstdc++.so.6",target-name="/usr/lib/arm-linux-gnueabihf/libstdc++.so.6",host-name="/usr/lib/arm-linux-gnueabihf/libstdc++.so.6",symbols-loaded="0",thread-group="i1"
DEBUG>>=library-loaded,id="/lib/arm-linux-gnueabihf/libm.so.6",target-name="/lib/arm-linux-gnueabihf/libm.so.6",host-name="/lib/arm-linux-gnueabihf/libm.so.6",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/arm-linux-gnueabihf/libm.so.6",target-name="/lib/arm-linux-gnueabihf/libm.so.6",host-name="/lib/arm-linux-gnueabihf/libm.so.6",symbols-loaded="0",thread-group="i1"
DEBUG>>=library-loaded,id="/lib/arm-linux-gnueabihf/libgcc_s.so.1",target-name="/lib/arm-linux-gnueabihf/libgcc_s.so.1",host-name="/lib/arm-linux-gnueabihf/libgcc_s.so.1",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/arm-linux-gnueabihf/libgcc_s.so.1",target-name="/lib/arm-linux-gnueabihf/libgcc_s.so.1",host-name="/lib/arm-linux-gnueabihf/libgcc_s.so.1",symbols-loaded="0",thread-group="i1"
DEBUG>>=library-loaded,id="/lib/arm-linux-gnueabihf/libc.so.6",target-name="/lib/arm-linux-gnueabihf/libc.so.6",host-name="/lib/arm-linux-gnueabihf/libc.so.6",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/arm-linux-gnueabihf/libc.so.6",target-name="/lib/arm-linux-gnueabihf/libc.so.6",host-name="/lib/arm-linux-gnueabihf/libc.so.6",symbols-loaded="0",thread-group="i1"
DEBUG>>=library-loaded,id="/lib/arm-linux-gnueabihf/libpthread.so.0",target-name="/lib/arm-linux-gnueabihf/libpthread.so.0",host-name="/lib/arm-linux-gnueabihf/libpthread.so.0",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/arm-linux-gnueabihf/libpthread.so.0",target-name="/lib/arm-linux-gnueabihf/libpthread.so.0",host-name="/lib/arm-linux-gnueabihf/libpthread.so.0",symbols-loaded="0",thread-group="i1"
DEBUG>>=library-loaded,id="/lib/arm-linux-gnueabihf/librt.so.1",target-name="/lib/arm-linux-gnueabihf/librt.so.1",host-name="/lib/arm-linux-gnueabihf/librt.so.1",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/arm-linux-gnueabihf/librt.so.1",target-name="/lib/arm-linux-gnueabihf/librt.so.1",host-name="/lib/arm-linux-gnueabihf/librt.so.1",symbols-loaded="0",thread-group="i1"
DEBUG>>=library-loaded,id="/lib/arm-linux-gnueabihf/libcrypt.so.1",target-name="/lib/arm-linux-gnueabihf/libcrypt.so.1",host-name="/lib/arm-linux-gnueabihf/libcrypt.so.1",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/arm-linux-gnueabihf/libcrypt.so.1",target-name="/lib/arm-linux-gnueabihf/libcrypt.so.1",host-name="/lib/arm-linux-gnueabihf/libcrypt.so.1",symbols-loaded="0",thread-group="i1"
DEBUG>>~"[Thread debugging using libthread_db enabled]\n"
[Thread debugging using libthread_db enabled]
DEBUG>>~"Using host libthread_db library \"/lib/arm-linux-gnueabihf/libthread_db.so.1\".\n"
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
DEBUG>>=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x00010b40",func="main()",file="/home/pi/myprod/cpptest/p13_servo/main.cpp",fullname="/home/pi/myprod/cpptest/p13_servo/main.cpp",line="21",thread-groups=["i1"],times="1",original-location="/home/pi/myprod/cpptest/p13_servo/main.cpp:21"}
=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x00010b40",func="main()",file="/home/pi/myprod/cpptest/p13_servo/main.cpp",fullname="/home/pi/myprod/cpptest/p13_servo/main.cpp",line="21",thread-groups=["i1"],times="1",original-location="/home/pi/myprod/cpptest/p13_servo/main.cpp:21"}
DEBUG>>~"\n"

DEBUG>>~"Breakpoint 1, main () at /home/pi/myprod/cpptest/p13_servo/main.cpp:21\n"
Breakpoint 1, main () at /home/pi/myprod/cpptest/p13_servo/main.cpp:21
DEBUG>>~"21\t\tpinMode(1, PWM_OUTPUT);\n"
21\t\tpinMode(1, PWM_OUTPUT);
DEBUG>>*stopped,reason="breakpoint-hit",disp="keep",bkptno="1",frame={addr="0x00010b40",func="main",args=[],file="/home/pi/myprod/cpptest/p13_servo/main.cpp",fullname="/home/pi/myprod/cpptest/p13_servo/main.cpp",line="21"},thread-id="1",stopped-threads="all",core="0"
DEBUG>>00000071-stack-info-frame
DEBUG>>00000072-break-list
DEBUG>>00000071^done,frame={level="0",addr="0x00010b40",func="main",file="/home/pi/myprod/cpptest/p13_servo/main.cpp",fullname="/home/pi/myprod/cpptest/p13_servo/main.cpp",line="21"}
DEBUG>>00000072^done,BreakpointTable={nr_rows="2",nr_cols="6",hdr=[{width="7",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alignment="-1",col_name="addr",colhdr="Address"},{width="40",alignment="2",col_name="what",colhdr="What"}],body=[bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x00010b40",func="main()",file="/home/pi/myprod/cpptest/p13_servo/main.cpp",fullname="/home/pi/myprod/cpptest/p13_servo/main.cpp",line="21",thread-groups=["i1"],times="1",original-location="/home/pi/myprod/cpptest/p13_servo/main.cpp:21"},bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="0x00010b4c",func="main()",file="/home/pi/myprod/cpptest/p13_servo/main.cpp",fullname="/home/pi/myprod/cpptest/p13_servo/main.cpp",line="22",thread-groups=["i1"],times="0",original-location="/home/pi/myprod/cpptest/p13_servo/main.cpp:22"}]}
Then Part 2 running pinMode(1, PWM_OUTPUT);

Code: Select all

DEBUG>>00000073-exec-next
DEBUG>>00000073^running
Continuing...
DEBUG>>*running,thread-id="all"
*running,thread-id="all"
DEBUG>>~"[Inferior 1 (process 1976) exited with code 01]\n"
[Inferior 1 (process 1976) exited with code 01]
DEBUG>>=thread-exited,id="1",group-id="i1"
=thread-exited,id="1",group-id="i1"
DEBUG>>=thread-group-exited,id="i1",exit-code="01"
=thread-group-exited,id="i1",exit-code="01"
DEBUG>>*stopped,reason="exited",exit-code="01"
Program exited normally.
Debug session ended
This is my test in gdb-terminal All works fine, the servo is moving:

Code: Select all

pi@raspberrypi:~/myprod/cpptest/p13_servo $ sudo gdb ./Debug/p13_servo
GNU gdb (Raspbian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./Debug/p13_servo...done.
(gdb) break main.cpp:29
Breakpoint 1 at 0x10b84: file /home/pi/myprod/cpptest/p13_servo/main.cpp, line 29.
(gdb) run
Starting program: /home/pi/myprod/cpptest/p13_servo/Debug/p13_servo 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
hello  :2
test :20

Breakpoint 1, main () at /home/pi/myprod/cpptest/p13_servo/main.cpp:29
29		usleep(1000 * 1000);
(gdb) 

DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Raspberry Zero W: Running ok but Debugger with error

Post by DavidGH »

thouthands of time beeing in this settings. There are fields like:
-Select Debugger path. Leave empty to use Default
That's the field that I meant, where you can write:
/usr/bin/sudo /usr/bin/gdb

But you seem to be making progress anyway (though I don't really understand what's working/not working, or how you are starting gdb).
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Raspberry Zero W: Running ok but Debugger with error

Post by DavidGH »

I've now had a chance to ask eranif about this. You can't debug a 'root' process with CodeLite as CodeLite won't be able to do things like setting breakpoints; it won't have enough permissions.

I suppose you could run sudo CodeLite too, but eranif suggests it's better to use 'remote debugging' with gdb-server running as root. I think you can do that between 2 users instead of 2 machines, so you can run CodeLite as a normal user in the same box.

You can set up remote debugging in the Project Settings dialog; 'Debugging a remote target' at the bottom of the 'Debugger' page.
codemonster
CodeLite Enthusiast
Posts: 31
Joined: Tue Feb 26, 2019 12:50 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Raspberry Zero W: Running ok but Debugger with error

Post by codemonster »

A big improvement :D
I can step through the program and the servo is moving. But a little problem (still) remains. I'm missing the green arrow of the Position of the program . What a bummer!
Still a problem for the Debugger with access to the sourcecode?

Code: Select all

Using gdbinit file: /tmp/codelite_gdbinit.txt
Current working dir: /home/pi/myprod/cpptest/p13_servo
Launching gdb from : ./Debug
Starting debugger  : /usr/bin/sudo /usr/bin/gdb --command="/tmp/codelite_gdbinit.txt" --tty=/dev/pts/6 --interpreter=mi "./p13_servo"
DEBUG>>set unwindonsignal on
DEBUG>>set breakpoint pending on
DEBUG>>set print object on
DEBUG>>set width 0
DEBUG>>set height 0
DEBUG>>set print elements 200
DEBUG>>00000008-break-insert -f "/home/pi/myprod/cpptest/p13_servo/main.cpp:13"
DEBUG>>00000009-break-insert -f "/home/pi/myprod/cpptest/p13_servo/main.cpp:26"
DEBUG>>00000010-break-insert -f "/home/pi/myprod/cpptest/p13_servo/main.cpp:29"
DEBUG>>00000011-enable-pretty-printing
Debug session started successfully!
DEBUG>>00000012-exec-arguments 
DEBUG>>00000013-exec-run 
DEBUG>>00000014-exec-continue
DEBUG>>00000015-exec-continue
DEBUG>>00000016-exec-next
DEBUG>>00000017-exec-next
DEBUG>>00000018-exec-next
Pretty to see what the Debugger is doing but what's with my green debugger pointer :?:
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Raspberry Zero W: Running ok but Debugger with error

Post by DavidGH »

Still a problem for the Debugger with access to the sourcecode?
Perhaps.

Or it could be a timing issue (I get that myself sometimes). Does it help if you click the toolbar 'Show current line' tool, or 'Show cursor' in the Debugger menu?
Post Reply