Hi All,
For an internal Software debugger on a MPC5777M e200zx core, i would like to implement software breakpoint for the code running in RAM.
With non-VLE PPC, the TRAP instruction is used to modify the instruction where i want to break and when this TRAP is executed, the debug exception is taken (if necessary enable bit are set on the PPC).
But on VLE PPC, the instruction to be modify by a TRAP can be a 16bit length instruction and unfortunately the TRAP instruction is 32bit. In this case the 32bit TRAP will corrupt the 16bit word following the instruction to break.
This corruption can lead to a crash of the debugged software if this corrupted 16bit word is a constant data.
I think that a 16bit TRAP instruction is missing in the VLE PEM documentation.
What is your feeling about this ?
And do you have any idea, hint to solve my problem ?
Regards.
I think you can use e_dnh and se_dnh instead of traps, they will either cause illegal instruction exception or enter debug mode if enabled which is probably what you want anyway.