Debug QT software running on Mini2440

bluscape
How can I debug my Qt software on the Mini2440 (while its actually running
on the Mini2440)?

I cant use an emulator because I have custom hardware attached to the
Mini2440 which must be included in the debug process.

Will I have to install Qt on the Mini2440 itself to accomplish this or is
there a different method?

Currently I'm either executing my Qt software from the SD card or over
ethernet.

Juergen Beisert
If you have a copy of your target's root filesystem on your host (which
includes the debug info at the host side), you can use a remote-debug
session on your Mini2440 while the debugger app is running on your host and
connected to the Mini2440 via network.

bluscape
Hi Juergen,

Thank, that sounds like it could be my solution
Do you know where I can find the Qt GDB file for the ARM (mini2440)
generated by PTX?

MC

bluscape
Currently I'm pointing to:

/opt/OSELAS.Toolchain-2011.03.0/arm-v4t-linux-gnueabi/gcc-4.5.2-glibc-2.13-binut
ils-2.21-kernel-2.6.36-sanitized/bin

Is this correct? Or should I point to the one in the target build?

Juergen Beisert
The host part of the compiler is located in the OSELAS.Toolchain. The
target part is in your local project if you enable it (and transferred it
to the target. I would recommend NFS root).

On the target then run:
mini2440> gdbserver <host-ip>:<port> <your-program-to-debug>

Then start the GDB on your host (from inside the BSP project):
 /opt/OSELAS.[...]/bin/arm-v4t-linux-gnueabi-gdbtui
                 platform-mini2440/root-debug/<your-program-to-debug>

Tell GDB where to search for the run-time debug info:

 (gdb) set solib-absolute-prefix platform-mini2440/root-debug

 (gdb) target remote <target-ip>:<port>

After that you can use all the known GDB commands.
Note: The debug info is not required at the target's side. But an exact
local copy with all debug info must be present at the host to make GDB
work.
That's why PTXdist provides you the 'root/' and the 'root-debug/'
directory. Both are exactly the same, but the 'root-debug/' still contains
all debug info. That's also why I recommend to use NFS root, to ensure the
binaries are always the same in both "worlds" (the target can still mount
'root/' as its root filesystem, because it does not need the debug info,
only GDB must be pointed to the 'root-debug' directory).

bluscape
I don't know. This old Qt creator is going to drive me insane. I'm busy
installing Ubuntu 12 with the new Qt creator. There seems to much more
information on creating a remote debug session using the new Qt creator.

bluscape
Yes, I'm running Mini2440 from NFS. So basically Mini2440 is actually
executed from the host over NFS. Then at the same time I do a remote debug
session also over ethernet.

This does not make sense.

Why would I want to run Mini2440 over NFS and then do remote debugging.

What I'm trying to say is, if the Mini2440 is already executed on the host
via NFS then there is no need to do remote debugging. I can then just do
local debugging since the Mini2440 will manipulate the files on the host
since it is being executed from the host.

Hope you get what I'm trying to say.

Juergen Beisert
NFS is for convinience only. When the code is running on the Mini2440 also
the debugger must be "present" on the Mini240. For example each breakpoint
must be set on the Mini2440 (in its local RAM), even if the code was loaded
via NFS from your host.