11/*
2- * Copyright (c) 2006-2023, RT-Thread Development Team
2+ * Copyright (c) 2006-2025 RT-Thread Development Team
33 *
44 * SPDX-License-Identifier: Apache-2.0
55 *
66 * Change Logs:
77 * Date Author Notes
88 * 2023-07-11 RT-Thread first version
9+ * 2025-01-16 wumingzi add doxyzen comment
910 */
1011
1112#ifndef __LWP_DBG_H__
1516#include <rthw.h>
1617#include <lwp.h>
1718
19+ /**
20+ * @brief Get lwp debug state
21+ *
22+ * @return int lwp debug state
23+ * @ingroup lwp
24+ */
1825int dbg_thread_in_debug (void );
26+
27+ /**
28+ * @brief Register dbg_ops to struct dbg_ops_t
29+ *
30+ * @param dbg_ops
31+ * @return void
32+ * @ingroup lwp
33+ */
1934void dbg_register (struct dbg_ops_t * dbg_ops );
35+
36+ /**
37+ * @brief Get lwp instructure state
38+ *
39+ * @return uint32_t
40+ * @ingroup lwp
41+ */
2042uint32_t dbg_get_ins (void );
43+
44+ /**
45+ * @brief Enable step debug feature
46+ *
47+ * @return void
48+ * @ingroup lwp
49+ */
2150void dbg_activate_step (void );
51+
52+ /**
53+ * @brief Disable step debug feature
54+ *
55+ * @ingroup lwp
56+ */
2257void dbg_deactivate_step (void );
58+
59+ /**
60+ * @brief Check event for related instruction by error state register
61+ *
62+ * @param regs
63+ * @param esr
64+ * @return int
65+ * @ingroup lwp
66+ */
2367int dbg_check_event (struct rt_hw_exp_stack * regs , unsigned long esr );
68+
69+ /**
70+ * @brief Get gdb server channel and prepared by rt_channel_t
71+ *
72+ * @return rt_channel_t
73+ * @ingroup lwp
74+ */
2475rt_channel_t gdb_server_channel (void );
76+
77+ /**
78+ * @brief Get debug step type
79+ *
80+ * @return int
81+ * @ingroup lwp
82+ */
2583int dbg_step_type (void );
84+
85+ /**
86+ * @brief Start debug attach request
87+ *
88+ * @param pc
89+ * @ingroup lwp
90+ */
2691void dbg_attach_req (void * pc );
92+
93+ /**
94+ * @brief Suspend debug attach requestt
95+ *
96+ * @return int
97+ * @ingroup lwp
98+ */
2799int dbg_check_suspend (void );
28100
29- #endif /* __LWP_DBG_H__ */
101+ #endif /* __LWP_DBG_H__ */
0 commit comments