[Qt-creator] Remote GDB debugging.

Poenitz Andre Andre.Poenitz at digia.com
Tue Jun 17 18:21:25 CEST 2014


Tim Hutt:
> 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!

Of course Creator uses '-break-insert' when talking to the GDB _client_.

> For the breakpoints:, when I create a breakpoint in QtCreator it does this:
>  <41-break-insert  -f "\"main.cpp\":51"
> 
> dBREAKPOINTS ARE NOT FULLY SYNCHRONIZED [...]
>
> >41^done,bkpt={number="5",type="breakpoint",disp="keep",enabled="y",addr="0x000146ae",
> func="serialTest()",file="C:/Users/thutt/Docs/Bike/Vector Host/main.cpp",
> fullname="C:\\Users\\thutt\\Docs\\Bike\\Vector Host\\main.cpp",line="51",
> thread-groups=["i1"],times="0",original-location="main.cpp:51"}
>
> ATTEMPT BREAKPOINT SYNCHRONIZATION
> BREAKPOINTS ARE SYNCHRONIZED

Read "It's all fine now as far as Creator is concerned".

It's the job of the GDB client to translate the break points to
addresses and make sure they are inserted (and removed)
by talking to the server (or whatever plays GDB server here)
at the right times.

> And the GDB server window says:
> Read 2 bytes @ address 0x000148DC (Data = 0x1C20)
> Read 2 bytes @ address 0x000148DE (Data = 0x1D26)

This could be the first step of inserting a breakpoint 
(making a back up of the code at the breakpoint location)

(GDB usually has a 'set debug remote ...' switch to make the 
communication more verbose)

> But the breakpoint doesn't work.
> When I manually run this in the gdb window in QtCreator (example address):
> 
> mon setbp 0x00014626
>
> It says this in the GDB server:
> Setting breakpoint @ address 0x00014626, Size = 4, BPHandle = 0x0001

Try to find out what packages are actually sent.

Andre'


More information about the Qt-creator mailing list