docs/zh_TW: relocate translations to follow the English layout
Subsystems (2)
Chen-Yu Yeh
maintainercover docs/zh_TW: relocate translations to follow the English layout
Three zh_TW translations still sit where their English originals used to live, so tools/docs/checktransupdate.py cannot find the originals at all. This series moves them, gives each a baseline, and adds the :Original: fields that were missing, as proposed in the zh_TW scope discussion:
translation moves to baseline admin-guide/security-bugs process/security-bugs 44ac5abac86b process/magic-number staging/magic-number f9a4f4a0e1f5 dev-tools/gdb-kernel-... process/debugging/gdb-kernel-.. d5af79c05e93
Each baseline is the English move commit. checktransupdate.py does not follow renames, so a commit from before a move is invisible at the new path and the tool silently falls back to reporting the file as current; the move commit is the oldest baseline it can use. Where that hides a missing change, the commit message records it (6b219431037b for gdb-kernel-debugging).
Two side effects of the tool reading one "update to commit" line per commit, which this series does not try to paper over:
- process/index.rst is touched by the moves and so inherits their baseline; the tool now lists five English index commits that the recent process series already applied.
- staging/index.rst and process/debugging/index.rst are new; the latter is listed against a592a36e4937, which only drops the index-link boilerplate that translations keep anyway.
The fourth relocation named in the proposal, arch/arm/Booting, is one of the unreachable plain-text files and is removed in a separate series instead.
This applies on top of v2 of the contact-block cleanup:
https://lore.kernel.org/linux-doc/[email protected]/
Chen-Yu Yeh (4):
docs/zh_TW: move security-bugs to process/ docs/zh_TW: move magic-number to staging/ docs/zh_TW: move gdb-kernel-debugging to process/debugging/ docs/zh_TW: add missing :Original: fields
.../zh_TW/admin-guide/clearing-warn-once.rst | 2 +
.../zh_TW/admin-guide/cpu-load.rst | 2 +
.../translations/zh_TW/admin-guide/index.rst | 1 -
.../translations/zh_TW/arch/index.rst | 2 +
.../translations/zh_TW/dev-tools/index.rst | 1 -
.../translations/zh_TW/dev-tools/sparse.rst | 4 +-
Documentation/translations/zh_TW/index.rst | 5 +-
.../debugging}/gdb-kernel-debugging.rst | 2 +-
.../zh_TW/process/debugging/index.rst | 70 +++++++++++++++++++
.../translations/zh_TW/process/index.rst | 9 +--
.../security-bugs.rst | 0
.../translations/zh_TW/staging/index.rst | 23 ++++++
.../{process => staging}/magic-number.rst | 0
13 files changed, 108 insertions(+), 13 deletions(-)
rename Documentation/translations/zh_TW/{dev-tools => process/debugging}/gdb-kernel-debugging.rst (99%)
create mode 100644 Documentation/translations/zh_TW/process/debugging/index.rst
rename Documentation/translations/zh_TW/{admin-guide => process}/security-bugs.rst (100%)
create mode 100644 Documentation/translations/zh_TW/staging/index.rst
rename Documentation/translations/zh_TW/{process => staging}/magic-number.rst (100%)Signature · 1 line
2.43.0
Chen-Yu Yeh
maintainerPATCH 1/4 docs/zh_TW: move security-bugs to process/
The English original moved from admin-guide/ to process/ in commit 44ac5abac86b ("Documentation/security-bugs: move from admin-guide/ to process/"), but the translation stayed behind. checktransupdate.py locates the English original from the translation's path, so it currently reports:
Cannot find the origin path for Documentation/translations/zh_TW/admin-guide/security-bugs.rst
Move it to match the English layout, and list it under "Dealing with bugs" in process/index.rst as the English index does. The content is unchanged; its :Original: reference already points at process/security-bugs and resolves the same way from the new location.
The translation has only had mechanical changes since it was imported in 2021, and the English document did not change between that import and its move, so the move commit is the English version this translation mirrors. It is also the oldest baseline the tool can use:checktransupdate.py does not follow renames, so a commit from before the move would make it fall back to comparing dates and report the file as up to date.
update to commit 44ac5abac86b ("Documentation/security-bugs: move from admin-guide/ to process/")
---
Documentation/translations/zh_TW/admin-guide/index.rst | 1 -
Documentation/translations/zh_TW/process/index.rst | 2 +-
.../zh_TW/{admin-guide => process}/security-bugs.rst | 0
3 files changed, 1 insertion(+), 2 deletions(-)
rename Documentation/translations/zh_TW/{admin-guide => process}/security-bugs.rst (100%)Documentation/translations/zh_TW/admin-guide/index.rst +0 -1
@@ -37,7 +37,6 @@ Todolist: reporting-issues reporting-regressions - security-bugs bug-hunting bug-bisect tainted-kernels
Documentation/translations/zh_TW/process/index.rst +1 -1
@@ -88,13 +88,13 @@ TODOList: .. toctree:: :maxdepth: 1 + security-bugs embargoed-hardware-issues TODOList: * debugging/index * handling-regressions -* security-bugs * threat-model * cve
Documentation/translations/zh_TW/process/security-bugs.rst renamed from Documentation/translations/zh_TW/admin-guide/security-bugs.rst +0 -0
Signature · 1 line
2.43.0
Weijie Yuan
maintainerRe: [PATCH 1/4] docs/zh_TW: move security-bugs to process/
Quoted 8 lines · Chen-Yu Yeh
The English original moved from admin-guide/ to process/ in commit
44ac5abac86b("Documentation/security-bugs: move from admin-guide/ to process/"), but the translation stayed behind.checktransupdate.pylocates the English original from the translation's path, so it currently reports:Cannot find the origin path for
Documentation/translations/zh_TW/admin-guide/security-bugs.rst
Yes, right.
Quoted 8 lines
Move it to match the English layout, and list it under "Dealing with bugs" in
process/index.rstas the English index does. The content is unchanged; its :Original: reference already points at process/security-bugs and resolves the same way from the new location.The translation has only had mechanical changes since it was imported in 2021, and the English document did not change between that import and its move,
Hmm, is it? What does "mechanical changes" means? Does it mean small changes like typos, format, and etc.?
Maybe I got it wrong, but I noticed that the current version has quite a few new sections and additional content, though. Am I misunderstanding something?
But I guess you might just have made a typing mistake here. The diff below should be fine.
Quoted 1 line
so the move commit is the English version this translation mirrors.
That's right.
Quoted 3 lines
It is also the oldest baseline the tool can use:
checktransupdate.pydoes not follow renames, so a commit from before the move would make it fall back to comparing dates and report the file as up to date.
Right.
Quoted 2 lines
update to commit
44ac5abac86b("Documentation/security-bugs: move from admin-guide/ to process/")
Checked, and indeed. Current translation is aligned with 44ac5ab.
Thanks.
葉宸佑
maintainerRe: [PATCH 1/4] docs/zh_TW: move security-bugs to process/
Quoted 6 lines · Weijie Yuan
Quoted 3 lines
The translation has only had mechanical changes since it was imported in 2021, and the English document did not change between that import and its move,
Hmm, is it? What does "mechanical changes" means? Does it mean small changes like typos, format, and etc.?
Yes -- changes that did not touch the translated text itself: the address updates in 2023, the tree-wide character conversion, and the path updates that came with the English move.
Quoted 3 lines
Maybe I got it wrong, but I noticed that the current version has quite a few new sections and additional content, though. Am I misunderstanding something?
Those all went in after the move. The window I meant is from the import (July 2021) to the move (March 2023), and the English file has no commits in it:
$ git log --oneline --since=2021-07-29 --until=2023-03-05 -- \
Documentation/admin-guide/security-bugs.rst
$The <N> commits since the move, including the new sections you noticed, are exactly what checktransupdate.py reports against the 44ac5abac86b baseline once this is applied. That is the point of the move: the backlog becomes visible instead of "Cannot find the origin path".
I should have written "between the import and the move" more plainly; as it stands it is easy to read as "since the import".
Thanks,
Chen-Yu
葉宸佑
maintainerRe: [PATCH 1/4] docs/zh_TW: move security-bugs to process/
Quoted 1 line · Chen-Yu Yeh
The <N> commits since the move, including the new sections you noticed,
That should read 17 -- I left a placeholder in. Sorry for the noise.
Chen-Yu
葉宸佑 <[email protected]> 於 2026年10月3日週六 下午5:53寫道:
Quoted 35 lines · Weijie Yuan
Quoted 6 lines
Quoted 3 lines
The translation has only had mechanical changes since it was imported in 2021, and the English document did not change between that import and its move,
Hmm, is it? What does "mechanical changes" means? Does it mean small changes like typos, format, and etc.?
Yes -- changes that did not touch the translated text itself: the address updates in 2023, the tree-wide character conversion, and the path updates that came with the English move.
Quoted 3 lines
Maybe I got it wrong, but I noticed that the current version has quite a few new sections and additional content, though. Am I misunderstanding something?
Those all went in after the move. The window I meant is from the import (July 2021) to the move (March 2023), and the English file has no commits in it:
$ git log --oneline --since=2021-07-29 --until=2023-03-05 -- \ Documentation/admin-guide/security-bugs.rst $The <N> commits since the move, including the new sections you noticed, are exactly what
checktransupdate.pyreports against the44ac5abac86bbaseline once this is applied. That is the point of the move: the backlog becomes visible instead of "Cannot find the origin path".I should have written "between the import and the move" more plainly; as it stands it is easy to read as "since the import".
Thanks,
Chen-Yu
Weijie Yuan
maintainerRe: [PATCH 1/4] docs/zh_TW: move security-bugs to process/
Quoted 20 lines · 葉宸佑
Quoted 1 line · Chen-Yu Yeh
The <N> commits since the move, including the new sections you noticed,
That should read 17 -- I left a placeholder in. Sorry for the noise.
Chen-Yu
葉宸佑 <[email protected]> 於 2026年10月3日週六 下午5:53寫道:
Quoted 12 lines · Weijie Yuan
Quoted 6 lines
Quoted 3 lines
The translation has only had mechanical changes since it was imported in 2021, and the English document did not change between that import and its move,
Hmm, is it? What does "mechanical changes" means? Does it mean small changes like typos, format, and etc.?
Yes -- changes that did not touch the translated text itself: the address updates in 2023, the tree-wide character conversion, and the path updates that came with the English move.
Yup.
Quoted 13 lines
Quoted 13 lines
Quoted 4 lines
Maybe I got it wrong, but I noticed that the current version has quite a few new sections and additional content, though. Am I misunderstanding something?
Those all went in after the move. The window I meant is from the import (July 2021) to the move (March 2023), and the English file has no commits in it:
$ git log --oneline --since=2021-07-29 --until=2023-03-05 -- \ Documentation/admin-guide/security-bugs.rst $
Quoted 7 lines
Quoted 7 lines
The <N> commits since the move, including the new sections you noticed, are exactly what
checktransupdate.pyreports against the44ac5abac86bbaseline once this is applied. That is the point of the move: the backlog becomes visible instead of "Cannot find the origin path".I should have written "between the import and the move" more plainly; as it stands it is easy to read as "since the import".
;) Yes, this made me take a closer look.
Thanks for the detailed explanation. So this is just a nitpick which does not matter much.
Thanks.
Chen-Yu Yeh
maintainerPATCH 2/4 docs/zh_TW: move magic-number to staging/
In reply to Chen-Yu YehThe English original moved from process/ to staging/ in commit f9a4f4a0e1f5 ("Docs: Move magic-number from process to staging"), but the translation stayed behind. checktransupdate.py locates the English original from the translation's path, so it currently reports:
Cannot find the origin path for Documentation/translations/zh_TW/process/magic-number.rst
Move it to match the English layout. zh_TW has no staging/ directory yet, so add a staging/index.rst that follows the English one, listing the documents not translated yet under TODOList as zh_CN does, and link it from the top-level index in place of its TODOList entry. The content of magic-number.rst is unchanged.
Unlike most of the tree, this translation was kept in step for a while by the English authors themselves: the 2022 series that removed stale magic numbers edited the translations as well, and so did commit dd8d4bc28ad7 ("net: remove ax25 and amateur radio (hamradio) subsystem"). The one English change it lacks is
commit cdcfc029482a ("Documentation: Fix incorrect paths/magic in magic numbers rst"), which went in after the move. Use the move commit as the baseline so that change is reported; checktransupdate.py will also list dd8d4bc28ad7, which is already reflected here.
update to commit f9a4f4a0e1f5 ("Docs: Move magic-number from process to staging")
---
Documentation/translations/zh_TW/index.rst | 5 ++--
.../translations/zh_TW/process/index.rst | 5 ----
.../translations/zh_TW/staging/index.rst | 23 +++++++++++++++++++
.../{process => staging}/magic-number.rst | 0
4 files changed, 26 insertions(+), 7 deletions(-)
create mode 100644 Documentation/translations/zh_TW/staging/index.rst
rename Documentation/translations/zh_TW/{process => staging}/magic-number.rst (100%)Documentation/translations/zh_TW/index.rst +3 -2
@@ -112,9 +112,10 @@ TODOList: 有幾份未分類的文檔似乎不適合放在文檔的其他部分,或者可能需要進行一些調整和/或 轉換爲reStructureText格式,也有可能太舊。 -TODOList: +.. toctree:: + :maxdepth: 2 -* staging/index + staging/index 術語表 ------
Documentation/translations/zh_TW/process/index.rst +0 -5
@@ -113,11 +113,6 @@ TODOList: 這裡是一些大多數開發者會感興趣的其他社群指南: -.. toctree:: - :maxdepth: 1 - - magic-number - TODOList: * kernel-docs
Documentation/translations/zh_TW/staging/index.rst new file +23 -0
@@ -0,0 +1,23 @@ +.. SPDX-License-Identifier: GPL-2.0 + +.. include:: ../disclaimer-zh_TW.rst + +:Original: Documentation/staging/index.rst + +未分類文件 +========== + +.. toctree:: + :maxdepth: 2 + + magic-number + +TODOList: + +* crc32 +* lzo +* remoteproc +* rpmsg +* speculation +* static-keys +* xz
Documentation/translations/zh_TW/staging/magic-number.rst renamed from Documentation/translations/zh_TW/process/magic-number.rst +0 -0
Signature · 1 line
2.43.0
Re: [PATCH 2/4] docs/zh_TW: move magic-number to staging/
Quoted 14 lines · Chen-Yu Yeh
The English original moved from process/ to staging/ in commit
f9a4f4a0e1f5("Docs: Move magic-number from process to staging"), but the translation stayed behind.checktransupdate.pylocates the English original from the translation's path, so it currently reports:Cannot find the origin path for
Documentation/translations/zh_TW/process/magic-number.rstMove it to match the English layout.
zh_TWhas no staging/ directory yet, so add astaging/index.rstthat follows the English one, listing the documents not translated yet under TODOList aszh_CNdoes, and link it from the top-level index in place of its TODOList entry. The content ofmagic-number.rstis unchanged.
Quoted 9 lines
Unlike most of the tree, this translation was kept in step for a while by the English authors themselves: the 2022 series that removed stale magic numbers edited the translations as well, and so did commit
dd8d4bc28ad7("net: remove ax25 and amateur radio (hamradio) subsystem"). The one English change it lacks is
commitcdcfc029482a("Documentation: Fix incorrect paths/magic in magic numbers rst"), which went in after the move. Use the move commit as the baseline so that change is reported;checktransupdate.pywill also listdd8d4bc28ad7, which is already reflected here.
Thanks for additional info ;-)
Quoted 4 lines
update to commit
f9a4f4a0e1f5("Docs: Move magic-number from process to staging")Signed-off-by Chen-Yu Yeh <[email protected]>
Quoted 78 lines
--- Documentation/translations/zh_TW/index.rst | 5 ++-- .../translations/zh_TW/process/index.rst | 5 ---- .../translations/zh_TW/staging/index.rst | 23 +++++++++++++++++++ .../{process => staging}/magic-number.rst | 0 4 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 Documentation/translations/zh_TW/staging/index.rst rename Documentation/translations/zh_TW/{process => staging}/magic-number.rst (100%)Documentation/translations/zh_TW/index.rst +3
-2@@ -112,9 +112,10 @@ TODOList: 有幾份未分類的文檔似乎不適合放在文檔的其他部分,或者可能需要進行一些調整和/或 轉換爲reStructureText格式,也有可能太舊。 -TODOList: +.. toctree:: + :maxdepth: 2 -* staging/index + staging/index 術語表 ------Documentation/translations/zh_TW/process/index.rst +0
-5@@ -113,11 +113,6 @@ TODOList: 這裡是一些大多數開發者會感興趣的其他社群指南: -.. toctree:: - :maxdepth: 1 - - magic-number - TODOList: * kernel-docsDocumentation/translations/zh_TW/staging/index.rst new file +23
-0@@ -0,0 +1,23 @@ +.. SPDX-License-Identifier: GPL-2.0 + +.. include:: ../disclaimer-zh_TW.rst + +:Original: Documentation/staging/index.rst + +未分類文件 +========== + +.. toctree:: + :maxdepth: 2 + + magic-number + +TODOList: + +* crc32 +* lzo +* remoteproc +* rpmsg +* speculation +* static-keys +* xzDocumentation/translations/zh_TW/staging/magic-number.rst renamed from Documentation/translations/zh_TW/process/magic-number.rst +0
-0Signature · 1 line
2.43.0
Chen-Yu Yeh
maintainerPATCH 3/4 docs/zh_TW: move gdb-kernel-debugging to process/debugging/
In reply to Chen-Yu YehThe English original moved from dev-tools/ to process/debugging/ in commit d5af79c05e93 ("Documentation: move dev-tools debugging files to process/debugging/"), but the translation stayed behind. checktransupdate.py locates the English original from the translation's path, so it currently reports:
Cannot find the origin path for Documentation/translations/zh_TW/dev-tools/gdb-kernel-debugging.rst
Move it to match the English layout, and fix the relative path of the disclaimer include, which is now one level deeper. zh_TW has no process/debugging/ directory yet, so add an index.rst translated from the English one, listing the guides not translated yet under TODOList, and link it from process/index.rst in place of its TODOList entry.
The baseline needs a caveat. The translation lacks
commit 6b219431037b ("docs/scripts/gdb: add necessary make scripts_gdb step"), which went in before the move, but checktransupdate.py does not follow renames and cannot report a change made at the old path. Use the move commit, the oldest baseline the tool can see, and record the missing change here instead. The tool will list
commit 09e1d93a421f ("scripts/gdb: update documentation for lx_per_cpu"), which already edited this translation, together with the one later change it really lacks, commit 7f7f468548ce ("Documentation:
Provide hints on how to debug Python GDB scripts").
For the new index.rst the tool will also list
commit a592a36e4937 ("Documentation: use a source-read extension for the index link boilerplate"); that change only removes the index-link boilerplate, which this translation does not carry.
update to commit d5af79c05e93 ("Documentation: move dev-tools debugging files to process/debugging/")
---
.../translations/zh_TW/dev-tools/index.rst | 1 -
.../debugging}/gdb-kernel-debugging.rst | 2 +-
.../zh_TW/process/debugging/index.rst | 70 +++++++++++++++++++
.../translations/zh_TW/process/index.rst | 2 +-
4 files changed, 72 insertions(+), 3 deletions(-)
rename Documentation/translations/zh_TW/{dev-tools => process/debugging}/gdb-kernel-debugging.rst (99%)
create mode 100644 Documentation/translations/zh_TW/process/debugging/index.rstDocumentation/translations/zh_TW/dev-tools/index.rst +0 -1
@@ -26,7 +26,6 @@ Documentation/translations/zh_TW/dev-tools/testing-overview.rst sparse gcov kasan - gdb-kernel-debugging Todolist:
Documentation/translations/zh_TW/process/debugging/gdb-kernel-debugging.rst renamed from Documentation/translations/zh_TW/dev-tools/gdb-kernel-debugging.rst +1 -1
@@ -1,6 +1,6 @@ .. highlight:: none -.. include:: ../disclaimer-zh_TW.rst +.. include:: ../../disclaimer-zh_TW.rst :Original: Documentation/process/debugging/gdb-kernel-debugging.rst
Documentation/translations/zh_TW/process/debugging/index.rst new file +70 -0
70 lines not on this page · raw message
Documentation/translations/zh_TW/process/index.rst +1 -1
@@ -88,12 +88,12 @@ TODOList: .. toctree:: :maxdepth: 1 + debugging/index security-bugs embargoed-hardware-issues TODOList: -* debugging/index * handling-regressions * threat-model * cve
Signature · 1 line
2.43.0
Re: [PATCH 3/4] docs/zh_TW: move gdb-kernel-debugging to process/debugging/
Quoted 26 lines · Chen-Yu Yeh
The English original moved from dev-tools/ to process/debugging/ in commit
d5af79c05e93("Documentation: move dev-tools debugging files to process/debugging/"), but the translation stayed behind.checktransupdate.pylocates the English original from the translation's path, so it currently reports:Cannot find the origin path for
Documentation/translations/zh_TW/dev-tools/gdb-kernel-debugging.rstMove it to match the English layout, and fix the relative path of the disclaimer include, which is now one level deeper.
zh_TWhas no process/debugging/ directory yet, so add anindex.rsttranslated from the English one, listing the guides not translated yet under TODOList, and link it fromprocess/index.rstin place of its TODOList entry.The baseline needs a caveat. The translation lacks
commit6b219431037b("docs/scripts/gdb: add necessary makescripts_gdbstep"), which went in before the move, butchecktransupdate.pydoes not follow renames and cannot report a change made at the old path. Use the move commit, the oldest baseline the tool can see, and record the missing change here instead. The tool will list
commit09e1d93a421f("scripts/gdb: update documentation forlx_per_cpu"), which already edited this translation, together with the one later change it really lacks, commit7f7f468548ce("Documentation:
Provide hints on how to debug Python GDB scripts").
Quoted 4 lines
For the new
index.rstthe tool will also list
commita592a36e4937("Documentation: use a source-read extension for the index link boilerplate"); that change only removes the index-link boilerplate, which this translation does not carry.
I actually think the script is getting in the way a bit. Its output is only meant to serve as a reference, not something that forces us to constantly worry about how the script behaves. For example, when the script cannot detect renames, wouldn't it be simpler to just update the translation as usual? But anyway,
Quoted 4 lines
update to commit
d5af79c05e93("Documentation: move dev-tools debugging files to process/debugging/")Signed-off-by Chen-Yu Yeh <[email protected]>
Quoted 133 lines
--- .../translations/zh_TW/dev-tools/index.rst | 1 - .../debugging}/gdb-kernel-debugging.rst | 2 +- .../zh_TW/process/debugging/index.rst | 70 +++++++++++++++++++ .../translations/zh_TW/process/index.rst | 2 +- 4 files changed, 72 insertions(+), 3 deletions(-) rename Documentation/translations/zh_TW/{dev-tools => process/debugging}/gdb-kernel-debugging.rst (99%) create mode 100644 Documentation/translations/zh_TW/process/debugging/index.rstDocumentation/translations/zh_TW/dev-tools/index.rst +0
-1@@ -26,7 +26,6 @@ Documentation/translations/zh_TW/dev-tools/testing-overview.rst sparse gcov kasan - gdb-kernel-debugging Todolist:Documentation/translations/zh_TW/process/debugging/gdb-kernel-debugging.rst renamed from Documentation/translations/zh_TW/dev-tools/gdb-kernel-debugging.rst +1
-1@@ -1,6 +1,6 @@ .. highlight:: none -.. include:: ../disclaimer-zh_TW.rst +.. include:: ../../disclaimer-zh_TW.rst :Original: Documentation/process/debugging/gdb-kernel-debugging.rstDocumentation/translations/zh_TW/process/debugging/index.rst new file +70
-0@@ -0,0 +1,70 @@ +.. SPDX-License-Identifier: GPL-2.0 + +.. include:: ../../disclaimer-zh_TW.rst + +:Original: Documentation/process/debugging/index.rst + +============================ +給Linux核心開發者的除錯建議 +============================ + +一般指南 +-------- + +.. toctree:: + :maxdepth: 1 + + gdb-kernel-debugging + +TODOList: + +* driver_development_debugging_guide +* kgdb +* userspace_debugging_guide + +特定子系統指南 +-------------- + +TODOList: + +* media_specific_debugging_guide + +一般除錯建議 +============ + +視問題而定,可用來追蹤問題、甚至用來確認問題是否真的存在的工具也各不相同。 + +第一步,你必須先弄清楚要除錯的是哪一類問題。根據答案的不同,你的方法與 +工具選擇也可能有所不同。 + +我是否需要在存取受限的情況下除錯? +---------------------------------- + +你對機器的存取是否受到限制,或是無法中斷正在進行的執行? + +在這種情況下,你的除錯能力取決於發行版所提供的核心內建的除錯支援。 +Documentation/process/debugging/userspace_debugging_guide.rst 簡要介紹了在 +這種情況下可用的各種除錯工具。在大多數情況下,你可以查看/boot目錄中的 +設定檔,來確認你的核心具備哪些功能。 + +我是否擁有系統的root存取權限? +------------------------------ + +你能否輕易地替換有問題的模組,或安裝新的核心? + +若是如此,你可用的工具就多得多,相關工具請參見 +Documentation/process/debugging/driver_development_debugging_guide.rst 。 + +時序是否是影響因素? +-------------------- + +重要的是弄清楚你要除錯的問題是穩定重現(也就是給定一組輸入時,總是得到 +相同的錯誤輸出),還是時有時無。如果問題時有時無,可能有某種時序因素在 +作用。如果在程式碼中插入延遲確實會改變其行為,那麼時序很可能就是其中一個 +因素。 + +當時序確實會改變程式碼的執行結果時,用簡單的printk()來除錯可能行不通; +類似的替代方案是使用trace_printk(),它會把除錯訊息記錄到追蹤檔案,而不是 +核心日誌。 + +**Copyright** ©2024 : CollaboraDocumentation/translations/zh_TW/process/index.rst +1
-1@@ -88,12 +88,12 @@ TODOList: .. toctree:: :maxdepth: 1 + debugging/index security-bugs embargoed-hardware-issues TODOList: -* debugging/index * handling-regressions * threat-model * cveSignature · 1 line
2.43.0
葉宸佑
maintainerRe: [PATCH 3/4] docs/zh_TW: move gdb-kernel-debugging to process/debugging/
Quoted 5 lines · Weijie Yuan
I actually think the script is getting in the way a bit. Its output is only meant to serve as a reference, not something that forces us to constantly worry about how the script behaves. For example, when the script cannot detect renames, wouldn't it be simpler to just update the translation as usual?
I lean on it more than that, I think. It is the only way we can tell which translations are behind and by how much -- the scope proposal was built on its numbers -- and the "update to commit" line is what keeps those numbers honest. A move without one would make the tool treat the file as current, and we would lose sight of exactly the files we have just started tracking.
Where I agree is that this is bookkeeping, not the goal. Updating the translation as usual is the real fix: whoever does it records the English commit they synced to, and the rename question goes away. The rename gap itself is a limitation of the tool, and the better place to fix it is in checktransupdate.py rather than in notes like this one.
Thanks,
Chen-Yu
Weijie Yuan <[email protected]> 於 2026年10月3日週六 下午12:19寫道:
Quoted 180 lines · Chen-Yu Yeh
Quoted 27 lines
The English original moved from dev-tools/ to process/debugging/ in commit
d5af79c05e93("Documentation: move dev-tools debugging files to process/debugging/"), but the translation stayed behind.checktransupdate.pylocates the English original from the translation's path, so it currently reports:Cannot find the origin path for
Documentation/translations/zh_TW/dev-tools/gdb-kernel-debugging.rstMove it to match the English layout, and fix the relative path of the disclaimer include, which is now one level deeper.
zh_TWhas no process/debugging/ directory yet, so add anindex.rsttranslated from the English one, listing the guides not translated yet under TODOList, and link it fromprocess/index.rstin place of its TODOList entry.The baseline needs a caveat. The translation lacks
commit6b219431037b("docs/scripts/gdb: add necessary makescripts_gdbstep"), which went in before the move, butchecktransupdate.pydoes not follow renames and cannot report a change made at the old path. Use the move commit, the oldest baseline the tool can see, and record the missing change here instead. The tool will list
commit09e1d93a421f("scripts/gdb: update documentation forlx_per_cpu"), which already edited this translation, together with the one later change it really lacks, commit7f7f468548ce("Documentation:
Provide hints on how to debug Python GDB scripts").Quoted 4 lines
For the new
index.rstthe tool will also list
commita592a36e4937("Documentation: use a source-read extension for the index link boilerplate"); that change only removes the index-link boilerplate, which this translation does not carry.I actually think the script is getting in the way a bit. Its output is only meant to serve as a reference, not something that forces us to constantly worry about how the script behaves. For example, when the script cannot detect renames, wouldn't it be simpler to just update the translation as usual? But anyway,
Quoted 4 lines
update to commit
d5af79c05e93("Documentation: move dev-tools debugging files to process/debugging/")Signed-off-by Chen-Yu Yeh <[email protected]>Reviewed-by Weijie Yuan <[email protected]>Quoted 133 lines
--- .../translations/zh_TW/dev-tools/index.rst | 1 - .../debugging}/gdb-kernel-debugging.rst | 2 +- .../zh_TW/process/debugging/index.rst | 70 +++++++++++++++++++ .../translations/zh_TW/process/index.rst | 2 +- 4 files changed, 72 insertions(+), 3 deletions(-) rename Documentation/translations/zh_TW/{dev-tools => process/debugging}/gdb-kernel-debugging.rst (99%) create mode 100644 Documentation/translations/zh_TW/process/debugging/index.rstDocumentation/translations/zh_TW/dev-tools/index.rst +0
-1@@ -26,7 +26,6 @@ Documentation/translations/zh_TW/dev-tools/testing-overview.rst sparse gcov kasan - gdb-kernel-debugging Todolist:Documentation/translations/zh_TW/process/debugging/gdb-kernel-debugging.rst renamed from Documentation/translations/zh_TW/dev-tools/gdb-kernel-debugging.rst +1
-1@@ -1,6 +1,6 @@ .. highlight:: none -.. include:: ../disclaimer-zh_TW.rst +.. include:: ../../disclaimer-zh_TW.rst :Original: Documentation/process/debugging/gdb-kernel-debugging.rstDocumentation/translations/zh_TW/process/debugging/index.rst new file +70
-0@@ -0,0 +1,70 @@ +.. SPDX-License-Identifier: GPL-2.0 + +.. include:: ../../disclaimer-zh_TW.rst + +:Original: Documentation/process/debugging/index.rst + +============================ +給Linux核心開發者的除錯建議 +============================ + +一般指南 +-------- + +.. toctree:: + :maxdepth: 1 + + gdb-kernel-debugging + +TODOList: + +* driver_development_debugging_guide +* kgdb +* userspace_debugging_guide + +特定子系統指南 +-------------- + +TODOList: + +* media_specific_debugging_guide + +一般除錯建議 +============ + +視問題而定,可用來追蹤問題、甚至用來確認問題是否真的存在的工具也各不相同。 + +第一步,你必須先弄清楚要除錯的是哪一類問題。根據答案的不同,你的方法與 +工具選擇也可能有所不同。 + +我是否需要在存取受限的情況下除錯? +---------------------------------- + +你對機器的存取是否受到限制,或是無法中斷正在進行的執行? + +在這種情況下,你的除錯能力取決於發行版所提供的核心內建的除錯支援。 +Documentation/process/debugging/userspace_debugging_guide.rst 簡要介紹了在 +這種情況下可用的各種除錯工具。在大多數情況下,你可以查看/boot目錄中的 +設定檔,來確認你的核心具備哪些功能。 + +我是否擁有系統的root存取權限? +------------------------------ + +你能否輕易地替換有問題的模組,或安裝新的核心? + +若是如此,你可用的工具就多得多,相關工具請參見 +Documentation/process/debugging/driver_development_debugging_guide.rst 。 + +時序是否是影響因素? +-------------------- + +重要的是弄清楚你要除錯的問題是穩定重現(也就是給定一組輸入時,總是得到 +相同的錯誤輸出),還是時有時無。如果問題時有時無,可能有某種時序因素在 +作用。如果在程式碼中插入延遲確實會改變其行為,那麼時序很可能就是其中一個 +因素。 + +當時序確實會改變程式碼的執行結果時,用簡單的printk()來除錯可能行不通; +類似的替代方案是使用trace_printk(),它會把除錯訊息記錄到追蹤檔案,而不是 +核心日誌。 + +**Copyright** ©2024 : CollaboraDocumentation/translations/zh_TW/process/index.rst +1
-2@@ -88,12 +88,12 @@ TODOList: .. toctree:: :maxdepth: 1 + debugging/index security-bugs embargoed-hardware-issues TODOList: -* debugging/index * handling-regressions * threat-model * cve --2.43.0
Chen-Yu Yeh
maintainerPATCH 4/4 docs/zh_TW: add missing :Original: fields
In reply to Chen-Yu YehEvery zh_TW translation names the English document it mirrors in an :Original: field, except these four. Add one to each, in the plain path form that automarkup turns into a link.
dev-tools/sparse.rst still carries the old plain-text header rather than the disclaimer include, so its field goes at the top of the file.
With this, the only .rst files without the field are index.rst, disclaimer-zh_TW.rst and glossary.rst, none of which translates an English document.
--- .../translations/zh_TW/admin-guide/clearing-warn-once.rst | 2 ++ Documentation/translations/zh_TW/admin-guide/cpu-load.rst | 2 ++ Documentation/translations/zh_TW/arch/index.rst | 2 ++ Documentation/translations/zh_TW/dev-tools/sparse.rst | 4 +++- 4 files changed, 9 insertions(+), 1 deletion(-)
Documentation/translations/zh_TW/admin-guide/clearing-warn-once.rst +2 -0
@@ -2,6 +2,8 @@ .. include:: ../disclaimer-zh_TW.rst +:Original: Documentation/admin-guide/clearing-warn-once.rst + 清除 WARN_ONCE --------------
Documentation/translations/zh_TW/admin-guide/cpu-load.rst +2 -0
@@ -2,6 +2,8 @@ .. include:: ../disclaimer-zh_TW.rst +:Original: Documentation/admin-guide/cpu-load.rst + ======== CPU 負載 ========
Documentation/translations/zh_TW/arch/index.rst +2 -0
@@ -1,5 +1,7 @@ .. SPDX-License-Identifier: GPL-2.0 +:Original: Documentation/arch/index.rst + 處理器體系結構 ==============
Documentation/translations/zh_TW/dev-tools/sparse.rst +3 -1
@@ -1,4 +1,6 @@ -Chinese translated version of Documentation/dev-tools/sparse.rst +:Original: Documentation/dev-tools/sparse.rst + +Chinese translated version of Documentation/dev-tools/sparse.rst If you have any comment or update to the content, please contact the original document maintainer directly. However, if you have a problem
Signature · 1 line
2.43.0
Re: [PATCH 4/4] docs/zh_TW: add missing :Original: fields
Quoted 3 lines · Chen-Yu Yeh
Every
zh_TWtranslation names the English document it mirrors in an :Original: field, except these four. Add one to each, in the plain path form that automarkup turns into a link.
I'm wondering, are these :Original: fields useful anymore since the translations extension adds the button to switch between languages?
The pretty much hard-coded expectation is that the English version at path/to/foo.rst is the original, and its translations are at translations/xx_YY/path/to/foo.rst.
I.e. neither the HTML nor the RST benefit from it, and it's just repetition.
BR,
Jani.
Quoted 66 lines
dev-tools/sparse.rststill carries the old plain-text header rather than the disclaimer include, so its field goes at the top of the file.With this, the only .rst files without the field are
index.rst,disclaimer-zh_TW.rstandglossary.rst, none of which translates an English document.Signed-off-by Chen-Yu Yeh <[email protected]>--- .../translations/zh_TW/admin-guide/clearing-warn-once.rst | 2 ++ Documentation/translations/zh_TW/admin-guide/cpu-load.rst | 2 ++ Documentation/translations/zh_TW/arch/index.rst | 2 ++ Documentation/translations/zh_TW/dev-tools/sparse.rst | 4 +++- 4 files changed, 9 insertions(+), 1 deletion(-)Documentation/translations/zh_TW/admin-guide/clearing-warn-once.rst +2
-0@@ -2,6 +2,8 @@ .. include:: ../disclaimer-zh_TW.rst +:Original: Documentation/admin-guide/clearing-warn-once.rst + 清除 WARN_ONCE --------------Documentation/translations/zh_TW/admin-guide/cpu-load.rst +2
-0@@ -2,6 +2,8 @@ .. include:: ../disclaimer-zh_TW.rst +:Original: Documentation/admin-guide/cpu-load.rst + ======== CPU 負載 ========Documentation/translations/zh_TW/arch/index.rst +2
-0@@ -1,5 +1,7 @@ .. SPDX-License-Identifier: GPL-2.0 +:Original: Documentation/arch/index.rst + 處理器體系結構 ==============Documentation/translations/zh_TW/dev-tools/sparse.rst +3
-1@@ -1,4 +1,6 @@ -Chinese translated version of Documentation/dev-tools/sparse.rst +:Original: Documentation/dev-tools/sparse.rst + +Chinese translated version of Documentation/dev-tools/sparse.rst If you have any comment or update to the content, please contact the original document maintainer directly. However, if you have a problem
Signature · 1 line
Jani Nikula, Intel
葉宸佑
maintainerRe: [PATCH 4/4] docs/zh_TW: add missing :Original: fields
You are right, and I should have seen it -- the rest of this series is built on that same expectation. checktransupdate.py also finds the original purely from the path, which is why 1/4-3/4 move the files rather than fix their :Original: fields. By the same token, at their old paths the language switcher cannot pair them with their originals either, which is a better argument for the moves than the one I gave.
Thanks,
Chen-Yu
Re: [PATCH 4/4] docs/zh_TW: add missing :Original: fields
Quoted 6 lines · 葉宸佑
You are right, and I should have seen it -- the rest of this series is built on that same expectation.
checktransupdate.pyalso finds the original purely from the path, which is why 1/4-3/4 move the files rather than fix their :Original: fields. By the same token, at their old paths the language switcher cannot pair them with their originals either, which is a better argument for the moves than the one I gave.
Oh, by the way, I do think the series as a whole is worthwhile cleanup, and having the :Original: fields is the current practice. Removing them should be a separate change.
BR,
Jani.
Signature · 1 line
Jani Nikula, Intel
葉宸佑
maintainerRe: [PATCH 4/4] docs/zh_TW: add missing :Original: fields
Quoted 3 lines · Jani Nikula
Oh, by the way, I do think the series as a whole is worthwhile cleanup, and having the :Original: fields is the current practice. Removing them should be a separate change.
That makes sense -- 4/4 only brings these four in line with current practice, and whether the practice itself should change is a separate question. So I take back what I said about dropping it.
Thanks,
Chen-Yu
Weijie Yuan
maintainerRe: [PATCH 4/4] docs/zh_TW: add missing :Original: fields
In reply to Jani NikulaHi,
Quoted 14 lines · Jani Nikula
Quoted 3 lines · Chen-Yu Yeh
Every
zh_TWtranslation names the English document it mirrors in an :Original: field, except these four. Add one to each, in the plain path form that automarkup turns into a link.I'm wondering, are these :Original: fields useful anymore since the translations extension adds the button to switch between languages?
The pretty much hard-coded expectation is that the English version at
path/to/foo.rstis the original, and its translations are attranslations/xx_YY/path/to/foo.rst.I.e. neither the HTML nor the RST benefit from it, and it's just repetition.
Quoted 11 lines · Jani Nikula
Quoted 6 lines · 葉宸佑
You are right, and I should have seen it -- the rest of this series is built on that same expectation.
checktransupdate.pyalso finds the original purely from the path, which is why 1/4-3/4 move the files rather than fix their :Original: fields. By the same token, at their old paths the language switcher cannot pair them with their originals either, which is a better argument for the moves than the one I gave.Oh, by the way, I do think the series as a whole is worthwhile cleanup, and having the :Original: fields is the current practice. Removing them should be a separate change.
I am a newcomer and might lack contextual information, but I don't see anything rely heavily on this field either? I only find that on March this year, Jon did not expect that the script checktransupdate.py uses this field to get the original file of each translation.
So is this a convention or is there some additional circumstance that forces us to keep this field?
Hmm, btw, I noticed that the Japanese translations do not have this field.
Thanks.
Re: [PATCH 4/4] docs/zh_TW: add missing :Original: fields
In reply to Chen-Yu YehQuoted 4 lines · Chen-Yu Yeh
Every
zh_TWtranslation names the English document it mirrors in an :Original: field, except these four. Add one to each, in the plain path form that automarkup turns into a link.
Quoted 8 lines
dev-tools/sparse.rststill carries the old plain-text header rather than the disclaimer include, so its field goes at the top of the file.With this, the only .rst files without the field are
index.rst,disclaimer-zh_TW.rstandglossary.rst, none of which translates an English document.Signed-off-by Chen-Yu Yeh <[email protected]>
So let's follow the usual practice for now, until we make a decision in the future.
Quoted 6 lines
--- .../translations/zh_TW/admin-guide/clearing-warn-once.rst | 2 ++ Documentation/translations/zh_TW/admin-guide/cpu-load.rst | 2 ++ Documentation/translations/zh_TW/arch/index.rst | 2 ++ Documentation/translations/zh_TW/dev-tools/sparse.rst | 4 +++- 4 files changed, 9 insertions(+), 1 deletion(-)