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
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
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
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
Contributor

Choose a reason for hiding this comment

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

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

Copy link
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
@@ -1,7 +1,7 @@
# Doxyfile 1.9.1

Check failure on line 1 in documentation/doxygen/Doxyfile

View workflow job for this annotation

GitHub Actions / Check Spelling

`Doxyfile` is not a recognized word. (unrecognized-spelling)

# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project.

Check failure on line 4 in documentation/doxygen/Doxyfile

View workflow job for this annotation

GitHub Actions / Check Spelling

`doxygen` is not a recognized word. (unrecognized-spelling)
#
# All text after a double hash (##) is considered a comment and is placed in
# front of the TAG it is preceding.
Expand All @@ -19,20 +19,20 @@

# This tag specifies the encoding used for all characters in the configuration
# file that follow. The default is UTF-8 which is also the encoding used for all
# text before the first occurrence of this tag. Doxygen uses libiconv (or the

Check failure on line 22 in documentation/doxygen/Doxyfile

View workflow job for this annotation

GitHub Actions / Check Spelling

`Doxygen` is not a recognized word. (unrecognized-spelling)

Check failure on line 22 in documentation/doxygen/Doxyfile

View workflow job for this annotation

GitHub Actions / Check Spelling

`libiconv` is not a recognized word. (unrecognized-spelling)
# iconv built into libc) for the transcoding. See
# https://www.gnu.org/software/libiconv/ for the list of possible encodings.
# The default value is: UTF-8.

DOXYFILE_ENCODING = UTF-8

Check failure on line 27 in documentation/doxygen/Doxyfile

View workflow job for this annotation

GitHub Actions / Check Spelling

`DOXYFILE` is not a recognized word. (unrecognized-spelling)

# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
# double-quotes, unless you are using Doxywizard) that should identify the

Check failure on line 30 in documentation/doxygen/Doxyfile

View workflow job for this annotation

GitHub Actions / Check Spelling

`Doxywizard` is not a recognized word. (unrecognized-spelling)
# project for which the documentation is generated. This name is used in the
# title of most generated pages and in a few other places.
# The default value is: My Project.

PROJECT_NAME = "RT-Thread RTOS"

Check failure on line 35 in documentation/doxygen/Doxyfile

View workflow job for this annotation

GitHub Actions / Check Spelling

`RTOS` is not a recognized word. (unrecognized-spelling)

# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
Expand All @@ -51,7 +51,7 @@
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
# the logo to the output directory.

PROJECT_LOGO = ./images/rtthread_logo.png

Check failure on line 54 in documentation/doxygen/Doxyfile

View workflow job for this annotation

GitHub Actions / Check Spelling

`rtthread` is not a recognized word. (unrecognized-spelling)

# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
# into which the generated documentation will be written. If a relative path is
Expand All @@ -60,7 +60,7 @@

OUTPUT_DIRECTORY = .

# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-

Check failure on line 63 in documentation/doxygen/Doxyfile

View workflow job for this annotation

GitHub Actions / Check Spelling

`SUBDIRS` is not a recognized word. (unrecognized-spelling)
# directories (in 2 levels) under the output directory of each output format and
# will distribute the generated files over these directories. Enabling this
# option can be useful when feeding doxygen a huge amount of source files, where
Expand Down Expand Up @@ -103,7 +103,7 @@

# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
# descriptions after the members that are listed in the file and class
# documentation (similar to Javadoc). Set to NO to disable this.

Check failure on line 106 in documentation/doxygen/Doxyfile

View workflow job for this annotation

GitHub Actions / Check Spelling

`Javadoc` is not a recognized word. (unrecognized-spelling)
# The default value is: YES.

BRIEF_MEMBER_DESC = NO
Expand Down Expand Up @@ -870,7 +870,8 @@
../../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 Expand Up @@ -1289,7 +1290,7 @@
# Minimum value: 40, maximum value: 240, default value: 80.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_COLORSTYLE_GAMMA = 80

Check warning on line 1293 in documentation/doxygen/Doxyfile

View workflow job for this annotation

GitHub Actions / Check Spelling

`COLORSTYLE` is not a recognized word -- found 6 times. (limited-references)

# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
# page will contain the date and time when the page was generated. Setting this
Expand Down Expand Up @@ -1653,18 +1654,18 @@
MATHJAX_EXTENSIONS =

# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
# of code that will be used on startup of the MathJax code. See the MathJax site

Check warning on line 1657 in documentation/doxygen/Doxyfile

View workflow job for this annotation

GitHub Actions / Check Spelling

`Jax` is not a recognized word -- found 14 times. (limited-references)
# (see:
# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.

MATHJAX_CODEFILE =

Check warning on line 1663 in documentation/doxygen/Doxyfile

View workflow job for this annotation

GitHub Actions / Check Spelling

`MATHJAX` is not a recognized word -- found 16 times. (limited-references)

# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
# the HTML output. The underlying search engine uses javascript and DHTML and
# should work on any modern browser. Note that when using HTML help
# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)

Check warning on line 1668 in documentation/doxygen/Doxyfile

View workflow job for this annotation

GitHub Actions / Check Spelling

`DOCSET` is not a recognized word -- found 13 times. (limited-references)

Check warning on line 1668 in documentation/doxygen/Doxyfile

View workflow job for this annotation

GitHub Actions / Check Spelling

`HTMLHELP` is not a recognized word -- found 9 times. (limited-references)
# there is already a search function so this one should typically be disabled.
# For large projects the javascript based search engine can be slow, then
# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
Expand Down Expand Up @@ -1796,7 +1797,7 @@
# The default value is: makeindex.
# This tag requires that the tag GENERATE_LATEX is set to YES.

LATEX_MAKEINDEX_CMD = makeindex

Check warning on line 1800 in documentation/doxygen/Doxyfile

View workflow job for this annotation

GitHub Actions / Check Spelling

`MAKEINDEX` is not a recognized word -- found 6 times. (limited-references)

# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
# documents. This may be useful for small projects and may help to save some
Expand Down Expand Up @@ -2111,7 +2112,7 @@
# The default value is: NO.
# This tag requires that the tag GENERATE_DOCBOOK is set to YES.

DOCBOOK_PROGRAMLISTING = NO

Check warning on line 2115 in documentation/doxygen/Doxyfile

View workflow job for this annotation

GitHub Actions / Check Spelling

`DOCBOOK` is not a recognized word -- found 11 times. (limited-references)

#---------------------------------------------------------------------------
# Configuration options for the AutoGen Definitions output
Expand Down Expand Up @@ -2562,7 +2563,7 @@

# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the
# path where java can find the plantuml.jar file. If left blank, it is assumed
# PlantUML is not used or called during a preprocessing step. Doxygen will

Check warning on line 2566 in documentation/doxygen/Doxyfile

View workflow job for this annotation

GitHub Actions / Check Spelling

`Doxygen` is not a recognized word -- found 40 times. (limited-references)
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.

Expand Down
Loading