VLE 16bit Trap instruction for SW breakpoint

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

VLE 16bit Trap instruction for SW breakpoint

712 次查看
christopheple
Contributor II

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.

标记 (4)
0 项奖励
回复
1 回复

639 次查看
igor1
Contributor II

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.

0 项奖励
回复