* @brief Get the current instruction value from debug operations * * @return uint32_t Returns the current instruction value if debug operations are available, * otherwise returns 0 * * @note This function retrieves the current instruction value by calling the registered * debug operations handler if available. If no debug operations are registered, * it returns 0. */
| 82 | * it returns 0. |
| 83 | */ |
| 84 | uint32_t dbg_get_ins(void) |
| 85 | { |
| 86 | uint32_t ins = 0; |
| 87 | |
| 88 | if (rt_dbg_ops) |
| 89 | { |
| 90 | ins = rt_dbg_ops->arch_get_ins(); |
| 91 | } |
| 92 | return ins; |
| 93 | } |
| 94 | |
| 95 | /** |
| 96 | * @brief Activates single-step debugging mode if debug operations are registered |