Remote debugging using KDevelop 3.0 (Gideon)

From: Roger Larsson (
Date: 12/18/03

  • Next message: Bill Zhao: "Re: ---Help me with the problem after port scanning"
    Date: Thu, 18 Dec 2003 20:13:59 GMT

    > Hi Roger,
    > I found your comment in the embedded linux newsgroup.
    > I have a PPC-Target and want to debug remote via Ethernet. When I use the
    > gdbserver on the target it works fine with DDD, but I don't know how to
    > kdevelop 3.0 to do that.
    > Can you help me please?

    I guess this can be of general interest...

    In project options (For C and C++ projects, should be there for others too -
    but... reported as bug) there is a tab named Debugger.

    There you have a group named Remote Debugging - it can be used for other
    purposes too...

    "Config gdb script" is not needed in this case.

    The goal of "Run shell script" is to start gdbserver (or an application with
    embedded gdbstub on the target). Key command here is:
            ssh ${ruser} gdbserver jeloin:2345 "${remote##/*/}"
    where jeloin:2345 is the host and a port. "${remote##/*/}" is magic for
    remote filename without (the host local) path.

    The goal of "Run gdb script" (gdb commands) is to connect with that target.
    Key command in this file is:
            target remote dox:2345
    where dox:2345 is the target with a port.

    (Note that the gdb script is run from the execution directory - often ./src
    not the projects base - see "Run options")

    So the remaining question is - when is the application downloaded to the
    It can be done as a part of the build process or with the "Run shell script"
    but only if it is fast (NFS mounted partition on host readable from

    Add this to
     all: hello.remote
     hello.remote: hello
            ../target/ hello

    I built the remote debugging capability using scripts since I know that the
    actual environment can vary a lot...


    Roger Larsson

  • Next message: Bill Zhao: "Re: ---Help me with the problem after port scanning"