LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-28-2008, 08:19 AM   #1
rahulthewall3000
Member
 
Registered: Jan 2008
Location: Bremen
Distribution: Gentoo
Posts: 33

Rep: Reputation: 15
Trying to get gdbserver to connect


My problem is that I have a virtual ARM platform to which I ported the Linux Kernel. Then I created a filesystem using MontaVista tools and packaged it with the necessary software.
What I want to do is debug applications on the target machine from the host machine. The only solution that I could find for this was gdbserver.
But, I cannot connect to my virtual machine.

First of all, here are my network configurations.

*Host Machine*
Code:
bash-3.00$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:13:D4:03:95:80
          inet addr:192.168.10.78  Bcast:192.168.10.255  Mask:255.255.255.0
          inet6 addr: fe80::213:d4ff:fe03:9580/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:68244461 errors:407 dropped:0 overruns:0 frame:0
          TX packets:86167715 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:651299170 (621.1 MiB)  TX bytes:31556850 (30.0 MiB)
          Interrupt:5 Base address:0xa000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:164464503 errors:0 dropped:0 overruns:0 frame:0
          TX packets:164464503 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:845988992 (806.7 MiB)  TX bytes:845988992 (806.7 MiB)
*Virtual Platform*
Code:
# ifconfig 
eth0      Link encap:Ethernet  HWaddr 52:54:00:12:34:56  
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1180 (1.1 KiB)  TX bytes:1180 (1.1 KiB)
          Interrupt:25 Base address:0x2000 DMA chan:ff 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
Now, I fire up gdbserver on the target machine using this command:
Code:
gdbserver host:2345 ./fun
Then I try to connect to the virtual platform from the host machine.
Code:
target remote :2345
I do this after redirecting the port 2345 to communicate with the port 2345 of the virtual platform.

What I get as error is this:
Code:
(gdb) target remote :2345
Remote debugging using :2345
Ignoring packet error, continuing...
warning: unrecognized item "timeout" in "qSupported" response
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Malformed response to offset query, timeout
If anybody can explain as to what is going wrong, I would be really grateful.

Thanks
Rahul
 
Old 07-28-2008, 08:32 AM   #2
rahulthewall3000
Member
 
Registered: Jan 2008
Location: Bremen
Distribution: Gentoo
Posts: 33

Original Poster
Rep: Reputation: 15
Also, it seems that my virtual machine is inaccessible via the host machine.
Code:
bash-3.00$ ping 10.0.2.15
PING 10.0.2.15 (10.0.2.15) 56(84) bytes of data.
From 87.234.11.217 icmp_seq=6 Destination Net Unreachable
From 87.234.11.217 icmp_seq=7 Destination Net Unreachable
From 87.234.11.217 icmp_seq=16 Destination Net Unreachable

--- 10.0.2.15 ping statistics ---
18 packets transmitted, 0 received, +3 errors, 100% packet loss, time 16998ms, pipe 2
 
Old 08-20-2008, 04:45 AM   #3
rahulthewall3000
Member
 
Registered: Jan 2008
Location: Bremen
Distribution: Gentoo
Posts: 33

Original Poster
Rep: Reputation: 15
The problem was with the ethernet controller, and not with gdbserver. Solved.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
need source code for gdbserver sekhar Linux - Software 1 06-06-2007 01:20 AM
gdbserver problem - multithread tashtego Programming 2 03-26-2007 07:27 AM
any gdbserver tutorial or documents? George2 Programming 0 07-18-2006 05:15 AM
gdbserver problem: no symbol table whepin Linux - Laptop and Netbook 0 06-24-2005 09:48 PM
what 's the difference between gdbserver and debugging stub? linuxpion Linux - General 0 03-06-2004 11:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration