Remote target development

In KB article 10140, they discuss how to do remote target debugging with
ddd. In it there are about a million steps that need to be done before you
can execute a single line of code on the target. Is this how most
developers out there debug? It seems like an awful lot of stuff to do. I
would think that between using Qnet and ddd, you could have your source and
executable on the host system and debug it on the target without actually
copying the files to the target. Is this possible?

jb

Hi

Thats exactly what I’m doing - it sounds like there is loads to do to get it
set up but if you incorporate it into a script called .gdbinit
and start ddd from the directory that the script is in, it’ll all happen
automatically on startup :

Heres an example (bearing in mind that i’m using nfs rather than qnet as my
code is on a novell server)

###########################################################################

debug startup script for gdb debugging on target over the ethernet

By: Jim Atkins Date:10.11.2000

###########################################################################
set input-radix 0x10 # these just set variable input/display to
default to hex rather than decimal which is default and annoying
set output-radix 0x10
target qnx qnx_target1:8000 # where qnx_target is the ip address of your
target
set qnxinheritenv 1
sym ./DbgTatuSysMgr # path to symbol info (this path is from ddd’s
viewpoint)
run /novell/Software/TATU_System_Manager/DbgTatuSysMgr # path to the
executable (bearing inmind this is from the targets viewpoint)
break main
cont

and thats all there is to it . When you run ddd the debugger should simply
stop at the breakpoint at main().

Ah - of course you WILL need to have started pdebug 8000& on your target
though…


Happy remote debugging :slight_smile:


note: one thing i have noticed which is anoying is that if you cont without
a breakpoint set to hit then you can’t ‘interrupt’ or halt the code - on my
target I have to quit ddd to stop the code and then restart. Hopefully this
is being addressed somewhere…

Ah - of course you WILL need to have started pdebug 8000& on your target
though…

You should also make sure that you have devc-pty running as well.


note: one thing i have noticed which is anoying is that if you cont without
a breakpoint set to hit then you can’t ‘interrupt’ or halt the code - on my
target I have to quit ddd to stop the code and then restart. Hopefully this
is being addressed somewhere…

This was a bug in devc-pty. It has been fixed in Patch A. :slight_smile:


cburgess@qnx.com

Jim Atkins <jamesa@tsd.serco.com> wrote:

and thats all there is to it . When you run ddd the debugger should simply
stop at the breakpoint at main().

Ah - of course you WILL need to have started pdebug 8000& on your target
though…

Not if you get inetd to start pdebug on the target for you.
explained in “Building Embedded Systems”, ‘TCP/IP dynamic port
connection’ (page 42).