1<html lang="en"> 2<head> 3<title>Progspaces In Python - Debugging with GDB</title> 4<meta http-equiv="Content-Type" content="text/html"> 5<meta name="description" content="Debugging with GDB"> 6<meta name="generator" content="makeinfo 4.13"> 7<link title="Top" rel="start" href="index.html#Top"> 8<link rel="up" href="Python-API.html#Python-API" title="Python API"> 9<link rel="prev" href="Functions-In-Python.html#Functions-In-Python" title="Functions In Python"> 10<link rel="next" href="Objfiles-In-Python.html#Objfiles-In-Python" title="Objfiles In Python"> 11<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> 12<!-- 13Copyright (C) 1988-2013 Free Software Foundation, Inc. 14 15Permission is granted to copy, distribute and/or modify this document 16under the terms of the GNU Free Documentation License, Version 1.3 or 17any later version published by the Free Software Foundation; with the 18Invariant Sections being ``Free Software'' and ``Free Software Needs 19Free Documentation'', with the Front-Cover Texts being ``A GNU Manual,'' 20and with the Back-Cover Texts as in (a) below. 21 22(a) The FSF's Back-Cover Text is: ``You are free to copy and modify 23this GNU Manual. Buying copies from GNU Press supports the FSF in 24developing GNU and promoting software freedom.'' 25--> 26<meta http-equiv="Content-Style-Type" content="text/css"> 27<style type="text/css"><!-- 28 pre.display { font-family:inherit } 29 pre.format { font-family:inherit } 30 pre.smalldisplay { font-family:inherit; font-size:smaller } 31 pre.smallformat { font-family:inherit; font-size:smaller } 32 pre.smallexample { font-size:smaller } 33 pre.smalllisp { font-size:smaller } 34 span.sc { font-variant:small-caps } 35 span.roman { font-family:serif; font-weight:normal; } 36 span.sansserif { font-family:sans-serif; font-weight:normal; } 37--></style> 38<link rel="stylesheet" type="text/css" href="../cs.css"> 39</head> 40<body> 41<div class="node"> 42<a name="Progspaces-In-Python"></a> 43<p> 44Next: <a rel="next" accesskey="n" href="Objfiles-In-Python.html#Objfiles-In-Python">Objfiles In Python</a>, 45Previous: <a rel="previous" accesskey="p" href="Functions-In-Python.html#Functions-In-Python">Functions In Python</a>, 46Up: <a rel="up" accesskey="u" href="Python-API.html#Python-API">Python API</a> 47<hr> 48</div> 49 50<h5 class="subsubsection">23.2.2.18 Program Spaces In Python</h5> 51 52<p><a name="index-progspaces-in-python-2015"></a><a name="index-gdb_002eProgspace-2016"></a><a name="index-Progspace-2017"></a>A program space, or <dfn>progspace</dfn>, represents a symbolic view 53of an address space. 54It consists of all of the objfiles of the program. 55See <a href="Objfiles-In-Python.html#Objfiles-In-Python">Objfiles In Python</a>. 56See <a href="Inferiors-and-Programs.html#Inferiors-and-Programs">program spaces</a>, for more details 57about program spaces. 58 59 <p>The following progspace-related functions are available in the 60<code>gdb</code> module: 61 62 <p><a name="index-gdb_002ecurrent_005fprogspace-2018"></a> 63 64<div class="defun"> 65— Function: <b>gdb.current_progspace</b> ()<var><a name="index-gdb_002ecurrent_005fprogspace-2019"></a></var><br> 66<blockquote><p>This function returns the program space of the currently selected inferior. 67See <a href="Inferiors-and-Programs.html#Inferiors-and-Programs">Inferiors and Programs</a>. 68</p></blockquote></div> 69 70 <p><a name="index-gdb_002eprogspaces-2020"></a> 71 72<div class="defun"> 73— Function: <b>gdb.progspaces</b> ()<var><a name="index-gdb_002eprogspaces-2021"></a></var><br> 74<blockquote><p>Return a sequence of all the progspaces currently known to <span class="sc">gdb</span>. 75</p></blockquote></div> 76 77 <p>Each progspace is represented by an instance of the <code>gdb.Progspace</code> 78class. 79 80<div class="defun"> 81— Variable: <b>Progspace.filename</b><var><a name="index-Progspace_002efilename-2022"></a></var><br> 82<blockquote><p>The file name of the progspace as a string. 83</p></blockquote></div> 84 85<div class="defun"> 86— Variable: <b>Progspace.pretty_printers</b><var><a name="index-Progspace_002epretty_005fprinters-2023"></a></var><br> 87<blockquote><p>The <code>pretty_printers</code> attribute is a list of functions. It is 88used to look up pretty-printers. A <code>Value</code> is passed to each 89function in order; if the function returns <code>None</code>, then the 90search continues. Otherwise, the return value should be an object 91which is used to format the value. See <a href="Pretty-Printing-API.html#Pretty-Printing-API">Pretty Printing API</a>, for more 92information. 93</p></blockquote></div> 94 95<div class="defun"> 96— Variable: <b>Progspace.type_printers</b><var><a name="index-Progspace_002etype_005fprinters-2024"></a></var><br> 97<blockquote><p>The <code>type_printers</code> attribute is a list of type printer objects. 98See <a href="Type-Printing-API.html#Type-Printing-API">Type Printing API</a>, for more information. 99</p></blockquote></div> 100 101<div class="defun"> 102— Variable: <b>Progspace.frame_filters</b><var><a name="index-Progspace_002eframe_005ffilters-2025"></a></var><br> 103<blockquote><p>The <code>frame_filters</code> attribute is a dictionary of frame filter 104objects. See <a href="Frame-Filter-API.html#Frame-Filter-API">Frame Filter API</a>, for more information. 105</p></blockquote></div> 106 107 </body></html> 108 109