Does the Debugger work on Libraries for anyone?

Discussion to talk about software related topics only.
Post Reply
User avatar
tod
Posts: 587
Joined: Sat Apr 26, 2008 8:27 am
Location: Southern California
Contact:

Does the Debugger work on Libraries for anyone?

Post by tod »

Historically and currently I have many many problems trying to use the debugger. I wonder if my problems are related to the fact that most of my code is in libraries. When I created a Debug configuration of the libraries, it didn't set the _DEBUG symbol or set the Optimization to -O0. I did this manually and did a clean rebuild on all my libraries. Using breakpoints is extremely flaky. I have to set all breakpoints I will ever want in a debug session before I start. Otherwise when I set them I get a warning icon with the message "Unresolved breakpoint". It's not related to the line I set it on. If a session is running and I set some breakpoints and get the warnings, usually I can quit, start a new session and the breakpoints enable and will be hit. If they are enabled and I remove them, they can't be set again. If I set breakpoints too close to the InitializeNetworkGDB_and_Wait(); statement they will look good (no warning icons) but they will NEVER get hit.

Also I can't seem to properly terminate a debugging session, I've tried terminate followed by disconnect and the opposite but it has never worked. Luckily most of the time when I go to run the debug configuration again I get a dialog offering to kill the current session and it often works. If it doesn't I have to exit Eclipse and restart to debug again. Is there a secret set of steps to properly exit the debugger?

Does anyone run the debugger on libraries out there? Are there any special settings I need to make that will make debugger usable?

BTW, I tried deleting the Debug Configurations for all the libraries, created a new one selected the "Default configuration" radio button and selected Debug from the popup. I thought this might fix the build but it didn't help.
ecasey
Posts: 164
Joined: Sat Mar 26, 2011 9:34 pm

Re: Does the Debugger work on Libraries for anyone?

Post by ecasey »

I don't use any custom libraries, but I suffer with the debugger in most of the same ways you described.
It seems worse over a slow network. I have a MOD5282 running remotely over a long piece of CAT5e cable connected to a wireless repeater. My PC accesses the repeater through a wireless router.

I can set breakpoints before running the debugger, but once it is running if I try to set a breakpoint, I get the same warning as you do. Also it seems to act up (failure immediately after loading) if I have more than a few breakpoints. Then, if I have more than a few Expressions set up, it won't re-start after it hits a breakpoint. I have to turn the power off and on again to reset it. (The module is not accessible to press a reset button). I have set lots of breakpoints that should be hit, but never get hit.

If I run the same code on a board connected directly through a switch to my PC, it seems to behave much better (although not perfectly). That makes me think it is something in the timing. It seems to me that they had some time-out issues with the Beta verson of 2.6.0, there was one version I tried where the debugger didn't work at all.

I don't know if this helps, other than misery and company and all that.

Ed
User avatar
tod
Posts: 587
Joined: Sat Apr 26, 2008 8:27 am
Location: Southern California
Contact:

Re: Does the Debugger work on Libraries for anyone?

Post by tod »

It definitely helps. Since I haven't even attempted to use the debugger in years, it's nice to know it's not all my fault and there's hope it will get better. I just noticed there's another older thread on the NNDK 2.6 debugger. Since no one from NB is responding, I think I'll contact tech support even though I'm in danger of becoming a gadfly.

I'm doing my tests on a MOD5272 directly connected to my gigabit router and I'm the only one using the network. I'm also using what I think is the latest release of NNDK 2.6.0.26.
ecasey
Posts: 164
Joined: Sat Mar 26, 2011 9:34 pm

Re: Does the Debugger work on Libraries for anyone?

Post by ecasey »

They did acknowledge and fix the debugger problems that keckrl raised here. That was the build in which the debugger didn't work at all for me. I think they still have issues.
User avatar
tod
Posts: 587
Joined: Sat Apr 26, 2008 8:27 am
Location: Southern California
Contact:

Re: Does the Debugger work on Libraries for anyone?

Post by tod »

Are you using NBEclipse? I'm using the regular Indigo release, but if you see the problems under NBEclipse that is one test I won't have to run.
ecasey
Posts: 164
Joined: Sat Mar 26, 2011 9:34 pm

Re: Does the Debugger work on Libraries for anyone?

Post by ecasey »

Yes, I am using NBEclipse.
Post Reply