how to use gdbi386 in xp? - VxWorks

This is a discussion on how to use gdbi386 in xp? - VxWorks ; Hi, Now I want to debug my vxworks image use gdb. After I start up my vxworks in vmware. I go to dos and enter the command: target wtx target. It says "API_SERVER_NOT_FOUND". I don't know why? Any one can ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: how to use gdbi386 in xp?

  1. how to use gdbi386 in xp?

    Hi,
    Now I want to debug my vxworks image use gdb. After I start up my
    vxworks in vmware.
    I go to dos and enter the command: target wtx target.
    It says "API_SERVER_NOT_FOUND". I don't know why?
    Any one can help me? The process is as followning:

    D:\tornado\host\x86-win32\bin>gdbi86
    Copyright 1998 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and
    you are
    welcome to change it and/or distribute copies of it under certain
    conditions.
    Type "show copying" to see the conditions.
    There is absolutely no warranty for GDB. Type "show warranty" for
    details.


    +-------------------------------------------------------------------+
    | CrossWind 4.18 - Copyright (C) 1990-2002 Wind River Systems,
    Inc. |
    | This is a modified version of GDB by Wind River Systems,
    Inc. |

    +-------------------------------------------------------------------+

    This GDB was configured as "--host=i386-pc-mccwin32 --target=i386-wrs-
    vxworks5.5".
    (gdb) target wtx
    Argument required (target wtx [boot file]).
    (gdb) target wtx target
    Connecting to target server...
    Could not reach target: API_SERVER_NOT_FOUND

  2. Re: how to use gdbi386 in xp?

    On Jul 19, 8:12 pm, lje9292...@yahoo.com.cn wrote:
    > Hi,
    > Now I want to debug my vxworks image use gdb. After I start up my
    > vxworks in vmware.
    > I go to dos and enter the command: target wtx target.
    > It says "API_SERVER_NOT_FOUND". I don't know why?
    > Any one can help me? The process is as followning:
    >
    > D:\tornado\host\x86-win32\bin>gdbi86
    > Copyright 1998 Free Software Foundation, Inc.
    > GDB is free software, covered by the GNU General Public License, and
    > you are
    > welcome to change it and/or distribute copies of it under certain
    > conditions.
    > Type "show copying" to see the conditions.
    > There is absolutely no warranty for GDB. Type "show warranty" for
    > details.
    >
    > +-------------------------------------------------------------------+
    > | CrossWind 4.18 - Copyright (C) 1990-2002 Wind River Systems,
    > Inc. |
    > | This is a modified version of GDB by Wind River Systems,
    > Inc. |
    >
    > +-------------------------------------------------------------------+
    >
    > This GDB was configured as "--host=i386-pc-mccwin32 --target=i386-wrs-
    > vxworks5.5".
    > (gdb) target wtx
    > Argument required (target wtx [boot file]).
    > (gdb) target wtx target
    > Connecting to target server...
    > Could not reach target: API_SERVER_NOT_FOUND



    You've misunderstood how debugging works with VxWorks. You don't use
    gdb to connect to the target: you use it to connect to the target
    server, which in turn connects to the target.

    [WindSh shost shell]
    |
    v
    [target] <--- [target server (running on your Windows host)] <- [gdb
    debugger]
    ^
    |
    [other Tornado tool (spy, windview,
    etc...)]

    You need to use Tornado to launch the target server on your Windows
    host. The target server connects to the target using the WTX protocol
    and then you launch other tools which can talk to the target server.
    One of the advantages to this is that once you have an instance of the
    target server running on one Windows machine (or Solaris, or Linux),
    you can use the Tornado tools on any other machine to connect to it
    for debugging. This allows you to debug a target in a remote location.

    Note: I'm pretty sure you need a valid license key for the
    architecture you're trying to debug in order to run the target server.
    Since you're using VMware, this means you'll need an x86 license.

    In many cases, gdb and the target server are running on the same host
    system. In that case, the correct command is:

    (gdb) target wtx localhost

    It is the target server that connects to "target."

    -Bill

  3. Re: how to use gdbi386 in xp?

    On 7月22日, 上午1时00分, noiset...@gmail.com wrote:
    > On Jul 19, 8:12 pm, lje9292...@yahoo.com.cn wrote:
    >
    >
    >
    > > Hi,
    > > Now I want to debug my vxworks image use gdb. After I start up my
    > > vxworks in vmware.
    > > I go to dos and enter the command: target wtx target.
    > > It says "API_SERVER_NOT_FOUND". I don't know why?
    > > Any one can help me? The process is as followning:

    >
    > > D:\tornado\host\x86-win32\bin>gdbi86
    > > Copyright 1998 Free Software Foundation, Inc.
    > > GDB is free software, covered by the GNU General Public License, and
    > > you are
    > > welcome to change it and/or distribute copies of it under certain
    > > conditions.
    > > Type "show copying" to see the conditions.
    > > There is absolutely no warranty for GDB. Type "show warranty" for
    > > details.

    >
    > > +-------------------------------------------------------------------+
    > > | CrossWind 4.18 - Copyright (C) 1990-2002 Wind River Systems,
    > > Inc. |
    > > | This is a modified version of GDB by Wind River Systems,
    > > Inc. |

    >
    > > +-------------------------------------------------------------------+

    >
    > > This GDB was configured as "--host=i386-pc-mccwin32 --target=i386-wrs-
    > > vxworks5.5".
    > > (gdb) target wtx
    > > Argument required (target wtx [boot file]).
    > > (gdb) target wtx target
    > > Connecting to target server...
    > > Could not reach target: API_SERVER_NOT_FOUND

    >
    > You've misunderstood how debugging works with VxWorks. You don't use
    > gdb to connect to the target: you use it to connect to the target
    > server, which in turn connects to the target.
    >
    > [WindSh shost shell]
    > |
    > v
    > [target] <--- [target server (running on your Windows host)] <- [gdb
    > debugger]
    > ^
    > |
    > [other Tornado tool (spy, windview,
    > etc...)]
    >
    > You need to use Tornado to launch the target server on your Windows
    > host. The target server connects to the target using the WTX protocol
    > and then you launch other tools which can talk to the target server.
    > One of the advantages to this is that once you have an instance of the
    > target server running on one Windows machine (or Solaris, or Linux),
    > you can use the Tornado tools on any other machine to connect to it
    > for debugging. This allows you to debug a target in a remote location.
    >
    > Note: I'm pretty sure you need a valid license key for the
    > architecture you're trying to debug in order to run the target server.
    > Since you're using VMware, this means you'll need an x86 license.
    >
    > In many cases, gdb and the target server are running on the same host
    > system. In that case, the correct command is:
    >
    > (gdb) target wtx localhost
    >
    > It is the target server that connects to "target."
    >
    > -Bill


    Thanks a lot for your replies.
    I use target wtx 172.19.0.29 after launching the targetserver. It
    succedd. I am very appreciating of you.
    I have one more question. Is it right to process as following, or may
    I choose the right entry when I debug the vxworks image?
    Any suggestion will be welcom!
    Here is my following process:

    D:\tornado\host\x86-win32\bin>gdbi86
    GNU gdb 4.18-moto-1.7
    Copyright 1998 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and
    you are
    welcome to change it and/or distribute copies of it under certain
    conditions.
    Type "show copying" to see the conditions.
    There is absolutely no warranty for GDB. Type "show warranty" for
    details.


    +-------------------------------------------------------------------+
    | CrossWind 4.18 - Copyright (C) 1990-2002 Wind River Systems,
    Inc. |
    | This is a modified version of GDB by Wind River Systems,
    Inc. |

    +-------------------------------------------------------------------+

    This GDB was configured as "--host=i386-pc-mccwin32 --target=i386-wrs-
    vxworks5.5".
    (gdb) target wtx 172.19.0.29
    Connecting to target server...

    C++ Constructors/Destructors Strategy is AUTOMATIC

    Connected to 172.19.0.29@NWPU_LIUJE
    Attached to target server 172.19.0.29@NWPU_LIUJE, CPU is PENTIUM.
    Warning: D:\tornado\host\x86-win32\bin\D:: No such file or directory.
    Looking for all loaded modules:
    D:/vxWorks: ok
    Done.
    (gdb) b usrRoot
    Breakpoint 1 at 0x316676: file d:\tornado\target\proj
    \Vxworks2\prjConfig.c, line 499.
    (gdb) b romSart
    Function "romSart" not defined.
    (gdb) r usrRoot
    Starting program: usrRoot

    Breakpoint 1, usrRoot (pMemPoolStart=0x0, memPoolSize=0) at ..
    \prjConfig.c:499
    499 usrKernelCoreInit (); /* core kernel
    facilities */
    (gdb) s
    usrKernelCoreInit () at ..\prjConfig.c:410
    410 eventLibInit (); /* VxWorks events */
    (gdb) s
    411 semBLibInit (); /* binary semaphores
    */
    (gdb)
    ................

  4. Re: how to use gdbi386 in xp?

    On Jul 21, 8:57 pm, lje9292...@yahoo.com.cn wrote:
    > On 7月22日, 上午1时00分, noiset...@gmail.com wrote:
    >
    >
    >
    > > On Jul 19, 8:12 pm, lje9292...@yahoo.com.cn wrote:

    >
    > > > Hi,
    > > > Now I want to debug my vxworks image use gdb. After I start up my
    > > > vxworks in vmware.
    > > > I go to dos and enter the command: target wtx target.
    > > > It says "API_SERVER_NOT_FOUND". I don't know why?
    > > > Any one can help me? The process is as followning:

    >
    > > > D:\tornado\host\x86-win32\bin>gdbi86
    > > > Copyright 1998 Free Software Foundation, Inc.
    > > > GDB is free software, covered by the GNU General Public License, and
    > > > you are
    > > > welcome to change it and/or distribute copies of it under certain
    > > > conditions.
    > > > Type "show copying" to see the conditions.
    > > > There is absolutely no warranty for GDB. Type "show warranty" for
    > > > details.

    >
    > > > +-------------------------------------------------------------------+
    > > > | CrossWind 4.18 - Copyright (C) 1990-2002 Wind River Systems,
    > > > Inc. |
    > > > | This is a modified version of GDB by Wind River Systems,
    > > > Inc. |

    >
    > > > +-------------------------------------------------------------------+

    >
    > > > This GDB was configured as "--host=i386-pc-mccwin32 --target=i386-wrs-
    > > > vxworks5.5".
    > > > (gdb) target wtx
    > > > Argument required (target wtx [boot file]).
    > > > (gdb) target wtx target
    > > > Connecting to target server...
    > > > Could not reach target: API_SERVER_NOT_FOUND

    >
    > > You've misunderstood how debugging works with VxWorks. You don't use
    > > gdb to connect to the target: you use it to connect to the target
    > > server, which in turn connects to the target.

    >
    > > [WindSh shost shell]
    > > |
    > > v
    > > [target] <--- [target server (running on your Windows host)] <- [gdb
    > > debugger]
    > > ^
    > > |
    > > [other Tornado tool (spy, windview,
    > > etc...)]

    >
    > > You need to use Tornado to launch the target server on your Windows
    > > host. The target server connects to the target using the WTX protocol
    > > and then you launch other tools which can talk to the target server.
    > > One of the advantages to this is that once you have an instance of the
    > > target server running on one Windows machine (or Solaris, or Linux),
    > > you can use the Tornado tools on any other machine to connect to it
    > > for debugging. This allows you to debug a target in a remote location.

    >
    > > Note: I'm pretty sure you need a valid license key for the
    > > architecture you're trying to debug in order to run the target server.
    > > Since you're using VMware, this means you'll need an x86 license.

    >
    > > In many cases, gdb and the target server are running on the same host
    > > system. In that case, the correct command is:

    >
    > > (gdb) target wtx localhost

    >
    > > It is the target server that connects to "target."

    >
    > > -Bill

    >
    > Thanks a lot for your replies.
    > I use target wtx 172.19.0.29 after launching the targetserver. It
    > succedd. I am very appreciating of you.
    > I have one more question. Is it right to process as following, or may
    > I choose the right entry when I debug the vxworks image?
    > Any suggestion will be welcom!
    > Here is my following process:
    >
    > D:\tornado\host\x86-win32\bin>gdbi86
    > GNU gdb 4.18-moto-1.7
    > Copyright 1998 Free Software Foundation, Inc.
    > GDB is free software, covered by the GNU General Public License, and
    > you are
    > welcome to change it and/or distribute copies of it under certain
    > conditions.
    > Type "show copying" to see the conditions.
    > There is absolutely no warranty for GDB. Type "show warranty" for
    > details.
    >
    > +-------------------------------------------------------------------+
    > | CrossWind 4.18 - Copyright (C) 1990-2002 Wind River Systems,
    > Inc. |
    > | This is a modified version of GDB by Wind River Systems,
    > Inc. |
    >
    > +-------------------------------------------------------------------+
    >
    > This GDB was configured as "--host=i386-pc-mccwin32 --target=i386-wrs-
    > vxworks5.5".
    > (gdb) target wtx 172.19.0.29
    > Connecting to target server...
    >
    > C++ Constructors/Destructors Strategy is AUTOMATIC
    >
    > Connected to 172.19.0.29@NWPU_LIUJE
    > Attached to target server 172.19.0.29@NWPU_LIUJE, CPU is PENTIUM.
    > Warning: D:\tornado\host\x86-win32\bin\D:: No such file or directory.
    > Looking for all loaded modules:
    > D:/vxWorks: ok
    > Done.
    > (gdb) b usrRoot
    > Breakpoint 1 at 0x316676: file d:\tornado\target\proj
    > \Vxworks2\prjConfig.c, line 499.
    > (gdb) b romSart
    > Function "romSart" not defined.
    > (gdb) r usrRoot
    > Starting program: usrRoot
    >
    > Breakpoint 1, usrRoot (pMemPoolStart=0x0, memPoolSize=0) at ..
    > \prjConfig.c:499
    > 499 usrKernelCoreInit (); /* core kernel
    > facilities */
    > (gdb) s
    > usrKernelCoreInit () at ..\prjConfig.c:410
    > 410 eventLibInit (); /* VxWorks events */
    > (gdb) s
    > 411 semBLibInit (); /* binary semaphores
    > */
    > (gdb)
    > ................



    If I understand correctly, it looks like you want to debug some of the
    VxWorks bootstrap code (romStart(), usrRoot()). Unfortunately, you
    can't really do this using gdb. Gdb (via the target server) talks to
    the WDB agent task on the target over TCP/IP networking (or,
    optionally, via serial port). The problem is, the WDB agent task must
    be running before you can connect to it, and the task doesn't start
    until most of the system bootstrap has finished. And you can't call
    usrRoot() a second time after the system has already booted.

    Typically, debugging bootstrap code is very tricky unless you have
    either hardware debug tools (such as the Wind River Probe or Wind
    River ICE) or a software simulator which allows debugging. There is no
    Wind River Probe/ICE support for x86 however, only PPC, Coldfire, MIPS
    and ARM. (I think this is because it's very hard to find x86 boards
    with JTAG/debug ports.)

    I've never used VMware, so I don't know if it allows debugging (that
    is, if you can stop or singlestep the simulated CPU and inspect
    memory). I do know however that the open source QEMU simulator will
    run VxWorks and it supports debugging, including remote GDB. You might
    want to look into this.

    -Bill

  5. Re: how to use gdbi386 in xp?

    On 7月24日, 上午8时24分, noiset...@gmail.com wrote:
    > On Jul 21, 8:57 pm, lje9292...@yahoo.com.cn wrote:
    >
    >
    >
    >
    >
    >
    >
    > > On 7月22日, 上午1时00分, noiset...@gmail.com wrote:

    >
    > > > On Jul 19, 8:12 pm, lje9292...@yahoo.com.cn wrote:

    >
    > > > > Hi,
    > > > > Now I want to debug my vxworks image use gdb. After I start up my
    > > > > vxworks in vmware.
    > > > > I go to dos and enter the command: target wtx target.
    > > > > It says "API_SERVER_NOT_FOUND". I don't know why?
    > > > > Any one can help me? The process is as followning:

    >
    > > > > D:\tornado\host\x86-win32\bin>gdbi86
    > > > > Copyright 1998 Free Software Foundation, Inc.
    > > > > GDB is free software, covered by the GNU General Public License, and
    > > > > you are
    > > > > welcome to change it and/or distribute copies of it under certain
    > > > > conditions.
    > > > > Type "show copying" to see the conditions.
    > > > > There is absolutely no warranty for GDB. Type "show warranty" for
    > > > > details.

    >
    > > > > +-------------------------------------------------------------------+
    > > > > | CrossWind 4.18 - Copyright (C) 1990-2002 Wind River Systems,
    > > > > Inc. |
    > > > > | This is a modified version of GDB by Wind River Systems,
    > > > > Inc. |

    >
    > > > > +-------------------------------------------------------------------+

    >
    > > > > This GDB was configured as "--host=i386-pc-mccwin32 --target=i386-wrs-
    > > > > vxworks5.5".
    > > > > (gdb) target wtx
    > > > > Argument required (target wtx [boot file]).
    > > > > (gdb) target wtx target
    > > > > Connecting to target server...
    > > > > Could not reach target: API_SERVER_NOT_FOUND

    >
    > > > You've misunderstood how debugging works with VxWorks. You don't use
    > > > gdb to connect to the target: you use it to connect to the target
    > > > server, which in turn connects to the target.

    >
    > > > [WindSh shost shell]
    > > > |
    > > > v
    > > > [target] <--- [target server (running on your Windows host)] <- [gdb
    > > > debugger]
    > > > ^
    > > > |
    > > > [other Tornado tool (spy, windview,
    > > > etc...)]

    >
    > > > You need to use Tornado to launch the target server on your Windows
    > > > host. The target server connects to the target using the WTX protocol
    > > > and then you launch other tools which can talk to the target server.
    > > > One of the advantages to this is that once you have an instance of the
    > > > target server running on one Windows machine (or Solaris, or Linux),
    > > > you can use the Tornado tools on any other machine to connect to it
    > > > for debugging. This allows you to debug a target in a remote location..

    >
    > > > Note: I'm pretty sure you need a valid license key for the
    > > > architecture you're trying to debug in order to run the target server..
    > > > Since you're using VMware, this means you'll need an x86 license.

    >
    > > > In many cases, gdb and the target server are running on the same host
    > > > system. In that case, the correct command is:

    >
    > > > (gdb) target wtx localhost

    >
    > > > It is the target server that connects to "target."

    >
    > > > -Bill

    >
    > > Thanks a lot for your replies.
    > > I use target wtx 172.19.0.29 after launching the targetserver. It
    > > succedd. I am very appreciating of you.
    > > I have one more question. Is it right to process as following, or may
    > > I choose the right entry when I debug the vxworks image?
    > > Any suggestion will be welcom!
    > > Here is my following process:

    >
    > > D:\tornado\host\x86-win32\bin>gdbi86
    > > GNU gdb 4.18-moto-1.7
    > > Copyright 1998 Free Software Foundation, Inc.
    > > GDB is free software, covered by the GNU General Public License, and
    > > you are
    > > welcome to change it and/or distribute copies of it under certain
    > > conditions.
    > > Type "show copying" to see the conditions.
    > > There is absolutely no warranty for GDB. Type "show warranty" for
    > > details.

    >
    > > +-------------------------------------------------------------------+
    > > | CrossWind 4.18 - Copyright (C) 1990-2002 Wind River Systems,
    > > Inc. |
    > > | This is a modified version of GDB by Wind River Systems,
    > > Inc. |

    >
    > > +-------------------------------------------------------------------+

    >
    > > This GDB was configured as "--host=i386-pc-mccwin32 --target=i386-wrs-
    > > vxworks5.5".
    > > (gdb) target wtx 172.19.0.29
    > > Connecting to target server...

    >
    > > C++ Constructors/Destructors Strategy is AUTOMATIC

    >
    > > Connected to 172.19.0.29@NWPU_LIUJE
    > > Attached to target server 172.19.0.29@NWPU_LIUJE, CPU is PENTIUM.
    > > Warning: D:\tornado\host\x86-win32\bin\D:: No such file or directory.
    > > Looking for all loaded modules:
    > > D:/vxWorks: ok
    > > Done.
    > > (gdb) b usrRoot
    > > Breakpoint 1 at 0x316676: file d:\tornado\target\proj
    > > \Vxworks2\prjConfig.c, line 499.
    > > (gdb) b romSart
    > > Function "romSart" not defined.
    > > (gdb) r usrRoot
    > > Starting program: usrRoot

    >
    > > Breakpoint 1, usrRoot (pMemPoolStart=0x0, memPoolSize=0) at ..
    > > \prjConfig.c:499
    > > 499 usrKernelCoreInit (); /* core kernel
    > > facilities */
    > > (gdb) s
    > > usrKernelCoreInit () at ..\prjConfig.c:410
    > > 410 eventLibInit (); /* VxWorks events */
    > > (gdb) s
    > > 411 semBLibInit (); /* binary semaphores
    > > */
    > > (gdb)
    > > ................

    >
    > If I understand correctly, it looks like you want to debug some of the
    > VxWorks bootstrap code (romStart(), usrRoot()). Unfortunately, you
    > can't really do this using gdb. Gdb (via the target server) talks to
    > the WDB agent task on the target over TCP/IP networking (or,
    > optionally, via serial port). The problem is, the WDB agent task must
    > be running before you can connect to it, and the task doesn't start
    > until most of the system bootstrap has finished. And you can't call
    > usrRoot() a second time after the system has already booted.
    >
    > Typically, debugging bootstrap code is very tricky unless you have
    > either hardware debug tools (such as the Wind River Probe or Wind
    > River ICE) or a software simulator which allows debugging. There is no
    > Wind River Probe/ICE support for x86 however, only PPC, Coldfire, MIPS
    > and ARM. (I think this is because it's very hard to find x86 boards
    > with JTAG/debug ports.)
    >
    > I've never used VMware, so I don't know if it allows debugging (that
    > is, if you can stop or singlestep the simulated CPU and inspect
    > memory). I do know however that the open source QEMU simulator will
    > run VxWorks and it supports debugging, including remote GDB. You might
    > want to look into this.
    >
    > -Bill


    Hi, I know what you mean! Thank you for your reply!
    I just want to study the startup process of the vxworks system
    detaily.
    From you I know that I must have some tools for doing my trace on
    vxworks.
    Such as, Wind River Probe/ICE. But I havn't, and it doesn't matter.
    Yes, thank you again!

+ Reply to Thread