Debugger problems - stepping

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Debugger problems - stepping

1,060件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Jindra on Thu Mar 25 16:13:03 MST 2010
I have problems with debugger when want stepping through code:

- "step over" often behaves like step into. Why?

- "step return" never stops at return, it behaves exactly like "resume". What should I do?

- when stepping (using both step over or step into), it often jumps randomly over my source code. I'm able to believe that compiler merge epilogs of functions, but I didn't see any relation between code which should run next and source where it steps.
So stepping is totaly unusable. What can I do?

- I put four breakpoints in code, and when I try "restart" it complains.:
Execution is suspended because of error.
  Warning:
  Cannot insert hardware breakpoint 13.
  Could not insert hardware breakpoints:
  You may have requested too many hardware breakpoints/watchpoints.
Why 13?
In other cases there is different number, but I'm able to use only three breakpoints, not four.

Thanks for any responses.
0 件の賞賛
返信
1 返信

933件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Thu Mar 25 22:22:00 MST 2010

Quote: Jindra
I have problems with debugger when want stepping through code:
- "step over" often behaves like step into. Why?

- "step return" never stops at return, it behaves exactly like "resume".  What should I do?



GDB has issued an incorrect instruction to the the Code Red debug utility. You can improve step-over, and step-out behavior by removing the "--gc-sections" linker option. Then, Clean, and Build the project.

Project -> Properties -> C/C++ Build -> Settings -> Linker -> Miscellaneous


Quote: Jindra

- when stepping (using both step over or step into), it often jumps randomly over my source code. I'm able to believe that compiler merge epilogs of functions, but I didn't see any relation between code which should run next and source where it steps.
So stepping is totaly unusable. What can I do?



Be certain you use a Debug (rather than Release) project build. The debug information generated by the Release optimization levels is likely at fault.


Quote: Jindra

- I put four breakpoints in code, and when I try "restart" it complains.:
Execution is suspended because of error.
  Warning:
  Cannot insert hardware breakpoint 13.
  Could not insert hardware breakpoints:
  You may have requested too many hardware breakpoints/watchpoints.
Why 13?
In other cases there is different number, but I'm able to use only three breakpoints, not four.



The LPC1114 (you didn't say which LPCXpresso you're using) has 4 available breakpoint comparators. When you issue a "Restart" command, LPCXpresso attempts to stop your code at main (see your Debug Configuration setting), which is not visible to you. When it tries to set the break, there's none available (you've overrun the quota), and this overrun produces the error.

Regards,

CodeRedSupport
0 件の賞賛
返信