Page 1 of 1

Cross debugging, how to add a new debugger comfiguration.

Posted: Thu May 28, 2015 7:51 pm
by leonardosalvatore
Hi All,
doing a ARM project in a cross compilation environment.
I'm not able to get the remote debugging running with the current toolchain.
It works with QTCreator but I would like to use this amazing IDE!

So, as I'm able to create a new Compiler setting (setting my cross compilation toolchaing) the IDE doesn't allow to create a new debugger.
It stick on "GNU gdb debugger'.

Thanks in advance for any guidance.
BR.
Leonardo

Re: Cross debugging, how to add a new debugger comfiguration

Posted: Fri May 29, 2015 12:54 am
by Gibbon1
The only help I have is,

From the workspace tab, right clock on the project -> settings... (bottom of the menu)
Expand Common Settings->debugger

Select the debugger path and also check the use remote debugging box.

Last time I tried using this it worked okay, but the ARM Cortex M0+ only allows two hardware break points when running out of flash. So I don't use it much (but that's me). It's probably possible to do some magic with the linker .ld file and the startup routines to copy code you want to debug into RAM and then I suspect gdb will happily set as many break points as you want.

Definitely might want to debug the tool chain using gdb from the command line first so you know what works. Which processor and tool chain and ICE are you using?

As an aside it seems to me that there are three debugging cases.

1. Debugging a program on a local machine using GDB. This is the typical case and works fine.

2. Debugging a program on a remote machine with an OS running GDB Server on the remote machine. This would be say debugging a remote program on say a Raspberry Pi or other embedded Linux computer. Or perhaps debugging a program on a slice running in the cloud somewhere. I've never done this. (I tried but I'm often full of fail with a day job)

3. Debugging a bare metal program on an embedded processor and running GDB and GDB Server (or openOCD) on the local machine. This didn't work well for a long time, but last summer someone submitted some patches to fix a few issues.

I think with scenario's #2 and #3 there are some subtle differences in how GDB interacts with the server and how the server interacts with the target machine that are incompatible. I think sicne last summer #3 is supported okay.

Re: Cross debugging, how to add a new debugger comfiguration

Posted: Fri May 29, 2015 11:18 am
by leonardosalvatore
I did it.
It works creating a Codelite C++ project, but I'm working on a custom build make project.
Now I'm trying to understand different settings,symbol path etc...
Anyway, thanks for your feedback.

Re: Cross debugging, how to add a new debugger comfiguration

Posted: Fri May 29, 2015 12:49 pm
by Gibbon1
Not sure I think I remember having some issues with my build settings putting the executable where codelite expects it. I think the issue was me overriding the default via the linker command line.

Re: Cross debugging, how to add a new debugger comfiguration

Posted: Fri May 29, 2015 2:06 pm
by leonardosalvatore
Solved, it was related to the debugging symbols.
In a custom build project you still need to set the the Intermediate Folder in Project->settings->Common Settings->General