Cannot get debugger to operate
Cannot get debugger to operate
i am running a provided application (EFFS-HTTP) and running it in Debug Mode. The system asks if I want to open the debug window, then it shows the debug window with Threads. If I try to place a breakpoint, it adds a yellow exclaimation mark rather than a break point mark and the break point does not work. The only active icon is the 'Terminate' , 'instruction stepping' and 'use step filter' icons. Therfore I press the terminate icon and it gives the error message 'Target request failed: failed to interrupt. Now even the 'terminate' icon is not available.
If I exit and reload Eclipse and re-run the debugger, I can manage somtimes to get a breakpoint to be set from the previous session, and if I do, the break point works. However, there is no way to interrupt the program flow other than the break point.
If I press the terminate icon, I get the error message and the terminate icon is greyed out, but the break point still works. However, the only way to terminate the debug session is to close Eclipse. Also, the only way to get a break point to work is to set it (it is yellow) the close and re-oipen Ecliplse and sometimes the break point will be where I set it.
Is there something that i can do to make it less hit and miss? Is there someway I can termiante the debug session without closing eclipse and is tehre someway I can set a breakpoint without clsoing Eclipse?
Regards
Lachlan
If I exit and reload Eclipse and re-run the debugger, I can manage somtimes to get a breakpoint to be set from the previous session, and if I do, the break point works. However, there is no way to interrupt the program flow other than the break point.
If I press the terminate icon, I get the error message and the terminate icon is greyed out, but the break point still works. However, the only way to terminate the debug session is to close Eclipse. Also, the only way to get a break point to work is to set it (it is yellow) the close and re-oipen Ecliplse and sometimes the break point will be where I set it.
Is there something that i can do to make it less hit and miss? Is there someway I can termiante the debug session without closing eclipse and is tehre someway I can set a breakpoint without clsoing Eclipse?
Regards
Lachlan
Re: Cannot get debugger to operate
Hello,
Which version of the tools are you using? Someone actually just reported this same bug this week and it appears to affect the beta release. I'd like to know if you are using the beta as well.
Which version of the tools are you using? Someone actually just reported this same bug this week and it appears to affect the beta release. I'd like to know if you are using the beta as well.
Forrest Stanley
Project Engineer
NetBurner, Inc
NetBurner Learn Articles: http://www.netburner.com/learn
Project Engineer
NetBurner, Inc
NetBurner Learn Articles: http://www.netburner.com/learn
Re: Cannot get debugger to operate
Yes i am using the latest release posted about two weeks ago that adds new support for the nano that was missing. Sorry, I looked for a similar post but did not see the post you are talking about.
Re: Cannot get debugger to operate
I was seeing similar issues a week ago when I was playing with the debugger. You can force stop the debugging by going in to Windows Task Manager and ending the process for it, named something gdb if I recall. That saves you from closing/opening eclipse.
I noticed that I had the issues while on Windows 7 x64, but the debugger worked fine on Windows XP x32. What OS are you running on?
I noticed that I had the issues while on Windows 7 x64, but the debugger worked fine on Windows XP x32. What OS are you running on?
Re: Cannot get debugger to operate
Well, I've been researching this all day. It's a problem I can reproduce in releases going back to 253 (and maybe earlier, I stopped testing old versions), and its a problem that appears to be coming from CDT/Eclipse. CDT is not interrupting gdb if gdb is running.
A workaround is to set a breakpoint before you start the debug session. As long as you can hit a breakpoint, you can modify breakpoints and terminate/continue as normal. The problem arises when gdb is running without breakpoint, Eclipse is not able to interrupt GDB to set a break point. That's why this has gone on so long, as my usual workflow is to set breakpoints before I connect to the device.
It's interesting that mx270a mentions the windows 7/XP issue. I had just read on the Eclipse bug forum someone mentioning that it was only affecting his windows 7 machines as well. We pretty much have all windows 7 here, so I am going to need to get a winXP machine up and running to verify this.
A workaround is to set a breakpoint before you start the debug session. As long as you can hit a breakpoint, you can modify breakpoints and terminate/continue as normal. The problem arises when gdb is running without breakpoint, Eclipse is not able to interrupt GDB to set a break point. That's why this has gone on so long, as my usual workflow is to set breakpoints before I connect to the device.
It's interesting that mx270a mentions the windows 7/XP issue. I had just read on the Eclipse bug forum someone mentioning that it was only affecting his windows 7 machines as well. We pretty much have all windows 7 here, so I am going to need to get a winXP machine up and running to verify this.
Forrest Stanley
Project Engineer
NetBurner, Inc
NetBurner Learn Articles: http://www.netburner.com/learn
Project Engineer
NetBurner, Inc
NetBurner Learn Articles: http://www.netburner.com/learn
Re: Cannot get debugger to operate
I am running windows 7/x64.
As well as the setting of breakpoints, the problem is also terminating the debug session.
As well as the setting of breakpoints, the problem is also terminating the debug session.
Re: Cannot get debugger to operate
Back in October I had the yellow warning icon when trying to debug library code and wrote up a blog post about it. Turns out the default debug configuration didn't define _DEBUG. The post shows details on how to do it. There were still many problems with debugging library code but debugging NB device executable code seems to work as expected for me. Of course I don't test the debugger that much except with sample code because 99% of my code is in libraries.
Data Point for Forrest
Using NNDK 2.6.026 and the Eclipse Indigo (32 bit) release, the debugger works as expected for me on Win7/64.
I just created a new empty project with both Debug and Release builds for the MOD54415 . I then imported the code from C:\nburn\examples\EFFS\EFFS-HTTP (removing the makefile). I did a debug build, created a debug configuration and launched it. It automatically breaks on the DisplayMenu() function even though there is no breakpoint set. Previous experiments make me think this has something to do with the InitializeNetworkGDB_and_Wait() call. It doesn't seem to break until a while after that statement is reached. I could set other breakpoints, run etc.
I then switched to InitializeNetworkGDB() and launched without a breakpoint. The program launches and runs without breaking as expected. I then manually set a breakpoint on the first line of DisplayMenu(), typed ? in MTTY and broke into the debugger.
Hitting the red square terminate icon stopped the program and then I hit the remove all terminated launches button and manually selected the C/C++ perspective. Everything worked cleanly and as expected.
Data Point for Forrest
Using NNDK 2.6.026 and the Eclipse Indigo (32 bit) release, the debugger works as expected for me on Win7/64.
I just created a new empty project with both Debug and Release builds for the MOD54415 . I then imported the code from C:\nburn\examples\EFFS\EFFS-HTTP (removing the makefile). I did a debug build, created a debug configuration and launched it. It automatically breaks on the DisplayMenu() function even though there is no breakpoint set. Previous experiments make me think this has something to do with the InitializeNetworkGDB_and_Wait() call. It doesn't seem to break until a while after that statement is reached. I could set other breakpoints, run etc.
I then switched to InitializeNetworkGDB() and launched without a breakpoint. The program launches and runs without breaking as expected. I then manually set a breakpoint on the first line of DisplayMenu(), typed ? in MTTY and broke into the debugger.
Hitting the red square terminate icon stopped the program and then I hit the remove all terminated launches button and manually selected the C/C++ perspective. Everything worked cleanly and as expected.
Re: Cannot get debugger to operate
I believe that I have a solution to this. I was wrong about older versions not working. 253 and 260 releases were working properly, its just the beta that was failing. And the beta NBEclipse install seems to be missing a required plugin.
Easiest fix is to wait for RC2, which is done, but was just waiting for the debug issue to get fixed. I expect that release on netburner.com early next week.
If you want to fix it now, you need to do 2 steps. Make sure that NBEclipse is not open. If you have gotten the failure above, control-alt-delete and kill m68k-elf-gdb.exe (this is what causes terminate and adding breakpoints to become unresponsive)
1. extract the included zip file in to \nburn\nbeclipse\plugins.
If done properly, you should see the following new folder in \nburn\nbeclipse\plugins:
2. Open the NBEclipse config file in an editor of your choice. It is located at \nburn\NBEclipse\configuration\config.ini
Line 3 is a huge line full of include plugins. At the end of this line, add
This should now load the required plugin. You need to verify by opening NBEclipse and click on help->about->installation details->plug-ins and ensure that C/C++ Development Tools Core for Windows (x86) is on the list.
Easiest fix is to wait for RC2, which is done, but was just waiting for the debug issue to get fixed. I expect that release on netburner.com early next week.
If you want to fix it now, you need to do 2 steps. Make sure that NBEclipse is not open. If you have gotten the failure above, control-alt-delete and kill m68k-elf-gdb.exe (this is what causes terminate and adding breakpoints to become unresponsive)
1. extract the included zip file in to \nburn\nbeclipse\plugins.
If done properly, you should see the following new folder in \nburn\nbeclipse\plugins:
Code: Select all
org.eclipse.cdt.core.win32.x86_5.2.0.201202111925
Line 3 is a huge line full of include plugins. At the end of this line, add
Code: Select all
,reference\:file\:org.eclipse.cdt.core.win32.x86_5.2.0.201202111925/@4
- Attachments
-
- org.eclipse.cdt.core.win32.x86_5.2.0.201202111925.zip
- (81.9 KiB) Downloaded 553 times
Forrest Stanley
Project Engineer
NetBurner, Inc
NetBurner Learn Articles: http://www.netburner.com/learn
Project Engineer
NetBurner, Inc
NetBurner Learn Articles: http://www.netburner.com/learn
Re: Cannot get debugger to operate
Pressing the red square now terminates the debug session gracefully. Good stuff.
Setting a break point anywhere in my code still causes the debugger to stop in the OSTaskIdle function in ucos.c. I get this result in both Windows 7 x64 and Windows XP x32.
Setting a break point anywhere in my code still causes the debugger to stop in the OSTaskIdle function in ucos.c. I get this result in both Windows 7 x64 and Windows XP x32.
- Attachments
-
- TestDebug.gif (107.27 KiB) Viewed 11607 times