Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Debug options greyed out(No options to control debug process via icons/shortcuts)
Debug options greyed out [message #1398080] Thu, 10 July 2014 15:26 Go to next message
Wojciech Domski is currently offline Wojciech DomskiFriend
Messages: 5
Registered: July 2014
Junior Member
I have encountered a problem with debugging in eclipse.

First things first. I have installed a standard edition of Eclipse Luna. After that I added CDT package to it. Moreover I have installed gnu arm plugin for eclipse to write for ARMs. I am using gdb from GNU ARM toolchain if that matters.

If I start debugging my program I switch to debug perspective but then I am unable to do anything. The icons along with shortcuts do not work. The functionality I am missing is like reset, step, next.

What I can do is setting breakpoints and removing them by double click on certain line of code and terminate debug with tiny red square. What is more, in the console of gdb which integrates with eclipse during debugging I can write all the commands and in the result control the flow of the program. However, it is not very convenient. I have tried to reset the debug perspective but it did not help.
Re: Debug options greyed out [message #1398143 is a reply to message #1398080] Thu, 10 July 2014 17:40 Go to previous messageGo to next message
Marc Khouzam is currently offline Marc KhouzamFriend
Messages: 357
Registered: July 2009
Senior Member
Make sure a stack frame is selected in the Debug view. If there is not stack frame because the program is running, then select a thread and you should be able to interrupt it using the interrupt button (the pause button). When interrupted a stack frame should appear and it should be selected. This should work after that.

Marc
Re: Debug options greyed out [message #1399807 is a reply to message #1398143] Sun, 13 July 2014 07:09 Go to previous messageGo to next message
Wojciech Domski is currently offline Wojciech DomskiFriend
Messages: 5
Registered: July 2014
Junior Member
Inside Debug View I have tried to select all the items in it without any result. In my case, I think that I can not select a thread to debug because of the program characteristics (debugging external device). As I wrote before maybe the reason that the debug options are greyed out is that I have installed GNU ARM plugin?

Is it possible that the version of gdb I am using is unable to connect with the eclipse?
Re: Debug options greyed out [message #1400569 is a reply to message #1399807] Mon, 14 July 2014 11:56 Go to previous messageGo to next message
Marc Khouzam is currently offline Marc KhouzamFriend
Messages: 357
Registered: July 2009
Senior Member
I'm not involved with the GNU ARM plugin and it sounds like you are right and it is an issue with that plugin.

Marc
Re: Debug options greyed out [message #1400809 is a reply to message #1400569] Mon, 14 July 2014 18:53 Go to previous messageGo to next message
Wojciech Domski is currently offline Wojciech DomskiFriend
Messages: 5
Registered: July 2014
Junior Member
Today I've given it another shoot and it worked. It is a bit weird because I have tried to reboot eclipse hoping that it will solve the problem - it sometimes does. Nothing before happened, however.
Re: Debug options greyed out [message #1404681 is a reply to message #1400809] Tue, 05 August 2014 04:42 Go to previous messageGo to next message
Trescott Jensen is currently offline Trescott JensenFriend
Messages: 4
Registered: August 2014
Junior Member
I am also having the same problem. I'm also using the GNU ARM toolchain and the J-Link debugger. When I start a debugging session, all access to the standard debugging controls(resume, step, etc.) by any route(toolbar, shortcuts, etc.) are unavailable. The program breaks automatically at the "main" function. I have confirmed that the stack frame is selected in the debug view. But unlike Wojciech, it has not disappeared for me.

If this is a bug in the plugin, maybe there is tweak I could make to it to fix it. I'm thinking there is a event listener that didn't get registered with a debugging event. Any thoughts on where I should look? I have never done anything with the inner workings of eclipse.

Any Ideas?
Re: Debug options greyed out [message #1404910 is a reply to message #1398080] Wed, 06 August 2014 06:05 Go to previous messageGo to next message
Wojciech Domski is currently offline Wojciech DomskiFriend
Messages: 5
Registered: July 2014
Junior Member
Unfortunately, I can't help you. In my case it just started working for the next day. I suppose that there are some temporary files or something of that kind which got refreshed. However, this shouldn't be happening.
Re: Debug options greyed out [message #1405236 is a reply to message #1404910] Wed, 06 August 2014 22:48 Go to previous messageGo to next message
Trescott Jensen is currently offline Trescott JensenFriend
Messages: 4
Registered: August 2014
Junior Member
I wonder if there is a quick hack I could make to just make the buttons always available. They could send their respective signals to the GDB regardless of the current state. The GDB would complain, but everything would work (I think).

For the time being, I can get by with entering the commands in the GDB console, but later when I get more heavily into the debugging process, that is going to become a major hindrance. So, I'm not in a big rush to fix it, but I do need to solve it.

I have looked at temp files and have not found anything helpful. Perhaps I should try a fresh install.

At this point, I'm not sure where to look next. I had done a lot of searching before finding this thread. Everything I found had to do with not having the stack frame selected. This is the first and only place I have found someone who had the same problem as me.

Wojciech, would you mind sharing the details of your setup with me? I want to see how our configuration is similar or different to help identify where the problem my be.

I am using Archlinux, with the following relevant packages installed:
eclipse 4.40-2
eclipse-cdt 8.4.0-1
gcc-arm-none-eabi-bin 4_8_20140609-1
gcc-multilib 4.9.1-1
SEGGER's J-Link software V4.88b-1

from within eclipse all the GNU ARM C/C++ Cross Development Tools are installed from "ilg.gnuarmeclipse.repository-2.3.2-201407190854.zip!"

Are you using J-Link, openOCD or something else?

I am using the J-Link hardware with the J-Link software and the J-Link debug configuration plugin that comes with the GNU ARM C/C++ Cross Development Tools. I am interested in using the openOCD but was unable to get it working. (I thought is would help to know if the problem existed regardless of which I used. But since I can't get it working I can compare them.)
Re: Debug options greyed out [message #1405591 is a reply to message #1405236] Thu, 07 August 2014 18:06 Go to previous messageGo to next message
Wojciech Domski is currently offline Wojciech DomskiFriend
Messages: 5
Registered: July 2014
Junior Member
Trescott Jensen wrote on Wed, 06 August 2014 22:48
I wonder if there is a quick hack I could make to just make the buttons always available. They could send their respective signals to the GDB regardless of the current state. The GDB would complain, but everything would work (I think).


I think something like this is possible but cumbersome.

Trescott Jensen wrote on Wed, 06 August 2014 22:48

Wojciech, would you mind sharing the details of your setup with me? I want to see how our configuration is similar or different to help identify where the problem my be.


I'm using Windows 8.1 (for the time being) with the following:
Eclipse Luna 4.4.0
eclipse-cdt 8.4.0
GNU ARM C/C++ Cross Compiler Support 1.9.2.201404240550
GNU ARM C/C++ Freescale Project Templates 2.1.1.201404240550
GNU ARM C/C++ Generic Cortex-M Project Template 1.1.1.201404240550
GNU ARM C/C++ STM32Fx Project Templates 2.1.1.201404240550
GNU ARM J-Link Debugging Support 1.5.1.201404240550
GNU ARM OpenOCD Debugging Support 1.2.2.201404240550
OpenOCD 0.8.0
GNU Tools ARM Embedded\4.8 2014q2\
ilg.gnuarmeclipse.repository-2.2.2-201404240550.zip

Trescott Jensen wrote on Wed, 06 August 2014 22:48

Are you using J-Link, openOCD or something else?


I'm using St-Link V1 from STM32VLdiscovery board.

What seems really weird and disturbing is something which I have discovered. Proper fork of the debugger in Eclipse for this case is totally random. Sometimes when I start Eclipse it works sometimes it doesn't. So the thread is still open for suggestions.





Re: Debug options greyed out [message #1405606 is a reply to message #1405236] Thu, 07 August 2014 19:03 Go to previous messageGo to next message
Trescott Jensen is currently offline Trescott JensenFriend
Messages: 4
Registered: August 2014
Junior Member
I have solved the problem, and have been able to reproduce it. Here is what I did.


  • uninstalled eclipse and eclipse-cdt and all their setting files/folders.
  • reinstalled eclipse and eclipse-cdt.
  • imported one existing project.


Running the debugger with this project had the desired result. All the debugging buttons worked as expected.

To reproduce the problem I did the following.


  • in the system's file browser (NOT from within eclipse), copy the project folder to make a new project.
  • in eclipse, import -> "Existing Projects into Workspace".


Now debugging the new project will reproduce the problem. All the debugging buttons will be grayed-out even when the stack frame is selected. Going back and trying the original project now will also result in this problem. Removing the duplicate does NOT resolve the problem. So whatever it is that this breaks, it stays broken.

In the .project file there is the project name, that could serve the purpose of a unique identifier. If that is the cause of the problem then the problem is in eclipse itself. (Eclipse should handle this gracefully, perhaps with an error notification, maybe even with a prompt to rename.)

For others who may find this thread having this problem, the correct way to duplicate a project is from within eclipse. In the "Project Explorer", do the following.

  • switch to the C/C++ perspective
  • select the project you want to duplicate in the Project Explorer.
  • right-click -> copy.
  • right-click -> paste.
  • enter new name at the prompt.


This will avoid the problem.


Wojciech, I believe this "solves" the problem in this thread, and so I think you should edit your original post to update the title to include "[SOLVED]". Personally, I think it would help others with this problem to find this thread if you changed the title to "Debug options grayed out with stack fame selected [SOLVED]".
Re: Debug options greyed out [message #1405610 is a reply to message #1405606] Thu, 07 August 2014 19:10 Go to previous messageGo to next message
Trescott Jensen is currently offline Trescott JensenFriend
Messages: 4
Registered: August 2014
Junior Member
Sorry, Didn't see your post until after I posted. If you're still having problems, then maybe I haven't solve this. Try deleting all of eclipse's setting files/folders. (windows doesn't remove them when you uninstall.) Make sure all your projects have a unique name in their project settings file. (not sure what it is in windows, linux uses ".project" as the filename.) Then re-setup your eclipse environment. Let us know if that fixes it for good.
Re: Debug options greyed out [message #1409249 is a reply to message #1398080] Sun, 17 August 2014 15:06 Go to previous messageGo to next message
Liviu Ionescu is currently offline Liviu IonescuFriend
Messages: 1
Registered: July 2009
Junior Member
Since exactly the same GNU ARM Eclipse plug-ins installed on 4.3 Kepler work without problems, I guess this is a Luna CDT bug.

Regards,

Liviu
(maintainer of GNU ARM Eclipse plug-ins)

Re: Debug options greyed out [message #1416206 is a reply to message #1398080] Thu, 04 September 2014 15:07 Go to previous messageGo to next message
Jarich Koning is currently offline Jarich KoningFriend
Messages: 1
Registered: September 2014
Junior Member
Using Luna CDT with GDB J-Link debugging an ARM target, I realised I got this problem only after installation of "C/C++ GDB Hardware Debugging" (most likely version 8.3.0.201402142303) from the CDT optional features.

De-installation worked for me, hope it helps you out as well.
Re: Debug options greyed out [message #1452042 is a reply to message #1398080] Fri, 24 October 2014 18:01 Go to previous messageGo to next message
Duane Mattern is currently offline Duane MatternFriend
Messages: 1
Registered: October 2014
Junior Member
Quote:
Using Luna CDT with GDB J-Link debugging an ARM target, I realised I got this problem only after installation of "C/C++ GDB Hardware Debugging" (most likely version 8.3.0.201402142303) from the CDT optional features. De-installation worked for me, hope it helps you out as well.


I was having a similar problem under Windows 7 64-bit. Even on a local HelloWorld.cpp project the debug menu items were disabled/greyed. The issue turned out to be the Windows PATH to gdb and arm-linux-gnueabihf-gdbgdb. I'm using MingGW and linaro for ARM (Beaglebone Black). Once I resolved the Windows path issue, I did get the debug menu items enabled for both local and remote debugging using Eclipse-cpp-luna-SR1-win32-x86-64. If the path is wrong, the debug menu will pop-up, but the debug menu items are disabled.

I tested the solution by making a dos batch file that pre-pends the appropriate path to the front of the PATH environmental variable and THEN starts Eclipse. This does a local, one-time update the the path variable, so you don't have to modify your envirnonmental variables.

REM run eclipse with modified %PATH%
set path=C:\gcc-linaro\bin;c:\MinGW\bin;C:\MinGW\msys\1.0\bin;%PATH%;
c:\eclipse\eclipse.exe

So it does not appear to be an Eclipse Luna issue. I'll test this on another platform tonight.

Re: Debug options greyed out [message #1453847 is a reply to message #1452042] Mon, 27 October 2014 15:43 Go to previous messageGo to next message
Carine Veges is currently offline Carine VegesFriend
Messages: 1
Registered: October 2014
Junior Member
Thanks for its, its help me very Smile thanks all for reply at this Smile))) i go to my dev Smile)))

_______________________________________________________________________________________
Re: Debug options greyed out [message #1474188 is a reply to message #1405606] Sat, 15 November 2014 07:18 Go to previous message
Andrew Goedhart is currently offline Andrew GoedhartFriend
Messages: 1
Registered: November 2014
Junior Member
The simplest solution seems to involve renaming the project with the duplicate identifier in the project file under eclipse. This re-enables the buttosn without having to do anything else. This works for imported projects
Previous Topic:How to use auto-comment, pls Help!!
Next Topic:Compiling problems
Goto Forum:
  


Current Time: Thu Mar 28 10:26:16 GMT 2024

Powered by FUDForum. Page generated in 0.03865 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top