Application crashes when debugging over jtag - eclipse

I'm having an issue when attempting to analyze variables in the Eclipse IDE, while in debug mode. At a breakpoint, I'll try to expand a data structure, in the Eclipse variables window, however, the member doesn't display and the program running on the board seems to crash. Once this happens, the only way to reconnect over the jtag is to reboot the board and restart Eclipse.
Without knowing for certain, it seems to be an error with memory allocation in the IDE, but I don't know. Is this a common problem when debugging over jtag? Where might I begin looking to resolve the issue?

Related

vscode code gdb, how to halt, not stop debugging

In VS Code V1.73.1 - I am running GDB (actually a RISCV variant, debugging a target board vi jtag).
I"m also quite a bit confused and do not know if this is a VSCODE problem or a plugin problem, and there are multiple plugins involved,
If it is a plugin then I'm thinking it is the one that controls GDB... and other things are built upon that plugin. But - GDB is so much at the core that I think that the GDB component is actually part of the baseline VS-CODE package.
Background: I want to halt the cpu I am debugging so that i can inspect global variables and/or set breakpoints. I cannot seem to do that.
I normally go through the connect, load, then type continue. If I set a breakpoint before I type continue - it works.
My code is now running, I want to stop - add a breakpoint and continue.
To be clear - I do not mean disconnect and stop debugging, I want to stop or halt the cpu at its current location.
The normal method or action for GDB is to type Control_C in the GDB terminal but - this is VS Code, its not a normal terminal.
The question is how do I stop or halt the cpu under control of the debugger
Its not obvious, and no menu seems to find that selection.
if it was an local debug session I could do something like controlC in a console window or use KILL to send a signal, but - this is an embedded/remote GDB session so that is not possible.

Eclipse PyDev - Python stops when trying to run in debug mode

After upgrading to Python 3.6, Eclipse debug mode stopped working properly. It renders an error like this:
The strangest thing is that this issue does not raise in 100% of cases. Sometimes it goes away. And then again arises. I am lost trying to figure out why.
Although it happens when you're running the PyDev debugger, the debugger is probably only exercising some path in your code which has a bug and is usually not exercised (and thus leads to such an error).
In this case, attach a c/c++ debugger to the program to find the culprit (you can use the attach to after that error is hit)... On Windows you can use Visual C++ and on Linux GDB.
-- as a note, the issue is probably on some c/c++ library you're using (but given the info, it's really hard to pinpoint anything).

GDB Eclipse not finding Source Files

Recently I had a bug with my CDT eclipse application, so I downloaded GDB for debugging. It has brought me a lot of frustration. Finally, I have managed to properly install GDB, however when I try debugging my application, I get this error: No source file named /Desktop/workspace/TopVM/src/ShadowStack.h., as you can see there is an unnecessary . at the end of the path and it causes eclipse to freeze, so I have to force quit it. How would I go about fixing this?
as you can see there is an unnecessary . at the end of the path and it causes eclipse to freeze
This is not an unnecessary ., it is simply a full stop in the error message. It comes from GDB, probably this line:
throw_error (NOT_FOUND_ERROR, _("No source file named %s."), filename);
To fix the problem it would help if you identified if the problem is GDB or CDT, to do this, you can try running GDB without CDT and see if it freezes.
I assume you have found the following resources on setting up GDB on Mac (as I am guessing you are using?):
http://ntraft.com/installing-gdb-on-os-x-mavericks/

All Eclipse C++ Programs Fail to Run, Hangs on "Launching Delegate"

A few days ago, Eclipse for C/C++ (Helios) stopped running my programs. They can be compiled with MinGW without displaying any errors. However, when the programs are run, Eclipse always get stuck at "Launching Delegate" at 70%. No matter how long I wait, the program never starts. The same happens when I try to run the program from the command line; no matter how simple the program, the command line just does nothing, as if it is waiting for the program to start.
I believed that this was just an issue with my Eclipse workspace, so I created a new workspace and tested a Hello World application, but it failed too. I reverted to an older version of Eclipse (Indigo), and a 32-bit version, but these had the same error. I even installed a different IDE, Netbeans, but it too never runs any programs. So, clearly, it's not just Eclipse. I tried reinstalling MinGW, but this also didn't help.
I have tried everything I can possibly think of. I could only find one other person with the same problem online, and theirs was never answered. Can anyone help me out with this strange issue?
I had the same problem. Always stuck at 70%. However, it turned out that somehow it can be fixed by disabling my anti-virus program, when I want to run a C/C++ program. Which I find to be quite strange.
I hope it helps.

Debugging QT project in Eclipse is very slow (Ubuntu)

I'm trying to debug a sample QT project in eclipse in Ubuntu. Launching debugger hangs at 93% for several minutes. Then every step of debugging is very slow.
I tried to debug a simple hello-world-program. Debugger flies. So, the problem is with QT.
Looks like gdb traces terminal prints a very very long PATH, can't see the beginning, ends with this:
...:/usr/src/linux-headers-3.0.0-13-generic-pae/lib/lzo:/usr/src/linux-headers-3.0.0-13-generic-pae/lib/raid6:/usr/src/linux-headers-3.0.0-13-generic-pae/lib/raid6/test:/usr/src/linux-headers-3.0.0-13-generic-pae/lib/reed_solomon:/usr/src/linux-headers-3.0.0-13-generic-pae/lib/xz:/usr/src/linux-headers-3.0.0-13-generic-pae/lib/zlib_inflate:/usr/src/linux-headers-3.0.0-13-generic-pae/lib/zlib_deflate:$cdir:$cwd
What can the problem be?
Apparently, the debugger is trying to load a lot of symbols for the said program (including Qt) and this may take quite a while (so, it's not Qt-specific.)