[Qt-creator] Remote GDB debugging.

Tim Hutt tdhutt at gmail.com
Wed Jun 18 12:12:48 CEST 2014


Oh wow I finally got it to work! The key was to use the initialisation
commands provided by Nordic (who make the nRF51822)!:

mon speed 10000

mon endian little

mon flash download = 1

mon flash device = NRF51822

mon reset 0


However, I have no discovered a segfault in QtCreator! It crashes
("qtcreator.exe has stopped working") if you do either of:


1. Manually pause program execution.

2. Add a breakpoint while the program is running.


If you add a breakpoint before starting the debug session, or while it is
stopped at a breakpoint, it works fine.


So close!


On 18 June 2014 10:58, Tim Hutt <tdhutt at gmail.com> wrote:

> The same files is generated in both cases though... If it's checking for
> the string "application" in the types list, I think that should just be
> removed. If it's seeing if the "last" build item is an "application", or if
> any of the explicitly specified types are "application", then I think that
> should be changed to search the entire build tree for the "application"
> node.
>
> Anyway...
>
> I forgot to mention that I also get this error when clicking the debug
> button:
>
> [image: Inline images 1]
>
> What is the "inferior"?
>
> I also tried using "break main.cpp:51" from the official Gnu ARM Embedded
> install (which is the one the chip maker recommend so I know it should
> work). It had the same effect as break-insert did from QtCreator... So
> maybe it's just that Eclipse (what they use) knows to use monitor setbp
> instead of break? Or maybe they tell gdb how break should behave?
>
> I can't really find anything on the web about this - might have to install
> Eclipse and see what commands it sends!
>
>
> On 18 June 2014 07:55, Tim Sander <tim at krieglstein.org> wrote:
>
>> Hi Tim
>> Am Dienstag, 17. Juni 2014, 16:52:24 schrieb Tim Hutt:
>> > Ohhhhh my gaaahd! Finally worked it out! :-)
>> > My fix is just to change the type to this:
>> >       type: ["application", "hex", "size"]
>> Well sounds plausible. Gdb uses an ELF file for debugging. Without that
>> there's
>> no file and nothing to run...
>>
>> > I haven't quite got the debugging to work yet - breakpoints are still
>> > set with break-insert rather than setbp, but at least it connects to
>> > the GDB server properly now, and monitor load, halt, go, and reset all
>> > work properly!
>> Well thats not your problem. I think that the segger debugger does not
>> properly support the load statement? So the code running is not the code
>> you
>> see and so no breakpoint gets hit.
>>
>> > mon setbp 0x00014626
>> Well, thats not the gdb way setting breakpoints and i know that the segger
>> also supports break-insert.
>>
>> Best regards
>> Tim
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20140618/2aef7595/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 20310 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20140618/2aef7595/attachment.png>


More information about the Qt-creator mailing list