Skip to content

GH-56426: Add cross-reference to the documentation for faulthandler, traceback, and pdb. #101157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Feb 4, 2023
Merged
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
10 changes: 9 additions & 1 deletion Doc/library/faulthandler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ Python is deadlocked.
The :ref:`Python Development Mode <devmode>` calls :func:`faulthandler.enable`
at Python startup.

.. seealso::

Module :mod:`pdb`
Interactive source code debugger for Python programs.

Module :mod:`traceback`
Standard interface to extract, format and print stack traces of Python programs.

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

.. seealso:: :func:`traceback.print_tb`, which can be used to print a traceback object.

.. versionchanged:: 3.5
Added support for passing file descriptor to this function.

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

9 changes: 9 additions & 0 deletions Doc/library/pdb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ The debugger is extensible -- it is actually defined as the class :class:`Pdb`.
This is currently undocumented but easily understood by reading the source. The
extension interface uses the modules :mod:`bdb` and :mod:`cmd`.

.. seealso::

Module :mod:`faulthandler`
Used to dump Python tracebacks explicitly, on a fault, after a timeout,
or on a user signal.

Module :mod:`traceback`
Standard interface to extract, format and print stack traces of Python programs.

The debugger's prompt is ``(Pdb)``. Typical usage to run a program under control
of the debugger is::

Expand Down
9 changes: 8 additions & 1 deletion Doc/library/traceback.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,15 @@ The module uses traceback objects --- this is the object type that is stored in
the :data:`sys.last_traceback` variable and returned as the third item from
:func:`sys.exc_info`.

The module defines the following functions:
.. seealso::

Module :mod:`faulthandler`
Used to dump Python tracebacks explicitly, on a fault, after a timeout, or on a user signal.

Module :mod:`pdb`
Interactive source code debugger for Python programs.

The module defines the following functions:

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

Expand Down