Can't use Segger J-link in Eclipse - eclipse

I installed Eclipse luna with ARM plug-in, installed Segger software, attached a J-link base to my board. Running the command line Segger software it seems to connect just fine.
But in Eclipse, it's not seeing the J-link option and can't start the debugger. For some reason it's not showing up in the debug configuration options.
On a co-worker's machine it's working fine. We're comparing setups but so far haven't found any discrepancies. We both have Windows 7.
If I try to debug it pops up a window saying it encountered a problem:
Error with command: gdb --version
Cannot run program "gdb": Launching failed
Thanks for any help!

Okay, it appears that somewhere in my attempts to get this going, I had clicked on the box for the GDB SEGGER J-Link debugger in Window | Preferences | Run/Debug | Launching | Launch Configurations.
I thought that was a box to include that debug option, but it is a filter to exclude that debugger, and that is apparently why it didn't show up in the debug configuration window.

Related

Eclipse CDT Error in GDB debugger target is null

I want to debug my test.out program with the the gdb debugger from mingw. Calling the gdb debugger with the image file is running successful on the terminal window, but every time I started the debugger from eclipse I got the
**Error message from debugger back end:
You can't do that when your target is `None'
Failed to execute MI command:
load C:\Temp\test.out
The gdb commander was configured as path/gdb.exe and image and symbol files are the out file.
In the debugger console view I only see the the information about the installed gdb version simular the output that I got when I type only gdb in the terminal window. No MI command.
Any hints how I can solve my problem or find more informatio about it?
Thanks.
I found the solution, I was too stupid. I configured my debug configuration as gdb hardware debugger, but since it is a c-application, I have to configure it as such one.

Gdb stops when viewing variables in Eclipse

When debugging a c++ app, and hitting a breakpoint, gdb terminates the debug session when I click on a variable to expand its content in the Variables panel.
The displayed message is: <terminated, exit value: 0>gdb (10.1.90.20210103)
Printing the variable from the Debugger Console works correctly.
Debugging was working OK some weeks ago. The major changes that happen recently was a debian upgrade from 10 to 11 (bullseye), and an upgrade of the Eclipse version.
Activating gdb traces following where can I find GDB traces, I could see the commands sent to GDB, but no particular error before GDB stopped.
Any idea of what could cause this issue?
Eclipse Version: 2021-12 (4.22.0), Build id: 20211202-1639 running on linux debian bullseye.
I answer my own question.
After checking related answers, I suspect that the problem is linked to stl pretty printing in Eclipse (which was working fine before). I tried different version of Eclipse and gdb, and finally managed to fix the issue by using a previous version of gdb (8.3 instead of 10.1).
Here is the procedure that I followed (I'm not sure all steps are mandatory).
Reinstalled eclipse from scratch
Deleted the .metadata directory and recreated the eclipse workspace
Downloaded version 8.3 of gdb sources, and compiled it with python support ('./configure --with-python'). Note that libgmp-dev and python2.7-dev debian packages must be installed.
Copied gdb-8.3 somewhere under /usr/local/
Updated eclipse preference settings : C-C++/Debug/GDB and change GDB Debugger to the pach where gdb 8.3 executable was located under /usr/local/.
Checked in Debugger Console that the right gdb version is displayed. If this is not the case, you may have to set gdb using Debug As.../Debug Configurations/Debugger/GDB Debugger

Eclipse + PyDev debug message: [Invalid Frame]: Please select frame to connect the console

So I'm trying to debug.
How exactly in debug view to connect the frame ?
I looked in debug view, tried to do something in stacks nothing helps. There seems to be no option to connect. Under PyDev option in popup menu in debug stack frame I have option 2to3 and code analyses nothing about connection or console.
asdrew
[Invalid Frame]: Please select frame to connect the console.
4321
[Invalid Frame]: Please select frame to connect the console.
Well, I think there was an issue with different versions of my programs. Initially I had java files + eclipse x64 installed with python x86.
I've made it all work this way: java 8 x86 + eclipse x86+ python x86 installed on my computer.

how to debug using basheclipse

"Basheclipse installation issue" does not address my issue and thats why I ask a new question.
Hi, I am running Eclipse Luna on Windows 7
I followed all the instructions on http://sourceforge.net/projects/basheclipse/files/
I have never worked on Eclipse. I am stuck on 7th step(pasted below)
7) Switch to The Debug perspective. Start the debugging session. Launch "script.sh" from bash shell.
Please help me do this.
When I used the debug button it says "Launching new configuration has encountered an error Bash is already running."
I tried the run button and it says "Couldnt find Interpreters. Do you want to configure interpreters now?"
edit:ok the debug perspective is on now.
edit:ok looks like a bug
http://sourceforge.net/p/shelled/discussion/399718/thread/6272268c/
any way to circumvent this?
"Launching new configuration has encountered an error Bash is already running."
--> just relaunch your eclipse and then it will work without any problem.
"Anyone tried installing Eclipse and debugging on a Linux machine?"
--> yes. eclipse neon and jdk 8.
You can follow my tutorial at http://dietrichschroff.blogspot.de/2017/07/bash-enabling-eclipse-for-bash_14.html

Eclipse Can't Set Debug Breakpoint - Greyed out Says: Chosen Op Not Enabled DS-5 Debug Plugin

I was successfully setting DS-5 Debug breakpoints using community edition of DS-5 Debugger.
However, now I try to run and its grayed-out. I can set C/C++, but no longer DS-5 debug breakpoints.
All the debug options now show Chosen operation not enabled. It was working, I just restarted computer and now I can't.
I've tried new project, C++ project, new workspace, but I don't seem to be able to set this type of breakpoint anymore.
Update: Looks like it was just the debug configuration needs to be connected before setting DS-5 debug breakpoints.
ARM DS-5 Debug perspective acts weird sometimes.
When your app not running first you have to set debug points then Run your application and after activating debug points by click on their checkboxes you should connect to device with ARM DS-5 Debug configuration.
If you do in this order you'll be able to hit one of your debug points as long as there are no compilation or runtime errors.