Repository navigation
Expand file tree
/
Copy pathremote_debugging.po
More file actions
1471 lines (1317 loc) · 69.9 KB
/
Copy pathremote_debugging.po
File metadata and controls
1471 lines (1317 loc) · 69.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001 Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# python-doc bot, 2025
# Inada Naoki <songofacandy@gmail.com>, 2026
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.15\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-11-05 20:53+0000\n"
"PO-Revision-Date: 2025-09-16 00:00+0000\n"
"Last-Translator: Inada Naoki <songofacandy@gmail.com>, 2026\n"
"Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/"
"ja/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ja\n"
"Plural-Forms: nplurals=1; plural=0;\n"
msgid "Remote debugging attachment protocol"
msgstr "リモートデバッグのアタッチプロトコル"
msgid ""
"This protocol enables external tools to attach to a running CPython process "
"and execute Python code remotely."
msgstr ""
"このプロトコルを使うと、外部ツールから実行中の CPython プロセスにアタッチし、"
"Python コードをリモートで実行できます。"
msgid ""
"Attaching to another Python process may require additional permissions or "
"configuration, depending on the platform."
msgstr ""
"別の Python プロセスへのアタッチには、プラットフォームによって追加の権限や設"
"定が必要な場合があります。"
msgid "Disabling remote debugging"
msgstr "リモートデバッグの無効化"
msgid "To disable remote debugging support, use any of the following:"
msgstr "リモートデバッグのサポートを無効にするには、次のいずれかを使います。"
msgid ""
"Set the :envvar:`PYTHON_DISABLE_REMOTE_DEBUG` environment variable to ``1`` "
"before starting the interpreter."
msgstr ""
"インタープリタを起動する前に、環境変数 :envvar:`PYTHON_DISABLE_REMOTE_DEBUG` "
"を ``1`` に設定します。"
msgid "Use the :option:`-X disable-remote-debug` command-line option."
msgstr ""
"コマンドラインオプション :option:`-X disable-remote-debug` を使います。"
msgid "Compile Python with the :option:`--without-remote-debug` build flag."
msgstr ""
"ビルドフラグ :option:`--without-remote-debug` を指定して Python をコンパイル"
"します。"
msgid "Permission requirements"
msgstr "必要な権限"
msgid ""
"Attaching to a running Python process for remote debugging requires special "
"configuration on most platforms. The specific requirements and "
"troubleshooting steps depend on your operating system:"
msgstr ""
"リモートデバッグのために実行中の Python プロセスにアタッチするには、ほとんど"
"のプラットフォームで特別な設定が必要です。\n"
"具体的な要件と問題の解決手順は、オペレーティングシステムによって異なります。"
#: ../../howto/remote_debugging.rst:32
msgid "Linux"
msgstr "Linux"
msgid ""
"In general, you can debug your own processes, but there are several common "
"configurations that may disable this. Some Linux distributions enable "
"**ptrace restrictions**, aka \"Yama,\" as a form of system hardening. Recent "
"versions of the ``setpriv`` command (util-linux 2.41, released June 2025) "
"let you loosen ptrace restrictions on a per-process basis:"
msgstr ""
"通常は自分のプロセスをデバッグできますが、よく使われる設定の中にはそれを無効"
"にするものがあります。\n"
"一部の Linux ディストリビューションでは、システムのセキュリティを強化するため"
"に **ptrace の制限** (別名「Yama」) を有効にしています。\n"
"最近の ``setpriv`` コマンド (2025 年 6 月リリースの util-linux 2.41) を使う"
"と、プロセスごとに ptrace の制限を緩められます。"
msgid "``setpriv --ptracer any python3``"
msgstr "``setpriv --ptracer any python3``"
msgid ""
"(This is configured on the process *being debugged*.) You can also turn off "
"ptrace restrictions for all processes until reboot with:"
msgstr ""
"(この設定は *デバッグ対象の* プロセスに対して行います。) 次のコマンドで、再起"
"動するまで全プロセスの ptrace の制限を無効にすることもできます。"
msgid "``echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope``"
msgstr "``echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope``"
msgid "This can also be configured persistently, usually in ``/etc/sysctl.d``."
msgstr "通常は ``/etc/sysctl.d`` で、この設定を永続化することもできます。"
msgid ""
"Disabling ``ptrace_scope`` reduces system hardening and should only be done "
"in low-security environments."
msgstr ""
"``ptrace_scope`` を無効にするとシステムのセキュリティが弱まるため、安全性の要"
"求が低い環境でのみ行ってください。"
msgid ""
"It is also possible that the ``ptrace`` system call is disabled because of a "
"security filter. In particular, this was common with older versions of some "
"container software. Docker 19.03 or newer (released 2019) and containerd "
"1.6.7 or newer (released 2022) will automatically allow usage of the "
"``ptrace`` system call inside containers, when running on Linux kernel 4.8 "
"or higher. If you cannot upgrade to these versions, you can create your "
"container with an option like ``--security-opt seccomp=unconfined`` to "
"disable the system call security filter for that container. This weakens the "
"container's isolation and should only be done in low-security environments."
msgstr ""
"セキュリティフィルターによって ``ptrace`` システムコールが無効になっている場"
"合もあります。\n"
"特に、一部のコンテナーソフトウェアの古いバージョンではよくあることでした。\n"
"Docker 19.03 以降 (2019 年リリース) と containerd 1.6.7 以降 (2022 年リリー"
"ス) は、Linux カーネル 4.8 以降で実行すると、コンテナー内での ``ptrace`` シス"
"テムコールの使用を自動的に許可します。\n"
"これらのバージョンに更新できない場合は、``--security-opt "
"seccomp=unconfined`` のようなオプションを指定してコンテナーを作成し、そのコン"
"テナーのシステムコール用セキュリティフィルターを無効にできます。\n"
"ただし、コンテナーの隔離が弱まるため、安全性の要求が低い環境でのみ行ってくだ"
"さい。"
msgid ""
"If you need to trace a process that you *do not* own, you will need "
"superuser access or equivalent. This also applies to processes that have "
"changed their security credentials, e.g., set-user-ID or set-group-ID "
"processes (though this is unusual for Python). Try running the debugging "
"command with ``sudo -E``."
msgstr ""
"自分が所有して *いない* プロセスをトレースするには、スーパーユーザーまたは同"
"等の権限が必要です。\n"
"これは、set-user-ID や set-group-ID のプロセスなど、セキュリティ資格情報を変"
"更したプロセスにも当てはまります (Python ではまれです)。\n"
"``sudo -E`` を付けてデバッグコマンドを実行してみてください。"
msgid ""
"The ``CAP_SYS_PTRACE`` capability is equivalent to superuser access, in that "
"it allows debugging *any* process, not just your own. You may see advice on "
"the internet suggesting using it to work around ptrace restrictions or "
"system call filters. This may work in practice, as would ``sudo``, but this "
"gives the debugging process much more access than it needs and should only "
"be done in low-security environments."
msgstr ""
"``CAP_SYS_PTRACE`` ケーパビリティは、自分のプロセスだけでなく *あらゆる* プロ"
"セスをデバッグできる点で、スーパーユーザー権限と同等です。\n"
"インターネット上では、ptrace の制限やシステムコールフィルターを回避するために"
"このケーパビリティを使うよう勧める情報を見かけるかもしれません。\n"
"``sudo`` と同様に実際に機能する場合もありますが、デバッグする側のプロセスに必"
"要以上のアクセス権を与えるため、安全性の要求が低い環境でのみ行ってください。"
msgid ""
"Finally, note that a process can only have one tracer at a time. If you have "
"already attached to a Python process under ``strace``, ``gdb``, etc., you "
"won't be able to simultaneously use remote debugging. (Superuser access "
"cannot get around this restriction.)"
msgstr ""
"最後に、一つのプロセスを同時にトレースできるのは一つのトレーサーだけです。\n"
"``strace`` や ``gdb`` などですでに Python プロセスにアタッチしている場合、同"
"時にリモートデバッグは使えません。\n"
"(スーパーユーザー権限でもこの制限は回避できません。)"
#: ../../howto/remote_debugging.rst:83
msgid "macOS"
msgstr "macOS"
msgid "By default, macOS disables the ability to debug other processes."
msgstr ""
"デフォルトでは、macOS は他のプロセスをデバッグする機能を無効にしています。"
msgid ""
"You can modify your Python binary to opt in to being debugged by giving it "
"an **ad-hoc code signature** with an **entitlement** enabling it to be "
"debugged. (An ad-hoc \"signature\" is just a configuration without any "
"actual cryptographic signature or a need for a certificate or anything else "
"such as an Apple developer program membership.)"
msgstr ""
"Python のバイナリに、デバッグを許可する **エンタイトルメント** を含む **アド"
"ホックコード署名** を付けることで、そのバイナリをデバッグ可能にできます。\n"
"(アドホック「署名」は単なる設定です。\n"
"実際の暗号署名は含まず、証明書や Apple Developer Program への加入なども必要あ"
"りません。)"
msgid ""
"The following commands will create a file ``get-task-allow.plist`` with the "
"necessary entitlement and add it to the Python binary:"
msgstr ""
"次のコマンドは、必要なエンタイトルメントを含む ``get-task-allow.plist`` ファ"
"イルを作成し、Python のバイナリに追加します。"
msgid ""
"echo '{\"com.apple.security.get-task-allow\": true}' | plutil -convert xml1 "
"-o get-task-allow.plist -\n"
"codesign --sign - --entitlements get-task-allow.plist path/to/bin/python3"
msgstr ""
"echo '{\"com.apple.security.get-task-allow\": true}' | plutil -convert xml1 "
"-o get-task-allow.plist -\n"
"codesign --sign - --entitlements get-task-allow.plist path/to/bin/python3"
msgid ""
"where ``path/to/bin/python3`` is the path to your Python binary, which you "
"can find by e.g. running ``which python3`` or evaluating "
"``sys._base_executable`` at the Python REPL. (These instructions are for a "
"non-framework build of Python. Framework builds may need to be configured "
"differently.)"
msgstr ""
msgid ""
"You should then be able to debug your own Python processes started with that "
"binary."
msgstr ""
"その後は、そのバイナリで起動した自分の Python プロセスをデバッグできるはずで"
"す。"
msgid ""
"Alternatively, much as with Linux, processes with superuser privileges e.g. "
"``sudo`` are not subject to this check and can debug any user's process on "
"the system (though there are additional checks on specific binaries, such as "
"OS-provided commands, due to System Integrity Protection)."
msgstr ""
"また、Linux と同様に、``sudo`` などのスーパーユーザー権限を持つプロセスはこの"
"検査の対象にならず、システム上のどのユーザーのプロセスもデバッグできます。\n"
"ただし、OS が提供するコマンドなどの特定のバイナリには、システム整合性保護によ"
"る追加の検査があります。"
#: ../../howto/remote_debugging.rst:114
msgid "Windows"
msgstr "Windows"
msgid ""
"To attach to another process, you usually need to run your debugging tool "
"with administrative privileges. Start the command prompt or terminal as "
"Administrator."
msgstr ""
"別のプロセスにアタッチするには、通常、管理者権限でデバッグツールを実行する必"
"要があります。\n"
"コマンドプロンプトまたはターミナルを管理者として起動してください。"
msgid ""
"Some processes may still be inaccessible even with Administrator rights, "
"unless you have the ``SeDebugPrivilege`` privilege enabled."
msgstr ""
"管理者権限があっても、``SeDebugPrivilege`` 特権を有効にしないとアクセスできな"
"いプロセスもあります。"
msgid ""
"To resolve file or folder access issues, adjust the security permissions:"
msgstr ""
"ファイルやフォルダーへのアクセスの問題を解決するには、セキュリティのアクセス"
"許可を調整します。"
msgid "Right-click the file or folder and select **Properties**."
msgstr "ファイルまたはフォルダーを右クリックし、**プロパティ** を選択します。"
msgid "Go to the **Security** tab to view users and groups with access."
msgstr ""
"**セキュリティ** タブで、アクセスできるユーザーとグループを確認します。"
msgid "Click **Edit** to modify permissions."
msgstr "**編集** をクリックしてアクセス許可を変更します。"
msgid "Select your user account."
msgstr "自分のユーザーアカウントを選択します。"
msgid "In **Permissions**, check **Read** or **Full control** as needed."
msgstr ""
"**アクセス許可** で、必要に応じて **読み取り** または **フル コントロール** "
"にチェックを入れます。"
msgid "Click **Apply**, then **OK** to confirm."
msgstr "**適用**、**OK** の順にクリックして確定します。"
msgid ""
"Ensure you've satisfied all :ref:`permission-requirements` before proceeding."
msgstr ""
"先に進む前に、:ref:`permission-requirements` をすべて満たしていることを確認し"
"てください。"
msgid ""
"This section describes the low-level protocol that enables external tools to "
"inject and execute a Python script within a running CPython process."
msgstr ""
"この節では、外部ツールから実行中の CPython プロセスに Python スクリプトを注入"
"し、実行するための低水準のプロトコルを説明します。"
msgid ""
"This mechanism forms the basis of the :func:`sys.remote_exec` function, "
"which instructs a remote Python process to execute a ``.py`` file. However, "
"this section does not document the usage of that function. Instead, it "
"provides a detailed explanation of the underlying protocol, which takes as "
"input the ``pid`` of a target Python process and the path to a Python source "
"file to be executed. This information supports independent reimplementation "
"of the protocol, regardless of programming language."
msgstr ""
"この仕組みは、リモートの Python プロセスに ``.py`` ファイルの実行を指示す"
"る :func:`sys.remote_exec` 関数の基盤です。\n"
"ただし、この節はその関数の使い方を説明するものではありません。\n"
"対象の Python プロセスの ``pid`` と実行する Python ソースファイルのパスを入力"
"として受け取る、基盤となるプロトコルを詳しく説明します。\n"
"ここで説明する情報を使えば、プログラミング言語にかかわらず、このプロトコルを"
"独自に実装できます。"
msgid ""
"The execution of the injected script depends on the interpreter reaching a "
"safe evaluation point. As a result, execution may be delayed depending on "
"the runtime state of the target process."
msgstr ""
"注入したスクリプトは、インタープリタが安全に評価できる地点に到達してから実行"
"されます。\n"
"そのため、対象プロセスの実行状態によっては、実行が遅れることがあります。"
msgid ""
"Once injected, the script is executed by the interpreter within the target "
"process the next time a safe evaluation point is reached. This approach "
"enables remote execution capabilities without modifying the behavior or "
"structure of the running Python application."
msgstr ""
"スクリプトを注入すると、対象プロセスのインタープリタが次に安全に評価できる地"
"点に到達したときに、そのスクリプトを実行します。\n"
"これにより、実行中の Python アプリケーションの動作や構造を変更せずに、リモー"
"ト実行機能を提供できます。"
msgid ""
"Subsequent sections provide a step-by-step description of the protocol, "
"including techniques for locating interpreter structures in memory, safely "
"accessing internal fields, and triggering code execution. Platform-specific "
"variations are noted where applicable, and example implementations are "
"included to clarify each operation."
msgstr ""
"以降の節では、メモリ内でインタープリタの構造体を見つける方法、内部フィールド"
"に安全にアクセスする方法、コードの実行を開始させる方法など、プロトコルの手順"
"を説明します。\n"
"プラットフォームによる違いは該当箇所に記し、各操作を明確にするための実装例も"
"示します。"
msgid "Locating the PyRuntime structure"
msgstr "PyRuntime 構造体の位置の特定"
msgid ""
"CPython places the ``PyRuntime`` structure in a dedicated binary section to "
"help external tools find it at runtime. The name and format of this section "
"vary by platform. For example, ``.PyRuntime`` is used on ELF systems, and "
"``__DATA,__PyRuntime`` is used on macOS. Tools can find the offset of this "
"structure by examining the binary on disk."
msgstr ""
"外部ツールが実行時に見つけやすいように、CPython は ``PyRuntime`` 構造体をバイ"
"ナリ内の専用セクションに配置します。\n"
"このセクションの名前と形式はプラットフォームによって異なります。\n"
"例えば、ELF システムでは ``.PyRuntime``、macOS では ``__DATA,__PyRuntime`` を"
"使います。\n"
"ツールはディスク上のバイナリを調べることで、この構造体のオフセットを見つけら"
"れます。"
msgid ""
"The ``PyRuntime`` structure contains CPython’s global interpreter state and "
"provides access to other internal data, including the list of interpreters, "
"thread states, and debugger support fields."
msgstr ""
"``PyRuntime`` 構造体には CPython のグローバルなインタープリタの状態が格納され"
"ており、インタープリタのリスト、スレッド状態、デバッガーを支援するフィールド"
"などの内部データにアクセスできます。"
#: ../../howto/remote_debugging.rst:177
msgid ""
"To work with a remote Python process, a debugger must first find the memory "
"address of the ``PyRuntime`` structure in the target process. This address "
"can’t be hardcoded or calculated from a symbol name, because it depends on "
"where the operating system loaded the binary."
msgstr ""
msgid ""
"The method for finding ``PyRuntime`` depends on the platform, but the steps "
"are the same in general:"
msgstr ""
"``PyRuntime`` の位置を特定する方法はプラットフォームによって異なりますが、大"
"まかな手順は共通です。"
msgid ""
"Find the base address where the Python binary or shared library was loaded "
"in the target process."
msgstr ""
"対象プロセスで Python のバイナリまたは共有ライブラリがロードされたベースアド"
"レスを調べます。"
msgid ""
"Use the on-disk binary to locate the offset of the ``.PyRuntime`` section."
msgstr ""
"ディスク上のバイナリを使って ``.PyRuntime`` セクションのオフセットを調べま"
"す。"
msgid ""
"Add the section offset to the base address to compute the address in memory."
msgstr ""
"ベースアドレスにセクションのオフセットを加え、メモリ内のアドレスを求めます。"
msgid ""
"The sections below explain how to do this on each supported platform and "
"include example code."
msgstr ""
"以下の節では、サポートされる各プラットフォームでの方法とコード例を示します。"
msgid "Linux (ELF)"
msgstr "Linux (ELF)"
msgid "To find the ``PyRuntime`` structure on Linux:"
msgstr ""
"Linux で ``PyRuntime`` 構造体の位置を特定するには、次の手順を実行します。"
msgid ""
"Read the process’s memory map (for example, ``/proc/<pid>/maps``) to find "
"the address where the Python executable or ``libpython`` was loaded."
msgstr ""
"プロセスのメモリマップ (例えば ``/proc/<pid>/maps``) を読み、Python の実行"
"ファイルまたは ``libpython`` がロードされたアドレスを調べます。"
msgid ""
"Parse the ELF section headers in the binary to get the offset of the "
"``.PyRuntime`` section."
msgstr ""
"バイナリの ELF セクションヘッダーを解析し、``.PyRuntime`` セクションのオフ"
"セットを取得します。"
msgid ""
"Add that offset to the base address from step 1 to get the memory address of "
"``PyRuntime``."
msgstr ""
"手順 1 のベースアドレスにそのオフセットを加え、``PyRuntime`` のメモリアドレス"
"を求めます。"
msgid "The following is an example implementation::"
msgstr "実装例を示します。 ::"
#: ../../howto/remote_debugging.rst:206
msgid ""
"def find_py_runtime_linux(pid: int) -> int:\n"
" # Step 1: Try to find the Python executable in memory\n"
" binary_path, base_address = find_mapped_binary(\n"
" pid, name_contains=\"python\"\n"
" )\n"
"\n"
" # Step 2: Fallback to shared library if executable is not found\n"
" if binary_path is None:\n"
" binary_path, base_address = find_mapped_binary(\n"
" pid, name_contains=\"libpython\"\n"
" )\n"
"\n"
" # Step 3: Parse ELF headers to get .PyRuntime section offset\n"
" section_offset = parse_elf_section_offset(\n"
" binary_path, \".PyRuntime\"\n"
" )\n"
"\n"
" # Step 4: Compute PyRuntime address in memory\n"
" return base_address + section_offset"
msgstr ""
msgid ""
"On Linux systems, there are two main approaches to read memory from another "
"process. The first is through the ``/proc`` filesystem, specifically by "
"reading from ``/proc/[pid]/mem`` which provides direct access to the "
"process's memory. This requires appropriate permissions - either being the "
"same user as the target process or having root access. The second approach "
"is using the ``process_vm_readv()`` system call which provides a more "
"efficient way to copy memory between processes. While ptrace's "
"``PTRACE_PEEKTEXT`` operation can also be used to read memory, it is "
"significantly slower as it only reads one word at a time and requires "
"multiple context switches between the tracer and tracee processes."
msgstr ""
"Linux では、別のプロセスのメモリを読む主な方法が二つあります。\n"
"一つは ``/proc`` ファイルシステムを使う方法で、具体的にはプロセスのメモリに直"
"接アクセスできる ``/proc/[pid]/mem`` を読みます。\n"
"これには、対象プロセスと同じユーザーであるか root 権限を持つなど、適切な権限"
"が必要です。\n"
"もう一つは、プロセス間でより効率的にメモリをコピーできる "
"``process_vm_readv()`` システムコールを使う方法です。\n"
"ptrace の ``PTRACE_PEEKTEXT`` 操作でもメモリを読めますが、一度に 1 ワードしか"
"読めず、トレースする側とされる側のプロセス間で複数回のコンテキスト切り替えが"
"必要なため、はるかに低速です。"
#: ../../howto/remote_debugging.rst:238
msgid ""
"For parsing ELF sections, the process involves reading and interpreting the "
"ELF file format structures from the binary file on disk. The ELF header "
"contains a pointer to the section header table. Each section header contains "
"metadata about a section including its name (stored in a separate string "
"table), offset, and size. To find a specific section like .PyRuntime, you "
"need to walk through these headers and match the section name. The section "
"header then provides the offset where that section exists in the file, which "
"can be used to calculate its runtime address when the binary is loaded into "
"memory."
msgstr ""
msgid ""
"You can read more about the ELF file format in the `ELF specification "
"<https://en.wikipedia.org/wiki/Executable_and_Linkable_Format>`_."
msgstr ""
"ELF ファイル形式の詳細は `ELF の仕様 <https://en.wikipedia.org/wiki/"
"Executable_and_Linkable_Format>`_ を参照してください。"
msgid "macOS (Mach-O)"
msgstr "macOS (Mach-O)"
msgid "To find the ``PyRuntime`` structure on macOS:"
msgstr ""
"macOS で ``PyRuntime`` 構造体の位置を特定するには、次の手順を実行します。"
msgid ""
"Call ``task_for_pid()`` to get the ``mach_port_t`` task port for the target "
"process. This handle is needed to read memory using APIs like "
"``mach_vm_read_overwrite`` and ``mach_vm_region``."
msgstr ""
"``task_for_pid()`` を呼び出し、対象プロセスの ``mach_port_t`` タスクポートを"
"取得します。\n"
"このハンドルは、``mach_vm_read_overwrite`` や ``mach_vm_region`` などの API "
"でメモリを読むために必要です。"
msgid ""
"Scan the memory regions to find the one containing the Python executable or "
"``libpython``."
msgstr ""
"メモリ領域を調べ、Python の実行ファイルまたは ``libpython`` を含む領域を探し"
"ます。"
#: ../../howto/remote_debugging.rst:260
msgid ""
"Load the binary file from disk and parse the Mach-O headers to find the "
"section named ``PyRuntime`` in the ``__DATA`` segment. On macOS, symbol "
"names are automatically prefixed with an underscore, so the ``PyRuntime`` "
"symbol appears as ``_PyRuntime`` in the symbol table, but the section name "
"is not affected."
msgstr ""
#: ../../howto/remote_debugging.rst:268
msgid ""
"def find_py_runtime_macos(pid: int) -> int:\n"
" # Step 1: Get access to the process's memory\n"
" handle = get_memory_access_handle(pid)\n"
"\n"
" # Step 2: Try to find the Python executable in memory\n"
" binary_path, base_address = find_mapped_binary(\n"
" handle, name_contains=\"python\"\n"
" )\n"
"\n"
" # Step 3: Fallback to libpython if the executable is not found\n"
" if binary_path is None:\n"
" binary_path, base_address = find_mapped_binary(\n"
" handle, name_contains=\"libpython\"\n"
" )\n"
"\n"
" # Step 4: Parse Mach-O headers to get __DATA,__PyRuntime section offset\n"
" section_offset = parse_macho_section_offset(\n"
" binary_path, \"__DATA\", \"__PyRuntime\"\n"
" )\n"
"\n"
" # Step 5: Compute the PyRuntime address in memory\n"
" return base_address + section_offset"
msgstr ""
msgid ""
"On macOS, accessing another process's memory requires using Mach-O specific "
"APIs and file formats. The first step is obtaining a ``task_port`` handle "
"via ``task_for_pid()``, which provides access to the target process's memory "
"space. This handle enables memory operations through APIs like "
"``mach_vm_read_overwrite()``."
msgstr ""
"macOS で別のプロセスのメモリにアクセスするには、Mach-O 固有の API とファイル"
"形式を使います。\n"
"まず、``task_for_pid()`` で ``task_port`` ハンドルを取得し、対象プロセスのメ"
"モリ空間にアクセスできるようにします。\n"
"このハンドルを使うと、``mach_vm_read_overwrite()`` などの API でメモリを操作"
"できます。"
msgid ""
"The process memory can be examined using ``mach_vm_region()`` to scan "
"through the virtual memory space, while ``proc_regionfilename()`` helps "
"identify which binary files are loaded at each memory region. When the "
"Python binary or library is found, its Mach-O headers need to be parsed to "
"locate the ``PyRuntime`` structure."
msgstr ""
"``mach_vm_region()`` で仮想メモリ空間を走査すると、プロセスのメモリを調べられ"
"ます。\n"
"``proc_regionfilename()`` は、各メモリ領域にロードされたバイナリファイルの特"
"定に役立ちます。\n"
"Python のバイナリまたはライブラリを見つけたら、その Mach-O ヘッダーを解析し"
"て ``PyRuntime`` 構造体の位置を特定します。"
msgid ""
"The Mach-O format organizes code and data into segments and sections. The "
"``PyRuntime`` structure lives in a section named ``__PyRuntime`` within the "
"``__DATA`` segment. The actual runtime address calculation involves finding "
"the ``__TEXT`` segment which serves as the binary's base address, then "
"locating the ``__DATA`` segment containing our target section. The final "
"address is computed by combining the base address with the appropriate "
"section offsets from the Mach-O headers."
msgstr ""
"Mach-O 形式では、コードとデータをセグメントとセクションに分けて格納します。\n"
"``PyRuntime`` 構造体は、``__DATA`` セグメント内の ``__PyRuntime`` というセク"
"ションにあります。\n"
"実行時のアドレスを求めるには、バイナリのベースアドレスとなる ``__TEXT`` セグ"
"メントを見つけ、続いて目的のセクションを含む ``__DATA`` セグメントを探しま"
"す。\n"
"ベースアドレスと Mach-O ヘッダーの適切なセクションオフセットを組み合わせて、"
"最終的なアドレスを求めます。"
msgid ""
"Note that accessing another process's memory on macOS typically requires "
"elevated privileges - either root access or special security entitlements "
"granted to the debugging process."
msgstr ""
"macOS で別のプロセスのメモリにアクセスするには、通常、root 権限やデバッグする"
"側のプロセスに付与された特別なセキュリティエンタイトルメントなど、昇格された"
"権限が必要です。"
msgid "Windows (PE)"
msgstr "Windows (PE)"
msgid "To find the ``PyRuntime`` structure on Windows:"
msgstr ""
"Windows で ``PyRuntime`` 構造体の位置を特定するには、次の手順を実行します。"
msgid ""
"Use the ToolHelp API to enumerate all modules loaded in the target process. "
"This is done using functions such as `CreateToolhelp32Snapshot <https://"
"learn.microsoft.com/en-us/windows/win32/api/tlhelp32/nf-tlhelp32-"
"createtoolhelp32snapshot>`_, `Module32First <https://learn.microsoft.com/en-"
"us/windows/win32/api/tlhelp32/nf-tlhelp32-module32first>`_, and "
"`Module32Next <https://learn.microsoft.com/en-us/windows/win32/api/tlhelp32/"
"nf-tlhelp32-module32next>`_."
msgstr ""
"ToolHelp API を使い、対象プロセスにロードされたすべてのモジュールを列挙しま"
"す。\n"
"これには `CreateToolhelp32Snapshot <https://learn.microsoft.com/en-us/"
"windows/win32/api/tlhelp32/nf-tlhelp32-createtoolhelp32snapshot>`_、"
"`Module32First <https://learn.microsoft.com/en-us/windows/win32/api/tlhelp32/"
"nf-tlhelp32-module32first>`_、`Module32Next <https://learn.microsoft.com/en-"
"us/windows/win32/api/tlhelp32/nf-tlhelp32-module32next>`_ などの関数を使いま"
"す。"
msgid ""
"Identify the module corresponding to :file:`python.exe` "
"or :file:`python{XY}.dll`, where ``X`` and ``Y`` are the major and minor "
"version numbers of the Python version, and record its base address."
msgstr ""
":file:`python.exe` または :file:`python{XY}.dll` に対応するモジュールを特定"
"し、ベースアドレスを記録します。\n"
"``X`` と ``Y`` は Python のメジャーバージョン番号とマイナーバージョン番号で"
"す。"
msgid ""
"Locate the ``PyRuntim`` section. Due to the PE format's 8-character limit on "
"section names (defined as ``IMAGE_SIZEOF_SHORT_NAME``), the original name "
"``PyRuntime`` is truncated. This section contains the ``PyRuntime`` "
"structure."
msgstr ""
"``PyRuntim`` セクションを探します。\n"
"PE 形式のセクション名には 8 文字の制限 (``IMAGE_SIZEOF_SHORT_NAME`` として定"
"義) があるため、元の名前 ``PyRuntime`` は切り詰められます。\n"
"このセクションに ``PyRuntime`` 構造体があります。"
msgid ""
"Retrieve the section’s relative virtual address (RVA) and add it to the base "
"address of the module."
msgstr ""
"セクションの相対仮想アドレス (RVA) を取得し、モジュールのベースアドレスに加え"
"ます。"
#: ../../howto/remote_debugging.rst:338
msgid ""
"def find_py_runtime_windows(pid: int) -> int:\n"
" # Step 1: Try to find the Python executable in memory\n"
" binary_path, base_address = find_loaded_module(\n"
" pid, name_contains=\"python\"\n"
" )\n"
"\n"
" # Step 2: Fallback to shared pythonXY.dll if the executable is not\n"
" # found\n"
" if binary_path is None:\n"
" binary_path, base_address = find_loaded_module(\n"
" pid, name_contains=\"python3\"\n"
" )\n"
"\n"
" # Step 3: Parse PE section headers to get the RVA of the PyRuntime\n"
" # section. The section name appears as \"PyRuntim\" due to the\n"
" # 8-character limit defined by the PE format (IMAGE_SIZEOF_SHORT_NAME).\n"
" section_rva = parse_pe_section_offset(binary_path, \"PyRuntim\")\n"
"\n"
" # Step 4: Compute PyRuntime address in memory\n"
" return base_address + section_rva"
msgstr ""
msgid ""
"On Windows, accessing another process's memory requires using the Windows "
"API functions like ``CreateToolhelp32Snapshot()`` and ``Module32First()/"
"Module32Next()`` to enumerate loaded modules. The ``OpenProcess()`` function "
"provides a handle to access the target process's memory space, enabling "
"memory operations through ``ReadProcessMemory()``."
msgstr ""
"Windows で別のプロセスのメモリにアクセスするには、"
"``CreateToolhelp32Snapshot()`` や ``Module32First()/Module32Next()`` などの "
"Windows API 関数で、ロードされたモジュールを列挙します。\n"
"``OpenProcess()`` 関数は対象プロセスのメモリ空間にアクセスするためのハンドル"
"を返し、``ReadProcessMemory()`` でメモリを操作できるようにします。"
msgid ""
"The process memory can be examined by enumerating loaded modules to find the "
"Python binary or DLL. When found, its PE headers need to be parsed to locate "
"the ``PyRuntime`` structure."
msgstr ""
"ロードされたモジュールを列挙して Python のバイナリまたは DLL を探すことで、プ"
"ロセスのメモリを調べられます。\n"
"見つかったら、その PE ヘッダーを解析して ``PyRuntime`` 構造体の位置を特定しま"
"す。"
msgid ""
"The PE format organizes code and data into sections. The ``PyRuntime`` "
"structure lives in a section named \"PyRuntim\" (truncated from "
"\"PyRuntime\" due to PE's 8-character name limit). The actual runtime "
"address calculation involves finding the module's base address from the "
"module entry, then locating our target section in the PE headers. The final "
"address is computed by combining the base address with the section's virtual "
"address from the PE section headers."
msgstr ""
"PE 形式では、コードとデータをセクションに分けて格納します。\n"
"``PyRuntime`` 構造体は「PyRuntim」というセクションにあります (PE の名前の長さ"
"制限が 8 文字なので、「PyRuntime」から切り詰められています)。\n"
"実行時のアドレスを求めるには、モジュールエントリーからモジュールのベースアド"
"レスを調べ、PE ヘッダーで目的のセクションを探します。\n"
"ベースアドレスと PE セクションヘッダーのセクション仮想アドレスを組み合わせ"
"て、最終的なアドレスを求めます。"
msgid ""
"Note that accessing another process's memory on Windows typically requires "
"appropriate privileges - either administrative access or the "
"``SeDebugPrivilege`` privilege granted to the debugging process."
msgstr ""
"Windows で別のプロセスのメモリにアクセスするには、通常、管理者権限やデバッグ"
"する側のプロセスに付与された ``SeDebugPrivilege`` 特権など、適切な権限が必要"
"です。"
msgid "Reading _Py_DebugOffsets"
msgstr "_Py_DebugOffsets の読み取り"
msgid ""
"Once the address of the ``PyRuntime`` structure has been determined, the "
"next step is to read the ``_Py_DebugOffsets`` structure located at the "
"beginning of the ``PyRuntime`` block."
msgstr ""
"``PyRuntime`` 構造体のアドレスを特定したら、次は ``PyRuntime`` ブロックの先頭"
"にある ``_Py_DebugOffsets`` 構造体を読み取ります。"
msgid ""
"This structure provides version-specific field offsets that are needed to "
"safely read interpreter and thread state memory. These offsets vary between "
"CPython versions and must be checked before use to ensure they are "
"compatible."
msgstr ""
"この構造体は、インタープリタやスレッド状態のメモリを安全に読み取るために必要"
"な、バージョンごとのフィールドオフセットを提供します。\n"
"オフセットは CPython のバージョンによって異なるため、使用前に互換性を確認する"
"必要があります。"
msgid "To read and check the debug offsets, follow these steps:"
msgstr "デバッグ用オフセットを読み取って検査するには、次の手順を実行します。"
msgid ""
"Read memory from the target process starting at the ``PyRuntime`` address, "
"covering the same number of bytes as the ``_Py_DebugOffsets`` structure. "
"This structure is located at the very start of the ``PyRuntime`` memory "
"block. Its layout is defined in CPython’s internal headers and stays the "
"same within a given minor version, but may change in major versions."
msgstr ""
"対象プロセスの ``PyRuntime`` アドレスから、``_Py_DebugOffsets`` 構造体のサイ"
"ズと同じバイト数のメモリを読み取ります。\n"
"この構造体は ``PyRuntime`` メモリブロックの先頭にあります。\n"
"そのレイアウトは CPython の内部ヘッダーで定義され、同じマイナーバージョン内で"
"は変わりませんが、メジャーバージョンが変わると変更される可能性があります。"
msgid "Check that the structure contains valid data:"
msgstr "構造体に有効なデータが含まれているか確認します。"
msgid "The ``cookie`` field must match the expected debug marker."
msgstr ""
"``cookie`` フィールドは、想定するデバッグ用マーカーと一致しなければなりませ"
"ん。"
msgid ""
"The ``version`` field must match the version of the Python interpreter used "
"by the debugger."
msgstr ""
"``version`` フィールドは、デバッガーが使う Python インタープリタのバージョン"
"と一致しなければなりません。"
msgid ""
"If either the debugger or the target process is using a pre-release version "
"(for example, an alpha, beta, or release candidate), the versions must match "
"exactly."
msgstr ""
"デバッガーか対象プロセスのいずれかがプレリリース版 (アルファ版、ベータ版、リ"
"リース候補版など) を使っている場合は、バージョンが完全に一致しなければなりま"
"せん。"
msgid ""
"The ``free_threaded`` field must have the same value in both the debugger "
"and the target process."
msgstr ""
"``free_threaded`` フィールドは、デバッガーと対象プロセスの両方で同じ値でなけ"
"ればなりません。"
msgid ""
"If the structure is valid, the offsets it contains can be used to locate "
"fields in memory. If any check fails, the debugger should stop the operation "
"to avoid reading memory in the wrong format."
msgstr ""
"構造体が有効なら、格納されたオフセットを使ってメモリ内のフィールドの位置を特"
"定できます。\n"
"いずれかの検査に失敗した場合は、誤った形式でメモリを読まないように、デバッ"
"ガーは操作を中止するべきです。"
msgid ""
"The following is an example implementation that reads and checks "
"``_Py_DebugOffsets``::"
msgstr "``_Py_DebugOffsets`` を読み取って検査する実装例を示します。 ::"
msgid ""
"def read_debug_offsets(pid: int, py_runtime_addr: int) -> DebugOffsets:\n"
" # Step 1: Read memory from the target process at the PyRuntime address\n"
" data = read_process_memory(\n"
" pid, address=py_runtime_addr, size=DEBUG_OFFSETS_SIZE\n"
" )\n"
"\n"
" # Step 2: Deserialize the raw bytes into a _Py_DebugOffsets structure\n"
" debug_offsets = parse_debug_offsets(data)\n"
"\n"
" # Step 3: Validate the contents of the structure\n"
" if debug_offsets.cookie != EXPECTED_COOKIE:\n"
" raise RuntimeError(\"Invalid or missing debug cookie\")\n"
" if debug_offsets.version != LOCAL_PYTHON_VERSION:\n"
" raise RuntimeError(\n"
" \"Mismatch between caller and target Python versions\"\n"
" )\n"
" if debug_offsets.free_threaded != LOCAL_FREE_THREADED:\n"
" raise RuntimeError(\"Mismatch in free-threaded configuration\")\n"
"\n"
" return debug_offsets"
msgstr ""
"def read_debug_offsets(pid: int, py_runtime_addr: int) -> DebugOffsets:\n"
" # 手順 1: 対象プロセスの PyRuntime アドレスからメモリを読む\n"
" data = read_process_memory(\n"
" pid, address=py_runtime_addr, size=DEBUG_OFFSETS_SIZE\n"
" )\n"
"\n"
" # 手順 2: バイト列を _Py_DebugOffsets 構造体に復元する\n"
" debug_offsets = parse_debug_offsets(data)\n"
"\n"
" # 手順 3: 構造体の内容を検証する\n"
" if debug_offsets.cookie != EXPECTED_COOKIE:\n"
" raise RuntimeError(\"Invalid or missing debug cookie\")\n"
" if debug_offsets.version != LOCAL_PYTHON_VERSION:\n"
" raise RuntimeError(\n"
" \"Mismatch between caller and target Python versions\"\n"
" )\n"
" if debug_offsets.free_threaded != LOCAL_FREE_THREADED:\n"
" raise RuntimeError(\"Mismatch in free-threaded configuration\")\n"
"\n"
" return debug_offsets"
msgid "**Process suspension recommended**"
msgstr "**プロセスの一時停止を推奨**"
msgid ""
"To avoid race conditions and ensure memory consistency, it is strongly "
"recommended that the target process be suspended before performing any "
"operations that read or write internal interpreter state. The Python runtime "
"may concurrently mutate interpreter data structures—such as creating or "
"destroying threads—during normal execution. This can result in invalid "
"memory reads or writes."
msgstr ""
"競合状態を避けてメモリの一貫性を確保するため、インタープリタの内部状態を読み"
"書きする前に、対象プロセスを一時停止することを強く推奨します。\n"
"Python ランタイムは通常の実行中に、スレッドの作成や破棄など、インタープリタの"
"データ構造の変更を並行して行うことがあります。\n"
"その結果、無効なメモリの読み書きが発生する可能性があります。"
msgid ""
"A debugger may suspend execution by attaching to the process with ``ptrace`` "
"or by sending a ``SIGSTOP`` signal. Execution should only be resumed after "
"debugger-side memory operations are complete."
msgstr ""
"デバッガーは、``ptrace`` でプロセスにアタッチするか、``SIGSTOP`` シグナルを送"
"ることで実行を一時停止できます。\n"
"デバッガー側のメモリ操作が完了してから実行を再開するべきです。"
msgid ""
"Some tools, such as profilers or sampling-based debuggers, may operate on a "
"running process without suspension. In such cases, tools must be explicitly "
"designed to handle partially updated or inconsistent memory. For most "
"debugger implementations, suspending the process remains the safest and most "
"robust approach."
msgstr ""
"プロファイラーやサンプリング方式のデバッガーなど、一部のツールはプロセスを停"
"止せずに動作する場合があります。\n"
"その場合、更新途中のメモリや一貫性のないメモリを扱えるように、明示的に設計し"
"なければなりません。\n"
"ほとんどのデバッガー実装では、プロセスを一時停止するのが最も安全で堅牢な方法"
"です。"
msgid "Locating the interpreter and thread state"
msgstr "インタープリタとスレッド状態の位置の特定"
msgid ""
"Before code can be injected and executed in a remote Python process, the "
"debugger must choose a thread in which to schedule execution. This is "
"necessary because the control fields used to perform remote code injection "
"are located in the ``_PyRemoteDebuggerSupport`` structure, which is embedded "
"in a ``PyThreadState`` object. These fields are modified by the debugger to "
"request execution of injected scripts."
msgstr ""
"リモートの Python プロセスにコードを注入して実行する前に、デバッガーは実行を"
"予約するスレッドを選ぶ必要があります。\n"
"リモートコードの注入を制御するフィールドが、``PyThreadState`` オブジェクトに"
"埋め込まれた ``_PyRemoteDebuggerSupport`` 構造体にあるためです。\n"
"デバッガーはこれらのフィールドを変更して、注入したスクリプトの実行を要求しま"
"す。"
msgid ""
"The ``PyThreadState`` structure represents a thread running inside a Python "
"interpreter. It maintains the thread’s evaluation context and contains the "
"fields required for debugger coordination. Locating a valid "
"``PyThreadState`` is therefore a key prerequisite for triggering execution "
"remotely."
msgstr ""
"``PyThreadState`` 構造体は、Python インタープリタ内で実行するスレッドを表しま"
"す。\n"
"スレッドの評価コンテキストを保持し、デバッガーと協調するためのフィールドを含"
"みます。\n"
"そのため、有効な ``PyThreadState`` の位置を特定することが、リモート実行を開始"
"させるための重要な前提条件です。"
msgid ""
"A thread is typically selected based on its role or ID. In most cases, the "
"main thread is used, but some tools may target a specific thread by its "
"native thread ID. Once the target thread is chosen, the debugger must locate "
"both the interpreter and the associated thread state structures in memory."
msgstr ""
"通常は役割や ID に基づいてスレッドを選びます。\n"
"ほとんどの場合はメインスレッドを使いますが、ネイティブスレッド ID で特定のス"
"レッドを指定するツールもあります。\n"
"対象のスレッドを選んだら、デバッガーはインタープリタと対応するスレッド状態の"
"構造体をメモリ内で探さなければなりません。"
msgid "The relevant internal structures are defined as follows:"
msgstr "関連する内部構造体の定義は次のとおりです。"
msgid ""
"``PyInterpreterState`` represents an isolated Python interpreter instance. "
"Each interpreter maintains its own set of imported modules, built-in state, "
"and thread state list. Although most Python applications use a single "
"interpreter, CPython supports multiple interpreters in the same process."
msgstr ""
"``PyInterpreterState`` は、隔離された Python インタープリタのインスタンスを表"
"します。\n"
"各インタープリタは、インポート済みモジュール、組み込みの状態、スレッド状態の"
"リストをそれぞれ保持します。\n"
"ほとんどの Python アプリケーションは一つのインタープリタを使いますが、"
"CPython は同じプロセス内での複数のインタープリタをサポートします。"
msgid ""
"``PyThreadState`` represents a thread running within an interpreter. It "
"contains execution state and the control fields used by the debugger."
msgstr ""
"``PyThreadState`` は、インタープリタ内で実行するスレッドを表します。\n"
"実行状態と、デバッガーが使う制御用フィールドを含みます。"
msgid "To locate a thread:"
msgstr "スレッドの位置を特定するには、次の手順を実行します。"
msgid ""
"Use the offset ``runtime_state.interpreters_head`` to obtain the address of "
"the first interpreter in the ``PyRuntime`` structure. This is the entry "
"point to the linked list of active interpreters."
msgstr ""
"オフセット ``runtime_state.interpreters_head`` を使い、``PyRuntime`` 構造体か"
"ら最初のインタープリタのアドレスを取得します。\n"
"ここが、動作中のインタープリタの連結リストの先頭です。"