Basic-Python.html 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1988-2020 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3 or
  6. any later version published by the Free Software Foundation; with the
  7. Invariant Sections being "Free Software" and "Free Software Needs
  8. Free Documentation", with the Front-Cover Texts being "A GNU Manual,"
  9. and with the Back-Cover Texts as in (a) below.
  10. (a) The FSF's Back-Cover Text is: "You are free to copy and modify
  11. this GNU Manual. Buying copies from GNU Press supports the FSF in
  12. developing GNU and promoting software freedom." -->
  13. <!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ -->
  14. <head>
  15. <title>Debugging with GDB: Basic Python</title>
  16. <meta name="description" content="Debugging with GDB: Basic Python">
  17. <meta name="keywords" content="Debugging with GDB: Basic Python">
  18. <meta name="resource-type" content="document">
  19. <meta name="distribution" content="global">
  20. <meta name="Generator" content="makeinfo">
  21. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  22. <link href="index.html#Top" rel="start" title="Top">
  23. <link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
  24. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  25. <link href="Python-API.html#Python-API" rel="up" title="Python API">
  26. <link href="Exception-Handling.html#Exception-Handling" rel="next" title="Exception Handling">
  27. <link href="Python-API.html#Python-API" rel="previous" title="Python API">
  28. <style type="text/css">
  29. <!--
  30. a.summary-letter {text-decoration: none}
  31. blockquote.smallquotation {font-size: smaller}
  32. div.display {margin-left: 3.2em}
  33. div.example {margin-left: 3.2em}
  34. div.indentedblock {margin-left: 3.2em}
  35. div.lisp {margin-left: 3.2em}
  36. div.smalldisplay {margin-left: 3.2em}
  37. div.smallexample {margin-left: 3.2em}
  38. div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
  39. div.smalllisp {margin-left: 3.2em}
  40. kbd {font-style:oblique}
  41. pre.display {font-family: inherit}
  42. pre.format {font-family: inherit}
  43. pre.menu-comment {font-family: serif}
  44. pre.menu-preformatted {font-family: serif}
  45. pre.smalldisplay {font-family: inherit; font-size: smaller}
  46. pre.smallexample {font-size: smaller}
  47. pre.smallformat {font-family: inherit; font-size: smaller}
  48. pre.smalllisp {font-size: smaller}
  49. span.nocodebreak {white-space:nowrap}
  50. span.nolinebreak {white-space:nowrap}
  51. span.roman {font-family:serif; font-weight:normal}
  52. span.sansserif {font-family:sans-serif; font-weight:normal}
  53. ul.no-bullet {list-style: none}
  54. -->
  55. </style>
  56. </head>
  57. <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
  58. <a name="Basic-Python"></a>
  59. <div class="header">
  60. <p>
  61. Next: <a href="Exception-Handling.html#Exception-Handling" accesskey="n" rel="next">Exception Handling</a>, Up: <a href="Python-API.html#Python-API" accesskey="u" rel="up">Python API</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
  62. </div>
  63. <hr>
  64. <a name="Basic-Python-1"></a>
  65. <h4 class="subsubsection">23.2.2.1 Basic Python</h4>
  66. <a name="index-python-stdout"></a>
  67. <a name="index-python-pagination"></a>
  68. <p>At startup, <small>GDB</small> overrides Python&rsquo;s <code>sys.stdout</code> and
  69. <code>sys.stderr</code> to print using <small>GDB</small>&rsquo;s output-paging streams.
  70. A Python program which outputs to one of these streams may have its
  71. output interrupted by the user (see <a href="Screen-Size.html#Screen-Size">Screen Size</a>). In this
  72. situation, a Python <code>KeyboardInterrupt</code> exception is thrown.
  73. </p>
  74. <p>Some care must be taken when writing Python code to run in
  75. <small>GDB</small>. Two things worth noting in particular:
  76. </p>
  77. <ul>
  78. <li> <small>GDB</small> install handlers for <code>SIGCHLD</code> and <code>SIGINT</code>.
  79. Python code must not override these, or even change the options using
  80. <code>sigaction</code>. If your program changes the handling of these
  81. signals, <small>GDB</small> will most likely stop working correctly. Note
  82. that it is unfortunately common for GUI toolkits to install a
  83. <code>SIGCHLD</code> handler.
  84. </li><li> <small>GDB</small> takes care to mark its internal file descriptors as
  85. close-on-exec. However, this cannot be done in a thread-safe way on
  86. all platforms. Your Python programs should be aware of this and
  87. should both create new file descriptors with the close-on-exec flag
  88. set and arrange to close unneeded file descriptors before starting a
  89. child process.
  90. </li></ul>
  91. <a name="index-python-functions"></a>
  92. <a name="index-python-module"></a>
  93. <a name="index-gdb-module"></a>
  94. <p><small>GDB</small> introduces a new Python module, named <code>gdb</code>. All
  95. methods and classes added by <small>GDB</small> are placed in this module.
  96. <small>GDB</small> automatically <code>import</code>s the <code>gdb</code> module for
  97. use in all scripts evaluated by the <code>python</code> command.
  98. </p>
  99. <p>Some types of the <code>gdb</code> module come with a textual representation
  100. (accessible through the <code>repr</code> or <code>str</code> functions). These are
  101. offered for debugging purposes only, expect them to change over time.
  102. </p>
  103. <a name="index-gdb_002ePYTHONDIR"></a>
  104. <dl>
  105. <dt><a name="index-gdb_002ePYTHONDIR-1"></a>Variable: <strong>gdb.PYTHONDIR</strong></dt>
  106. <dd><p>A string containing the python directory (see <a href="Python.html#Python">Python</a>).
  107. </p></dd></dl>
  108. <a name="index-gdb_002eexecute"></a>
  109. <dl>
  110. <dt><a name="index-gdb_002eexecute-1"></a>Function: <strong>gdb.execute</strong> <em>(command <span class="roman">[</span>, from_tty <span class="roman">[</span>, to_string<span class="roman">]]</span>)</em></dt>
  111. <dd><p>Evaluate <var>command</var>, a string, as a <small>GDB</small> CLI command.
  112. If a GDB exception happens while <var>command</var> runs, it is
  113. translated as described in <a href="Exception-Handling.html#Exception-Handling">Exception Handling</a>.
  114. </p>
  115. <p>The <var>from_tty</var> flag specifies whether <small>GDB</small> ought to consider this
  116. command as having originated from the user invoking it interactively.
  117. It must be a boolean value. If omitted, it defaults to <code>False</code>.
  118. </p>
  119. <p>By default, any output produced by <var>command</var> is sent to
  120. <small>GDB</small>&rsquo;s standard output (and to the log output if logging is
  121. turned on). If the <var>to_string</var> parameter is
  122. <code>True</code>, then output will be collected by <code>gdb.execute</code> and
  123. returned as a string. The default is <code>False</code>, in which case the
  124. return value is <code>None</code>. If <var>to_string</var> is <code>True</code>, the
  125. <small>GDB</small> virtual terminal will be temporarily set to unlimited width
  126. and height, and its pagination will be disabled; see <a href="Screen-Size.html#Screen-Size">Screen Size</a>.
  127. </p></dd></dl>
  128. <a name="index-gdb_002ebreakpoints"></a>
  129. <dl>
  130. <dt><a name="index-gdb_002ebreakpoints-1"></a>Function: <strong>gdb.breakpoints</strong> <em>()</em></dt>
  131. <dd><p>Return a sequence holding all of <small>GDB</small>&rsquo;s breakpoints.
  132. See <a href="Breakpoints-In-Python.html#Breakpoints-In-Python">Breakpoints In Python</a>, for more information. In <small>GDB</small>
  133. version 7.11 and earlier, this function returned <code>None</code> if there
  134. were no breakpoints. This peculiarity was subsequently fixed, and now
  135. <code>gdb.breakpoints</code> returns an empty sequence in this case.
  136. </p></dd></dl>
  137. <dl>
  138. <dt><a name="index-gdb_002erbreak"></a>Function: <strong>gdb.rbreak</strong> <em>(regex <span class="roman">[</span>, minsyms <span class="roman">[</span>, throttle, <span class="roman">[</span>, symtabs <span class="roman">]]]</span>)</em></dt>
  139. <dd><p>Return a Python list holding a collection of newly set
  140. <code>gdb.Breakpoint</code> objects matching function names defined by the
  141. <var>regex</var> pattern. If the <var>minsyms</var> keyword is <code>True</code>, all
  142. system functions (those not explicitly defined in the inferior) will
  143. also be included in the match. The <var>throttle</var> keyword takes an
  144. integer that defines the maximum number of pattern matches for
  145. functions matched by the <var>regex</var> pattern. If the number of
  146. matches exceeds the integer value of <var>throttle</var>, a
  147. <code>RuntimeError</code> will be raised and no breakpoints will be created.
  148. If <var>throttle</var> is not defined then there is no imposed limit on the
  149. maximum number of matches and breakpoints to be created. The
  150. <var>symtabs</var> keyword takes a Python iterable that yields a collection
  151. of <code>gdb.Symtab</code> objects and will restrict the search to those
  152. functions only contained within the <code>gdb.Symtab</code> objects.
  153. </p></dd></dl>
  154. <a name="index-gdb_002eparameter"></a>
  155. <dl>
  156. <dt><a name="index-gdb_002eparameter-1"></a>Function: <strong>gdb.parameter</strong> <em>(parameter)</em></dt>
  157. <dd><p>Return the value of a <small>GDB</small> <var>parameter</var> given by its name,
  158. a string; the parameter name string may contain spaces if the parameter has a
  159. multi-part name. For example, &lsquo;<samp>print object</samp>&rsquo; is a valid
  160. parameter name.
  161. </p>
  162. <p>If the named parameter does not exist, this function throws a
  163. <code>gdb.error</code> (see <a href="Exception-Handling.html#Exception-Handling">Exception Handling</a>). Otherwise, the
  164. parameter&rsquo;s value is converted to a Python value of the appropriate
  165. type, and returned.
  166. </p></dd></dl>
  167. <a name="index-gdb_002ehistory"></a>
  168. <dl>
  169. <dt><a name="index-gdb_002ehistory-1"></a>Function: <strong>gdb.history</strong> <em>(number)</em></dt>
  170. <dd><p>Return a value from <small>GDB</small>&rsquo;s value history (see <a href="Value-History.html#Value-History">Value History</a>). The <var>number</var> argument indicates which history element to return.
  171. If <var>number</var> is negative, then <small>GDB</small> will take its absolute value
  172. and count backward from the last element (i.e., the most recent element) to
  173. find the value to return. If <var>number</var> is zero, then <small>GDB</small> will
  174. return the most recent element. If the element specified by <var>number</var>
  175. doesn&rsquo;t exist in the value history, a <code>gdb.error</code> exception will be
  176. raised.
  177. </p>
  178. <p>If no exception is raised, the return value is always an instance of
  179. <code>gdb.Value</code> (see <a href="Values-From-Inferior.html#Values-From-Inferior">Values From Inferior</a>).
  180. </p></dd></dl>
  181. <a name="index-gdb_002econvenience_005fvariable"></a>
  182. <dl>
  183. <dt><a name="index-gdb_002econvenience_005fvariable-1"></a>Function: <strong>gdb.convenience_variable</strong> <em>(name)</em></dt>
  184. <dd><p>Return the value of the convenience variable (see <a href="Convenience-Vars.html#Convenience-Vars">Convenience Vars</a>) named <var>name</var>. <var>name</var> must be a string. The name
  185. should not include the &lsquo;<samp>$</samp>&rsquo; that is used to mark a convenience
  186. variable in an expression. If the convenience variable does not
  187. exist, then <code>None</code> is returned.
  188. </p></dd></dl>
  189. <a name="index-gdb_002eset_005fconvenience_005fvariable"></a>
  190. <dl>
  191. <dt><a name="index-gdb_002eset_005fconvenience_005fvariable-1"></a>Function: <strong>gdb.set_convenience_variable</strong> <em>(name, value)</em></dt>
  192. <dd><p>Set the value of the convenience variable (see <a href="Convenience-Vars.html#Convenience-Vars">Convenience Vars</a>)
  193. named <var>name</var>. <var>name</var> must be a string. The name should not
  194. include the &lsquo;<samp>$</samp>&rsquo; that is used to mark a convenience variable in an
  195. expression. If <var>value</var> is <code>None</code>, then the convenience
  196. variable is removed. Otherwise, if <var>value</var> is not a
  197. <code>gdb.Value</code> (see <a href="Values-From-Inferior.html#Values-From-Inferior">Values From Inferior</a>), it is is converted
  198. using the <code>gdb.Value</code> constructor.
  199. </p></dd></dl>
  200. <a name="index-gdb_002eparse_005fand_005feval"></a>
  201. <dl>
  202. <dt><a name="index-gdb_002eparse_005fand_005feval-1"></a>Function: <strong>gdb.parse_and_eval</strong> <em>(expression)</em></dt>
  203. <dd><p>Parse <var>expression</var>, which must be a string, as an expression in
  204. the current language, evaluate it, and return the result as a
  205. <code>gdb.Value</code>.
  206. </p>
  207. <p>This function can be useful when implementing a new command
  208. (see <a href="Commands-In-Python.html#Commands-In-Python">Commands In Python</a>), as it provides a way to parse the
  209. command&rsquo;s argument as an expression. It is also useful simply to
  210. compute values.
  211. </p></dd></dl>
  212. <a name="index-gdb_002efind_005fpc_005fline"></a>
  213. <dl>
  214. <dt><a name="index-gdb_002efind_005fpc_005fline-1"></a>Function: <strong>gdb.find_pc_line</strong> <em>(pc)</em></dt>
  215. <dd><p>Return the <code>gdb.Symtab_and_line</code> object corresponding to the
  216. <var>pc</var> value. See <a href="Symbol-Tables-In-Python.html#Symbol-Tables-In-Python">Symbol Tables In Python</a>. If an invalid
  217. value of <var>pc</var> is passed as an argument, then the <code>symtab</code> and
  218. <code>line</code> attributes of the returned <code>gdb.Symtab_and_line</code> object
  219. will be <code>None</code> and 0 respectively. This is identical to
  220. <code>gdb.current_progspace().find_pc_line(pc)</code> and is included for
  221. historical compatibility.
  222. </p></dd></dl>
  223. <a name="index-gdb_002epost_005fevent"></a>
  224. <dl>
  225. <dt><a name="index-gdb_002epost_005fevent-1"></a>Function: <strong>gdb.post_event</strong> <em>(event)</em></dt>
  226. <dd><p>Put <var>event</var>, a callable object taking no arguments, into
  227. <small>GDB</small>&rsquo;s internal event queue. This callable will be invoked at
  228. some later point, during <small>GDB</small>&rsquo;s event processing. Events
  229. posted using <code>post_event</code> will be run in the order in which they
  230. were posted; however, there is no way to know when they will be
  231. processed relative to other events inside <small>GDB</small>.
  232. </p>
  233. <p><small>GDB</small> is not thread-safe. If your Python program uses multiple
  234. threads, you must be careful to only call <small>GDB</small>-specific
  235. functions in the <small>GDB</small> thread. <code>post_event</code> ensures
  236. this. For example:
  237. </p>
  238. <div class="smallexample">
  239. <pre class="smallexample">(gdb) python
  240. &gt;import threading
  241. &gt;
  242. &gt;class Writer():
  243. &gt; def __init__(self, message):
  244. &gt; self.message = message;
  245. &gt; def __call__(self):
  246. &gt; gdb.write(self.message)
  247. &gt;
  248. &gt;class MyThread1 (threading.Thread):
  249. &gt; def run (self):
  250. &gt; gdb.post_event(Writer(&quot;Hello &quot;))
  251. &gt;
  252. &gt;class MyThread2 (threading.Thread):
  253. &gt; def run (self):
  254. &gt; gdb.post_event(Writer(&quot;World\n&quot;))
  255. &gt;
  256. &gt;MyThread1().start()
  257. &gt;MyThread2().start()
  258. &gt;end
  259. (gdb) Hello World
  260. </pre></div>
  261. </dd></dl>
  262. <a name="index-gdb_002ewrite"></a>
  263. <dl>
  264. <dt><a name="index-gdb_002ewrite-1"></a>Function: <strong>gdb.write</strong> <em>(string <span class="roman">[</span>, stream])</em></dt>
  265. <dd><p>Print a string to <small>GDB</small>&rsquo;s paginated output stream. The
  266. optional <var>stream</var> determines the stream to print to. The default
  267. stream is <small>GDB</small>&rsquo;s standard output stream. Possible stream
  268. values are:
  269. </p>
  270. <dl compact="compact">
  271. <dd><a name="index-STDOUT"></a>
  272. <a name="index-gdb_002eSTDOUT"></a>
  273. </dd>
  274. <dt><code>gdb.STDOUT</code></dt>
  275. <dd><p><small>GDB</small>&rsquo;s standard output stream.
  276. </p>
  277. <a name="index-STDERR"></a>
  278. <a name="index-gdb_002eSTDERR"></a>
  279. </dd>
  280. <dt><code>gdb.STDERR</code></dt>
  281. <dd><p><small>GDB</small>&rsquo;s standard error stream.
  282. </p>
  283. <a name="index-STDLOG"></a>
  284. <a name="index-gdb_002eSTDLOG"></a>
  285. </dd>
  286. <dt><code>gdb.STDLOG</code></dt>
  287. <dd><p><small>GDB</small>&rsquo;s log stream (see <a href="Logging-Output.html#Logging-Output">Logging Output</a>).
  288. </p></dd>
  289. </dl>
  290. <p>Writing to <code>sys.stdout</code> or <code>sys.stderr</code> will automatically
  291. call this function and will automatically direct the output to the
  292. relevant stream.
  293. </p></dd></dl>
  294. <a name="index-gdb_002eflush"></a>
  295. <dl>
  296. <dt><a name="index-gdb_002eflush-1"></a>Function: <strong>gdb.flush</strong> <em>()</em></dt>
  297. <dd><p>Flush the buffer of a <small>GDB</small> paginated stream so that the
  298. contents are displayed immediately. <small>GDB</small> will flush the
  299. contents of a stream automatically when it encounters a newline in the
  300. buffer. The optional <var>stream</var> determines the stream to flush. The
  301. default stream is <small>GDB</small>&rsquo;s standard output stream. Possible
  302. stream values are:
  303. </p>
  304. <dl compact="compact">
  305. <dd><a name="index-STDOUT-1"></a>
  306. <a name="index-gdb_002eSTDOUT-1"></a>
  307. </dd>
  308. <dt><code>gdb.STDOUT</code></dt>
  309. <dd><p><small>GDB</small>&rsquo;s standard output stream.
  310. </p>
  311. <a name="index-STDERR-1"></a>
  312. <a name="index-gdb_002eSTDERR-1"></a>
  313. </dd>
  314. <dt><code>gdb.STDERR</code></dt>
  315. <dd><p><small>GDB</small>&rsquo;s standard error stream.
  316. </p>
  317. <a name="index-STDLOG-1"></a>
  318. <a name="index-gdb_002eSTDLOG-1"></a>
  319. </dd>
  320. <dt><code>gdb.STDLOG</code></dt>
  321. <dd><p><small>GDB</small>&rsquo;s log stream (see <a href="Logging-Output.html#Logging-Output">Logging Output</a>).
  322. </p>
  323. </dd>
  324. </dl>
  325. <p>Flushing <code>sys.stdout</code> or <code>sys.stderr</code> will automatically
  326. call this function for the relevant stream.
  327. </p></dd></dl>
  328. <a name="index-gdb_002etarget_005fcharset"></a>
  329. <dl>
  330. <dt><a name="index-gdb_002etarget_005fcharset-1"></a>Function: <strong>gdb.target_charset</strong> <em>()</em></dt>
  331. <dd><p>Return the name of the current target character set (see <a href="Character-Sets.html#Character-Sets">Character Sets</a>). This differs from <code>gdb.parameter('target-charset')</code> in
  332. that &lsquo;<samp>auto</samp>&rsquo; is never returned.
  333. </p></dd></dl>
  334. <a name="index-gdb_002etarget_005fwide_005fcharset"></a>
  335. <dl>
  336. <dt><a name="index-gdb_002etarget_005fwide_005fcharset-1"></a>Function: <strong>gdb.target_wide_charset</strong> <em>()</em></dt>
  337. <dd><p>Return the name of the current target wide character set
  338. (see <a href="Character-Sets.html#Character-Sets">Character Sets</a>). This differs from
  339. <code>gdb.parameter('target-wide-charset')</code> in that &lsquo;<samp>auto</samp>&rsquo; is
  340. never returned.
  341. </p></dd></dl>
  342. <a name="index-gdb_002esolib_005fname"></a>
  343. <dl>
  344. <dt><a name="index-gdb_002esolib_005fname-1"></a>Function: <strong>gdb.solib_name</strong> <em>(address)</em></dt>
  345. <dd><p>Return the name of the shared library holding the given <var>address</var>
  346. as a string, or <code>None</code>. This is identical to
  347. <code>gdb.current_progspace().solib_name(address)</code> and is included for
  348. historical compatibility.
  349. </p></dd></dl>
  350. <a name="index-gdb_002edecode_005fline"></a>
  351. <dl>
  352. <dt><a name="index-gdb_002edecode_005fline-1"></a>Function: <strong>gdb.decode_line</strong> <em>(<span class="roman">[</span>expression<span class="roman">]</span>)</em></dt>
  353. <dd><p>Return locations of the line specified by <var>expression</var>, or of the
  354. current line if no argument was given. This function returns a Python
  355. tuple containing two elements. The first element contains a string
  356. holding any unparsed section of <var>expression</var> (or <code>None</code> if
  357. the expression has been fully parsed). The second element contains
  358. either <code>None</code> or another tuple that contains all the locations
  359. that match the expression represented as <code>gdb.Symtab_and_line</code>
  360. objects (see <a href="Symbol-Tables-In-Python.html#Symbol-Tables-In-Python">Symbol Tables In Python</a>). If <var>expression</var> is
  361. provided, it is decoded the way that <small>GDB</small>&rsquo;s inbuilt
  362. <code>break</code> or <code>edit</code> commands do (see <a href="Specify-Location.html#Specify-Location">Specify Location</a>).
  363. </p></dd></dl>
  364. <dl>
  365. <dt><a name="index-gdb_002eprompt_005fhook"></a>Function: <strong>gdb.prompt_hook</strong> <em>(current_prompt)</em></dt>
  366. <dd><a name="prompt_005fhook"></a>
  367. <p>If <var>prompt_hook</var> is callable, <small>GDB</small> will call the method
  368. assigned to this operation before a prompt is displayed by
  369. <small>GDB</small>.
  370. </p>
  371. <p>The parameter <code>current_prompt</code> contains the current <small>GDB</small>
  372. prompt. This method must return a Python string, or <code>None</code>. If
  373. a string is returned, the <small>GDB</small> prompt will be set to that
  374. string. If <code>None</code> is returned, <small>GDB</small> will continue to use
  375. the current prompt.
  376. </p>
  377. <p>Some prompts cannot be substituted in <small>GDB</small>. Secondary prompts
  378. such as those used by readline for command input, and annotation
  379. related prompts are prohibited from being changed.
  380. </p></dd></dl>
  381. <hr>
  382. <div class="header">
  383. <p>
  384. Next: <a href="Exception-Handling.html#Exception-Handling" accesskey="n" rel="next">Exception Handling</a>, Up: <a href="Python-API.html#Python-API" accesskey="u" rel="up">Python API</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
  385. </div>
  386. </body>
  387. </html>