Hello,
I am using:
GNU ARM J-Link Debugging Support 1.5.1.201404240550
Eclipse Kepler Service Release 2
Linux Mint 15
ARM GCC 4.8.3
I don't know if this is really a bug since the plug-in seemed to work ok the first time I used it but since then there is something that is not working right.
When I pause a debugging session (Cortex M4), I can see where it stopped, but no stack frame info is available. See pic 01.png.
When I try and click on the empty stack frame, it issues an error saying it can access a memory address. See pic 02.png
If I try using the gdb console to get the stack frame info (see pic 03) I do get it, but obviously it is not shown in the Debug view. Even so, if I try to get more that the actual levels it fails.
My theory is that since I am using FreeRTOS gdb encounters the top of the stack of another task (with a lot of A5 for stack overflow checking) and freaks out. Perhaps it has some problem knowing how far to go (-stack-list-frames --thread 1 is the command issued by the plug-in, I guess), so it must be limited (-stack-list-frames --thread 1 0 X).
I am no expert about gdb so maybe I am saying nonsense, but if there is really a problem here and I can help you out testing I will be glad. Before using your plug-in (great work, by the way :-)), I was using the eclipse gdb client with the external J-Link GDB server and it was working all right.
thank you for your bug report. the plug-in just starts the server and sends the initialisation commands, the debugging session is handled by standard eclipse classes.
does the device name match the mcu?
do you debug code running in flash or in ram?
could you try to start the gdb server manually?
Yes, the device name matches the MCU and the code is running from flash (except some I do copy to RAM inside the firmware, but that works).
I just tried with my previous manual gdb server config and you are right, it also fails. I also tried with a previous toolchain and the same. So, when I installed your plugin I also let Eclipse update itself, maybe something changed in CDT?
could you try to create a fresh workspace and inside this workspace to create a new project from a template and, with minimum changes, try to see if the debugger works?
if it does, than you might have something wrong in your workspace or in your project.
if it does not, you might also try with a newly installed Eclipse.
I will try as soon as I get some time. One thing, though; I am not using your plug-ins for project management. My project is a standard Eclipse project with Sconsolidator (scons) as I manage the build with it. I have been doing this since a lot before this problem so I don't think it is related, but I just tell you in case there is something I am missing.
this should not be a problem, the j-link debug plug-in should work independently.
the suggestion to test with a fresh project generated by my templates stands, if it does not work it may be something wrong with your Eclipse.
any new finds on this issue?
Dear Liviu,
I had to postpone testing as I have some deadlines to attend, but on August
I am going to reinstall from scrath and test everything. I did test with
different versions of JLink GDB server and the previous Eclipse SR but it
still happened. It is worth noting that if there is no RTOS (normal
project) or when I am working from the main stack (before starting the
kernel or some FreeRTOS code that runs on the main stack) everything is
working as it should, what does not work is stack unfolding for RTOS tasks,
as if Eclipse has no way of telling where the stack ends and then gets
garbage when unfolding one level beyond the base. Anyway, I also tried not
using your plugin and the same happens so it seems to be more a problem of
Eclipse. Any way, it may be interesting for you to know as RTOS are used a
lot these days and a lot of people will want to use your plugin for
RTOS-based development.
Thank you a lot, I will keep you posted with my findings.
Last edit: Liviu Ionescu (ilg) 2014-07-04
since this is an Eclipse bug, not a plug-in bug, I suggest we close this ticket. agree?
and, please, no longer reply to email notifications, but use the SourceForge web page.
Ok, sorry. Yes, you can close the ticket :-)