Breakpoints not working

Discussion to talk about software related topics only.
v8dave
Posts: 333
Joined: Thu Dec 31, 2009 8:31 pm

Breakpoints not working

Post by v8dave »

Hi all,

I have a simple test application just now and I can't get the debugger to stop at break points. The code is compiled as debug and I can see the debugger starting but it just carries on even if I insert break points.

Am I missing something in my build?

Cheers,
Dave...
User avatar
yevgenit
Posts: 84
Joined: Fri Apr 25, 2008 12:47 am
Contact:

Re: Breakpoints not working

Post by yevgenit »

Sometimes, the compiler flag -gdwarf-2 disappears.

At Navigator window, right-click on name of your project.
In the context menu, select Properties.
At Properties window, select C/C++ Build, then Settings, then tab Tool Settings, then GNU C Compiler.
Verify, that the compiler command line includes: -gdwarf-2

The generic way of restoring the default project setting is to create the new project, verify the breakpoints are operating, and then import your own source files.
Yevgeni Tunik
Embedded/RealTime software engineer
https://www.linkedin.com/in/yevgenitunik/
________________________
User avatar
yevgenit
Posts: 84
Joined: Fri Apr 25, 2008 12:47 am
Contact:

Re: Breakpoints not working

Post by yevgenit »

Verify, the compiler command line has the following include (for mod5270):
-I"C:\nburn\mod5270\include"
Yevgeni Tunik
Embedded/RealTime software engineer
https://www.linkedin.com/in/yevgenitunik/
________________________
v8dave
Posts: 333
Joined: Thu Dec 31, 2009 8:31 pm

Re: Breakpoints not working

Post by v8dave »

All of the above is correct for my MOD5234.

I'll create a new project and try it that way. This is just some test code so no big issue to go this extra step.

Dave...
v8dave
Posts: 333
Joined: Thu Dec 31, 2009 8:31 pm

Re: Breakpoints not working

Post by v8dave »

OK, I created a new project with defaults only and still it won't debug the breakpoints.

I have recently upgraded to the latest Rel24 RC2 and suspect this may be the issue.

Dave...
User avatar
yevgenit
Posts: 84
Joined: Fri Apr 25, 2008 12:47 am
Contact:

Re: Breakpoints not working

Post by yevgenit »

My wizard-generated simple project has breakpoint feature fully operational.
I use Rel24_rc2.
Yevgeni Tunik
Embedded/RealTime software engineer
https://www.linkedin.com/in/yevgenitunik/
________________________
v8dave
Posts: 333
Joined: Thu Dec 31, 2009 8:31 pm

Re: Breakpoints not working

Post by v8dave »

Can you set breakpoints in UserMain?

I had it working yesterday at one point with the same project but it is not consistent and I can't breakpoint anything before the while loop in UserMain.

Dave...
User avatar
yevgenit
Posts: 84
Joined: Fri Apr 25, 2008 12:47 am
Contact:

Re: Breakpoints not working

Post by yevgenit »

My mentioned simple project has correctly operational breakpoints in UserMain() function before the while loop.
The source code is at http://forum.embeddedethernet.com/viewt ... ?f=7&t=676 ( Post subject: Ignoring ACK during master send without peripheral slave ack
PostPosted: 08 Apr 2010, 17:29)
If you need, the project files can be sent as well.

Verify check of "Network debug" while generation of the example project with NetBurner wizard.
Yevgeni Tunik
Embedded/RealTime software engineer
https://www.linkedin.com/in/yevgenitunik/
________________________
v8dave
Posts: 333
Joined: Thu Dec 31, 2009 8:31 pm

Re: Breakpoints not working

Post by v8dave »

Hi there,

Yes, network debugging was checked and the code to enable the debugger is called within UserMain. I have a printf to confirm this.

Is strange that I can set some parts to breakpoint but others can not.!!

Dave...
mhoyt
Posts: 9
Joined: Fri Feb 19, 2010 12:17 pm
Location: Blue Bell, Pennsylvania, USA
Contact:

Re: Breakpoints not working

Post by mhoyt »

Dave, try putting a delay after the call to InitializeNetworkGDB_and_Wait(), like this:

Code: Select all

  InitializeNetworkGDB_and_Wait();
  OSTimeDly (TICKS_PER_SECOND * 2);
I ran into this problem not long after I started using the Netburner a few months ago. I haven't investigated it any further, as the simple delay fixed the problem for me. I had noticed that breakpoints deep in the code worked, and placing breakpoints during runtime also worked, but not breakpoints appearing shortly after the InitializeNetworkGDB call.

--Mike
Post Reply