mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
gdb: Add pre/post hooks to fix step, next, finish
The gdb commands step, next and finish on the M3 core would never make forward progress since there is almost always an interrupt pending. This is a known problem on the M3, and is fixed by adding pre and post command hooks which mask and unmask all ISRs on the M3 core. Step, next and finish now work as expected, but care should be taken when using these commands across any part of the code that actually _needs_ the interrupts in order to make forward progress. git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@622 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
a43f579265
commit
0e3a5550ba
@ -2,3 +2,27 @@ target remote localhost:3333
|
|||||||
monitor reset halt
|
monitor reset halt
|
||||||
monitor cortex_m3 vector_catch all
|
monitor cortex_m3 vector_catch all
|
||||||
file ./build/openpilot/OpenPilot.elf
|
file ./build/openpilot/OpenPilot.elf
|
||||||
|
|
||||||
|
define hook-step
|
||||||
|
monitor cortex_m3 maskisr on
|
||||||
|
end
|
||||||
|
define hookpost-step
|
||||||
|
monitor cortex_m3 maskisr off
|
||||||
|
end
|
||||||
|
|
||||||
|
define hook-next
|
||||||
|
monitor cortex_m3 maskisr on
|
||||||
|
end
|
||||||
|
|
||||||
|
define hookpost-next
|
||||||
|
monitor cortex_m3 maskisr off
|
||||||
|
end
|
||||||
|
|
||||||
|
define hook-finish
|
||||||
|
monitor cortex_m3 maskisr on
|
||||||
|
end
|
||||||
|
|
||||||
|
define hookpost-finish
|
||||||
|
monitor cortex_m3 maskisr off
|
||||||
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user