Hi to all, I am new to Chibistudio and debugging its threads.
Now the thing is that when I use the debug window of chibistudio, it lists all the threads which are running as shown in this image.
And when I debug the same code using gdb commands, and for listing the threads it with info threads command, it shows only one thread and that too of name remote.
Want to know what thing is wrong here. why does it not showing all threads in case of gdb with correct names.????
Threads Debugging in GDB and Chibistudio
-
- Posts: 10
- Joined: Tue Jul 20, 2021 6:31 pm
- Has thanked: 1 time
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: Threads Debugging in GDB and Chibistudio
Hi,
Images are not showing, you need to attach them to the message.
Anyway, if you want to see threads in GDB then you need to start OpenOCD with the option for RTOSes, you need to look at the manual, I don't remember the details.
ChibiStudio uses a different method to look at threads, this is why it works.
Giovanni
Images are not showing, you need to attach them to the message.
Anyway, if you want to see threads in GDB then you need to start OpenOCD with the option for RTOSes, you need to look at the manual, I don't remember the details.
ChibiStudio uses a different method to look at threads, this is why it works.
Giovanni
-
- Posts: 10
- Joined: Tue Jul 20, 2021 6:31 pm
- Has thanked: 1 time
Re: Threads Debugging in GDB and Chibistudio
Here I have attached the images again
Yeah I am using GDB and Openocd both for debugging, I started the openocd session via Chibistudio only
like this and then just launching the gdb using Cygwin.
Am I putting some incorrect gdb commands to list threads????
Yeah I am using GDB and Openocd both for debugging, I started the openocd session via Chibistudio only
like this and then just launching the gdb using Cygwin.
Am I putting some incorrect gdb commands to list threads????
-
- Posts: 166
- Joined: Wed Jan 09, 2019 12:37 pm
- Has thanked: 19 times
- Been thanked: 31 times
Re: Threads Debugging in GDB and Chibistudio
For opeonocd I've added the following to the end of a copy of the target file:
Mike
Code: Select all
$_TARGETNAME configure -rtos ChibiOS
Mike
-
- Posts: 10
- Joined: Tue Jul 20, 2021 6:31 pm
- Has thanked: 1 time
Re: Threads Debugging in GDB and Chibistudio
Yeah, correct and I too have done and tried that.
So then when u connect to gdb via CLI and list the threads by info threads command, did it show u all the threads as it shows in chibistudio debug window.
So then when u connect to gdb via CLI and list the threads by info threads command, did it show u all the threads as it shows in chibistudio debug window.
Re: Threads Debugging in GDB and Chibistudio
Hi Kunal,
First, thanks for this discussion, I wasn't aware of this feature.
Second, I can verify that it works in gdb with simply "info threads" for me. I've added the aforementioned line to my openocd .cfg file. I connect gdb with "target ext :[myport]". I've also tested with "target remote :[myport]". I'm not even sure what the difference is between those two commands but they both worked for me.
I'm using openocd-0.10.0. This project I tested on was under ChibiOS_19.x.y because that's what I had lying around with threads to test. I'm using gdb 10.1.
If you can't get it working, you could try in the openocd IRC channel on libera chat. The main author is quite responsive and helpful.
First, thanks for this discussion, I wasn't aware of this feature.
Second, I can verify that it works in gdb with simply "info threads" for me. I've added the aforementioned line to my openocd .cfg file. I connect gdb with "target ext :[myport]". I've also tested with "target remote :[myport]". I'm not even sure what the difference is between those two commands but they both worked for me.
I'm using openocd-0.10.0. This project I tested on was under ChibiOS_19.x.y because that's what I had lying around with threads to test. I'm using gdb 10.1.
If you can't get it working, you could try in the openocd IRC channel on libera chat. The main author is quite responsive and helpful.
Who is online
Users browsing this forum: No registered users and 6 guests