DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

SBOMs are essential to circumventing software supply chain attacks, and they provide visibility into various software components.

Related

  • Introducing Graph Concepts in Java With Eclipse JNoSQL, Part 3: Understanding Janus
  • Introducing Graph Concepts in Java With Eclipse JNoSQL, Part 2: Understanding Neo4j
  • Introducing Graph Concepts in Java With Eclipse JNoSQL
  • Simplify NoSQL Database Integration in Java With Eclipse JNoSQL 1.1.3

Trending

  • When MySQL, PostgreSQL, and Oracle Argue: Doris JDBC Catalog Acts as the Peacemaker
  • Deploying LLMs Across Hybrid Cloud-Fog Topologies Using Progressive Model Pruning
  • Modernize Your IAM Into Identity Fabric Powered by Connectors
  • Parallel Data Conflict Resolution in Enterprise Workflows: Pessimistic vs. Optimistic Locking at Scale
  1. DZone
  2. Coding
  3. Frameworks
  4. Troubleshooting Tips: Failed Debugging With GDB

Troubleshooting Tips: Failed Debugging With GDB

Having problems with your GDB debugging in Eclipse? Here are some troubleshooting hints as to what's gone wrong and how to fix them.

By 
Erich Styger user avatar
Erich Styger
·
Feb. 12, 18 · Tutorial
Likes (5)
Comment
Save
Tweet
Share
8.5K Views

Join the DZone community and get the full member experience.

Join For Free

Three years ago, I published “Debugging Failure: Checklist and Hints” and unfortunately, that article is one of my most popular ones: Obviously, debugging problems are very common. Debugging with GDB usually works fine, but if things are failing, then it can be hard to find the cause for it. Recently, I was asked to check some failures, so here are two more hints about what could go wrong…

Error while launching command: arm-none-eabi-gdb --version

Error while launching command: arm-none-eabi-gdb –version

For this post, I’m assuming a cross-debugging environment with Eclipse, the Eclipse GDB client, and an external GDB server (see GDB Client and Server: Unlocking GDB) with the GNU MCU Eclipse plugins (although the behavior can be very similar for other combinations).

GDB Debugger Version

Debugger Console

Debugger console

As a diagnostic hint: Check the version of the debugger/GDB in the debugger console view. Verify that this version matches what you think you are using.

One common problem is that cygwin or other toolchains are installed and have changed the global system path — leading to the wrong toolchain and GDB being used. Mixing different GNU versions (compiler/debugger) is always a bad thing.

Error While Launching the Command: arm-none-eabi-gdb –version

Error while launching command: arm-none-eabi-gdb --version

Error while launching the command: arm-none-eabi-gdb –version

If you get that error, this basically means that the GDB has not been found and cannot be launched.

Check your global toolchain folder to see if the GDB executable really exists in that path. Below is the setting for the machine:

Global Toolchain Folder

Global toolchain folder

There is the possibility to overwrite the global setting with a setting for the workspace. I usually keep it empty (so it uses the global setting), but check that path as well:

Workspace Toolchain Path

Workspace toolchain path

Lastly, there is the setting for each project. If it is empty, then it uses the workspace setting. So check that project setting, too:

Project Toolchain Path

Project toolchain path

Also check in the debugger launch configuration to see if the settings are correct:

Debugger Launch Configuration

Debugger launch configuration

For the GDB client executable, you might consider directly pointing to the GDB executable to avoid any path search issues.

Global System Path Used in Eclipse

The other thing to check is the global system path used by Eclipse when it launches an executable. You can find this in the screenshot below in the workspace settings:

System Path in Eclipse Workspace Settings

System path in Eclipse workspace settings

With this, I hope you can find the problem. Otherwise, read the articles listed in the Links section below.

Happy debugging!

Links

  • Debugging Failure: Checklist and Hints
  • Troubleshooting Tips for FreeRTOS Thread Aware Debugging in Eclipse
  • Board Bring-Up Tips, GDB Logs, and Traces in Eclipse
  • Solving “Launching: Configuring GDB Aborting Configuring GDB”
Eclipse

Published at DZone with permission of Erich Styger, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Introducing Graph Concepts in Java With Eclipse JNoSQL, Part 3: Understanding Janus
  • Introducing Graph Concepts in Java With Eclipse JNoSQL, Part 2: Understanding Neo4j
  • Introducing Graph Concepts in Java With Eclipse JNoSQL
  • Simplify NoSQL Database Integration in Java With Eclipse JNoSQL 1.1.3

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • [email protected]

Let's be friends: