| <html lang="en"> | |
| <head> | |
| <title>Python API - Debugging with GDB</title> | |
| <meta http-equiv="Content-Type" content="text/html"> | |
| <meta name="description" content="Debugging with GDB"> | |
| <meta name="generator" content="makeinfo 4.13"> | |
| <link title="Top" rel="start" href="index.html#Top"> | |
| <link rel="up" href="Python.html#Python" title="Python"> | |
| <link rel="prev" href="Python-Commands.html#Python-Commands" title="Python Commands"> | |
| <link rel="next" href="Auto_002dloading.html#Auto_002dloading" title="Auto-loading"> | |
| <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> | |
| <!-- | |
| Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, | |
| 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 | |
| Free Software Foundation, Inc. | |
| Permission is granted to copy, distribute and/or modify this document | |
| under the terms of the GNU Free Documentation License, Version 1.3 or | |
| any later version published by the Free Software Foundation; with the | |
| Invariant Sections being ``Free Software'' and ``Free Software Needs | |
| Free Documentation'', with the Front-Cover Texts being ``A GNU Manual,'' | |
| and with the Back-Cover Texts as in (a) below. | |
| (a) The FSF's Back-Cover Text is: ``You are free to copy and modify | |
| this GNU Manual. Buying copies from GNU Press supports the FSF in | |
| developing GNU and promoting software freedom.''--> | |
| <meta http-equiv="Content-Style-Type" content="text/css"> | |
| <style type="text/css"><!-- | |
| pre.display { font-family:inherit } | |
| pre.format { font-family:inherit } | |
| pre.smalldisplay { font-family:inherit; font-size:smaller } | |
| pre.smallformat { font-family:inherit; font-size:smaller } | |
| pre.smallexample { font-size:smaller } | |
| pre.smalllisp { font-size:smaller } | |
| span.sc { font-variant:small-caps } | |
| span.roman { font-family:serif; font-weight:normal; } | |
| span.sansserif { font-family:sans-serif; font-weight:normal; } | |
| --></style> | |
| <link rel="stylesheet" type="text/css" href="../cs.css"> | |
| </head> | |
| <body> | |
| <div class="node"> | |
| <a name="Python-API"></a> | |
| <p> | |
| Next: <a rel="next" accesskey="n" href="Auto_002dloading.html#Auto_002dloading">Auto-loading</a>, | |
| Previous: <a rel="previous" accesskey="p" href="Python-Commands.html#Python-Commands">Python Commands</a>, | |
| Up: <a rel="up" accesskey="u" href="Python.html#Python">Python</a> | |
| <hr> | |
| </div> | |
| <h4 class="subsection">23.2.2 Python API</h4> | |
| <p><a name="index-python-api-1573"></a><a name="index-programming-in-python-1574"></a> | |
| <a name="index-python-stdout-1575"></a><a name="index-python-pagination-1576"></a>At startup, <span class="sc">gdb</span> overrides Python's <code>sys.stdout</code> and | |
| <code>sys.stderr</code> to print using <span class="sc">gdb</span>'s output-paging streams. | |
| A Python program which outputs to one of these streams may have its | |
| output interrupted by the user (see <a href="Screen-Size.html#Screen-Size">Screen Size</a>). In this | |
| situation, a Python <code>KeyboardInterrupt</code> exception is thrown. | |
| <ul class="menu"> | |
| <li><a accesskey="1" href="Basic-Python.html#Basic-Python">Basic Python</a>: Basic Python Functions. | |
| <li><a accesskey="2" href="Exception-Handling.html#Exception-Handling">Exception Handling</a> | |
| <li><a accesskey="3" href="Values-From-Inferior.html#Values-From-Inferior">Values From Inferior</a> | |
| <li><a accesskey="4" href="Types-In-Python.html#Types-In-Python">Types In Python</a>: Python representation of types. | |
| <li><a accesskey="5" href="Pretty-Printing-API.html#Pretty-Printing-API">Pretty Printing API</a>: Pretty-printing values. | |
| <li><a accesskey="6" href="Selecting-Pretty_002dPrinters.html#Selecting-Pretty_002dPrinters">Selecting Pretty-Printers</a>: How GDB chooses a pretty-printer. | |
| <li><a accesskey="7" href="Disabling-Pretty_002dPrinters.html#Disabling-Pretty_002dPrinters">Disabling Pretty-Printers</a>: Disabling broken printers. | |
| <li><a accesskey="8" href="Inferiors-In-Python.html#Inferiors-In-Python">Inferiors In Python</a>: Python representation of inferiors (processes) | |
| <li><a accesskey="9" href="Threads-In-Python.html#Threads-In-Python">Threads In Python</a>: Accessing inferior threads from Python. | |
| <li><a href="Commands-In-Python.html#Commands-In-Python">Commands In Python</a>: Implementing new commands in Python. | |
| <li><a href="Parameters-In-Python.html#Parameters-In-Python">Parameters In Python</a>: Adding new <span class="sc">gdb</span> parameters. | |
| <li><a href="Functions-In-Python.html#Functions-In-Python">Functions In Python</a>: Writing new convenience functions. | |
| <li><a href="Progspaces-In-Python.html#Progspaces-In-Python">Progspaces In Python</a>: Program spaces. | |
| <li><a href="Objfiles-In-Python.html#Objfiles-In-Python">Objfiles In Python</a>: Object files. | |
| <li><a href="Frames-In-Python.html#Frames-In-Python">Frames In Python</a>: Accessing inferior stack frames from Python. | |
| <li><a href="Blocks-In-Python.html#Blocks-In-Python">Blocks In Python</a>: Accessing frame blocks from Python. | |
| <li><a href="Symbols-In-Python.html#Symbols-In-Python">Symbols In Python</a>: Python representation of symbols. | |
| <li><a href="Symbol-Tables-In-Python.html#Symbol-Tables-In-Python">Symbol Tables In Python</a>: Python representation of symbol tables. | |
| <li><a href="Lazy-Strings-In-Python.html#Lazy-Strings-In-Python">Lazy Strings In Python</a>: Python representation of lazy strings. | |
| <li><a href="Breakpoints-In-Python.html#Breakpoints-In-Python">Breakpoints In Python</a>: Manipulating breakpoints using Python. | |
| </ul> | |
| </body></html> | |