Find the answer to your Linux question:
Results 1 to 2 of 2
I posted this question on qemu-forum but for some reason, the site no longer seems to load for me (on any computer or browser). I have installed qemu 0.14.1 on ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2011
    Posts
    1

    Qemu: Could not open gdbserver on device 'tcp::1234'


    I posted this question on qemu-forum but for some reason, the site no longer seems to load for me (on any computer or browser).

    I have installed qemu 0.14.1 on slackware to debug the linux-kernel. I am trying to connect with gdb to it through eclipse, but it just hangs. The commands I have tried are:

    Code:
        qemu -s -S -hda /dev/zero -kernel /home/jesse/build/linux-2.6.39/arch/x86/boot/bzImage
        qemu-system-x86_64 -s -S -hda /dev/zero -kernel /home/jesse/build/linux-2.6.39/arch/x86/boot/bzImage
    without -S the first one hangs due to the kernel being x86-64, but the second one works fine. Eclipse still will not connect.

    With -S, qemu pauses on startup (as expected), and if i press ctrl+alt+2, i can then enter commands. When I enter gdbserver, or gdbserver tcp::1234 i get the error "Could not open gdbserver on device 'tcp::1234'. I also haven't been able to find any qemu logs or anything. If anyone knows how I can view logs, let me know.

    I'm not sure what issue is causing gdbserver to fail to start. I am running Slackware 13.1 with a 64bit kernel in VirtualBox.
    Last edited by jjorloff1; 08-28-2011 at 02:32 AM. Reason: Added more detail to title

  2. #2
    Just Joined!
    Join Date
    Nov 2013
    Posts
    17
    Hi

    I believe the the command should be as follow on the target

    Code:
    gdbserver localhost:2345 myapp
    Where my myapp is the application that you want to run. Also note the use of single ":" rather than double "::".

    On the host machine you will issue the following command

    Code:
    target remote <target ip address>:<port>
    Where target ip address is the IP address of the target running gdbserver and port number is same as the one supplied to the gdbserver command.

    Hope that helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •