evaction
摘要
为指定事件设置动作。该动作将在指定事件即将被执行时发生。
语法
evaction [<exec_id> | #<sched_id> | +<n> | %<n>] <action>
| 参数 | 类型 | 说明 |
|---|---|---|
<exec_id> |
整数 | 目标事件在事件执行序列中的数字索引 执行 ID 可以估算,也可以通过先前仿真运行的 ODB Event Banner 精确获取。 |
#<sched_id> |
整数 | 目标事件在事件调度序列中的数字索引 可使用 ODB 命令 evprint 获取该参数的调度 ID,它会显示事件列表的一部分。 |
<n> |
整数 | 目标事件的数字索引,相对于当前事件+<n> 在第 n 个后续事件上设置动作;%<n> 为每第 n 个事件设置动作 |
<action> |
字符串 | 任意 ODB 命令,可带任意数量的参数。如果包含多个单词,字符串必须用双引号括起。 |
详细说明
事件可以通过执行 ID、调度 ID 或相对索引来指定。这三种 ID 都会由 evprint 命令显示,但此时只有调度 ID 是固定的。动作可以通过 suspaction 命令暂停,通过 actaction 重新激活,或通过 delaction 删除。
示例
ODB> evaction +2 status
Added action 2: action at nth event (1513): status
ODB> evaction +10 "snapshot snap_file"
Added action 3: action at nth event (1521): snapshot snap_file
ODB> status
Breakpoints :
None
Traces :
Full trace is disabled
Encapsulation trace is enabled
Execution trace is disabled
Trace format: indented
No other traces
Actions :
2) action at 2nd event (1513): status
3) action at 10th event (1521): snapshot snap_file
Miscellaneous :
Memory tagging is disabled