Beginner Question about breakpoints

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

Beginner Question about breakpoints

600件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by btheuma on Fri Oct 23 07:23:27 MST 2015
I am currently using LPC1115 Xpresso Development Board and LPCXpresso v7.9.0_455. I am writing a program that uses a timer interrupt. The program is working as intended(that is the interrupt is being triggered when necessary) when debugging without a breakpoint. However, when I am debugging the program and I am setting a breakpoint in the main function, and pressing f5(step into) continuously, the breakpoint arrow eventually reaches the infinite while loop and debugging stops, without continuing to increment the timer to eventually trigger the interrupt.

How can I enable debugging so that I can continuously see the timer incrementing and eventually entering the ISR when the respective count is reached ? It is supposed to continue iterating through the while loop, while the timer increments until triggering the ISR. Why is this not happening ? Thanks.
0 件の賞賛
返信
2 返答(返信)

573件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by btheuma on Sat Oct 24 05:21:29 MST 2015
The problem that I am facing is that when I make a breakpoint in a timer ISR for example, and I start stepping into the function, at the end of the ISR I cannot continue to step in the program, for example by returning to the main function.
0 件の賞賛
返信

573件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LessThanZero on Fri Oct 23 08:38:11 MST 2015
By default, LPCXpresso disables interrupts while instruction stepping. I suspect that's what's going on here.

Unfortunately, when you issue a high-level step instruction, you don't know how GDB will implement the request. It may set a breakpoint and 'go', or it may instruction step to the instruction past the end of the current high-level line. Infinite loops are a particular problem. Either way, there is really no where to go. I suspect GDB tries to instruction step to the PC following the end of the high-level line, so LPCXpresso never enables interrupts.

LessThanZero
0 件の賞賛
返信