Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 63 additions & 2 deletions components/lwp/lwp_dbg.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
/*
* Copyright (c) 2006-2023, RT-Thread Development Team
* Copyright (c) 2006-2025 RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2023-07-11 RT-Thread first version
* 2025-01-16 wumingzi add doxyzen comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不需要,采用 git 后,写好你的 commit message,加上你的 signed-off 即可。

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commit message我改一下,但是change log也应该保留?有的人开发可能不使用git,况且为了代码风格一致也应该保留吧

Copy link
Copy Markdown
Contributor

@unicornx unicornx Jan 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commit message我改一下,但是change log也应该保留?有的人开发可能不使用git,况且为了代码风格一致也应该保留吧

change log 随便你吧。

有的人开发可能不使用git

??? 这样的人如果也能给 RTT 提 PR,那么我服了

*/

#ifndef __LWP_DBG_H__
Expand All @@ -15,15 +16,75 @@
#include <rthw.h>
#include <lwp.h>

/**
* addtogroup KernelService
* @defgroup lwp lwp
* @brief lwp api
* @ingroup KernelService
* @addtogroup lwp
*@{
*/

/**
* @brief Get lwp debug state
* @return int lwp debug state code
*/
int dbg_thread_in_debug(void);

/**
* @brief Register dbg_ops to struct dbg_ops_t
* @param dbg_ops Pointer to dbg_ops_t that contains function pointers for various debugging operations.
*/
void dbg_register(struct dbg_ops_t *dbg_ops);

/**
* @brief Get lwp instructure state
* @return Return the architecture number
*/
uint32_t dbg_get_ins(void);

/**
* @brief Enable step debug feature
*/
void dbg_activate_step(void);

/**
* @brief Disable step debug feature
*/
void dbg_deactivate_step(void);

/**
* @brief Check event for related instruction by exception state register
* @param regs Pointer to exception stack with type struct rt_hw_exp_stack *
* @param esr Address of exception state register
* @return Return the debug event number
*/
int dbg_check_event(struct rt_hw_exp_stack *regs, unsigned long esr);

/**
* @brief Get gdb server channel and prepared by rt_channel_t
* @return Return a Pointer to rt_channel_t
*/
rt_channel_t gdb_server_channel(void);

/**
* @brief Get debug step type
* @return Return the debug step type
*/
int dbg_step_type(void);

/**
* @brief Start debug attach request
* @param pc Pointer to programe counter
*/
void dbg_attach_req(void *pc);

/**
* @brief Suspend debug attach request
* @return Return result of suspend operation and 0 is failed.
*/
int dbg_check_suspend(void);

#endif /* __LWP_DBG_H__ */
/*! @}*/

#endif /* __LWP_DBG_H__ */
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这是什么改动?你是不是多删除了行尾的空行?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是的,我使用formatting工具格式化出来的就是这样。之前我给写驱动的时候尝试添加空行,可是ci过不去。虽然在某些ide上可能会有warning,但我没发现社区有反馈过这个问题的,所以先确保合入主线吧

3 changes: 2 additions & 1 deletion documentation/doxygen/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,8 @@ INPUT = ../../src \
../../components/finsh \
../../components/drivers/include/drivers \
../../components/dfs/dfs_v2/src \
../../components/dfs/dfs_v2/include
../../components/dfs/dfs_v2/include \
../../components/lwp \

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down