我正在使用Lauterbach来调试PowerPC嵌入式C软件。我想从一个.cmm(实践)脚本中执行下面的ALGO。请让我知道是否有可能:
Set Breakpoint
When Breakpoint is hit, execute a .cmm file. This .cmm file will rewrite the values of an array.
Continue execution of program我不想把整个功能都存根。代码必须保持不变。
发布于 2015-05-06 12:00:13
设置断点
Break.Set <addr> /Program /CMD "DO myScript.cmm"若要继续执行目标程序,请将命令Go添加到调用的实践脚本的末尾。
如果不能将命令Go添加到调用的实践脚本的末尾,则需要一个单板脚本,如下所示:
// Content of myScript.cmm
DO myAlgorithm.cmm
Go
ENDDOBreak.Set命令也知道一个选项/RESUME,但这不适合您的情况,因为它不会等到调用的实践脚本完成之后。
发布于 2018-04-18 14:15:24
就像你提到的!
我不想把整个功能都存根。代码必须保持不变。
你可以试试这个;
;set a breakpoint on function
BREAK.SET <function_name/addr>\<LINE NUMBER>
;store address of current program counter(PC)
&pc=r(pc)
&call=address.offset(<function_name/addr>\<LINE NUMBER>) ;This will give the address of a function where breakpoint is set.
;Compare the address if it hit on correct function
IF (&pc==&call)
Do call_meonceHIT.cmm ;your desired .cmm script.
Break.Delete /ALL ; to delete all the set breakpoint. 这将确保断点击中正确的函数或可运行。
https://stackoverflow.com/questions/30073306
复制相似问题