Skip to content

Commit cef9de6

Browse files
GH-56426: Add cross-reference to the documentation for faulthandler, traceback, and pdb. (#101157)
Co-authored-by: C.A.M. Gerlach <[email protected]>
1 parent f11a3d1 commit cef9de6

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

Doc/library/faulthandler.rst

+9-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ Python is deadlocked.
4343
The :ref:`Python Development Mode <devmode>` calls :func:`faulthandler.enable`
4444
at Python startup.
4545

46+
.. seealso::
47+
48+
Module :mod:`pdb`
49+
Interactive source code debugger for Python programs.
50+
51+
Module :mod:`traceback`
52+
Standard interface to extract, format and print stack traces of Python programs.
4653

4754
Dumping the traceback
4855
---------------------
@@ -52,6 +59,8 @@ Dumping the traceback
5259
Dump the tracebacks of all threads into *file*. If *all_threads* is
5360
``False``, dump only the current thread.
5461

62+
.. seealso:: :func:`traceback.print_tb`, which can be used to print a traceback object.
63+
5564
.. versionchanged:: 3.5
5665
Added support for passing file descriptor to this function.
5766

@@ -178,4 +187,3 @@ handler:
178187
File "/home/python/cpython/Lib/ctypes/__init__.py", line 486 in string_at
179188
File "<stdin>", line 1 in <module>
180189
Segmentation fault
181-

Doc/library/pdb.rst

+9
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@ The debugger is extensible -- it is actually defined as the class :class:`Pdb`.
2727
This is currently undocumented but easily understood by reading the source. The
2828
extension interface uses the modules :mod:`bdb` and :mod:`cmd`.
2929

30+
.. seealso::
31+
32+
Module :mod:`faulthandler`
33+
Used to dump Python tracebacks explicitly, on a fault, after a timeout,
34+
or on a user signal.
35+
36+
Module :mod:`traceback`
37+
Standard interface to extract, format and print stack traces of Python programs.
38+
3039
The debugger's prompt is ``(Pdb)``. Typical usage to run a program under control
3140
of the debugger is::
3241

Doc/library/traceback.rst

+8-1
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,15 @@ The module uses traceback objects --- this is the object type that is stored in
2020
the :data:`sys.last_traceback` variable and returned as the third item from
2121
:func:`sys.exc_info`.
2222

23-
The module defines the following functions:
23+
.. seealso::
24+
25+
Module :mod:`faulthandler`
26+
Used to dump Python tracebacks explicitly, on a fault, after a timeout, or on a user signal.
2427

28+
Module :mod:`pdb`
29+
Interactive source code debugger for Python programs.
30+
31+
The module defines the following functions:
2532

2633
.. function:: print_tb(tb, limit=None, file=None)
2734

0 commit comments

Comments
 (0)