element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
Software Application Development How to install gdbserver ?
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Avnet Boards Forums to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 5 replies
  • Subscribers 312 subscribers
  • Views 588 views
  • Users 0 members are here
Related

How to install gdbserver ?

Former Member
Former Member over 11 years ago

Dear all,
I'm new in Embedded Linux programing, using ARM DS-5, following "ARM DSu20105 Tools and Avnet ZED Series #5 --Debug a Linux Application using DSu20105 and Avnet ZedBoard or MicroZed".
(http://www.zedboard.org/sites/default/files/design/Zynq_Debug_Online_v01.zip)



I tried to remote debug Hello World example on Zedboard, Linaro as filesystem (Ubuntu 12.11) but I don't know how to setup gdbserver.

  • Sign in to reply
  • Cancel
  • Former Member
    0 Former Member over 11 years ago

    Hi William,
      If you have selected the right debug configuration, DS-5 will launch a new instance of gdbserver (default port 5000) with the path to your application automatically.  You shouldn't have to configure it on your own.   What sort of error are you seeing?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago

    Thanks for reply.

    DS-5 shows some error messages in App Console.

    # cd "/tmp"
    # export LD_LIBRARY_PATH=".:$LD_LIBRARY_PATH"
    # gdbserver :5000 "./hello"
    Process ./hello created; pid = 2362
    Cannot exec ./hello: No such file or directory.

    Child exited with status 127
    No program to debug. GDBserver exiting.

    It seems the file had been downloaded with no problem, permission right too.

    -rwxr-xr-x 1 root root 2864 Nov 8 12:41 hello

    I tried to execute it directly.

    #./hello
    -bash: ./hello: No such file or directory

    Also tried on SpeedWay Linux too, it was downloaded and debug successfully.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to Former Member

    It seems like " No such file or directory" for an exisiting executable file issue.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to Former Member

    William,
      I think this might be an incompatibility issue between the distribution files used to build your program within DS-5, and the Ubuntu platform running on the target.  I don't think this has anything to do with gdbserver itself, which seems to be working correctly but cannot run the executable you built.  As you found out, you can't run it either from the command line, so there's no way gdbserver will be able to either.

    I'll track down a solution and post it here as soon as I have it.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago

    Sorry, this took me a while to figure out.

    I was able to recreate this problem, and I found that while the hello elf in the DS-5 distribution would not run on Ubuntu, if you compiled the same program natively on Ubuntu, it worked fine.  I used the command:

    readelf -a <filename>

    to examine the files, and I found that in the DS-5 version, it is looking for:

    [Requesting program interpreter: /lib/ld-linux.so.3]

    The same command on the working elf shows:

    [Requesting program interpreter: /lib/ld-linux-armhf.so.3]

    So I created a link to redirect the missing reference on the Ubuntu target as follows:

    sudo ln /lib/ld-linux-armhf.so.3  /lib/linux.so.3

    Once I did that, I found I could execute the DS-5 hello elf.   With that in place, I went back to DS-5 and was able to download, execute and debug the hello elf as usual. 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube