• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/toolchains/hndtools-armeabi-2013.11/share/doc/arm-arm-none-eabi/html/gdb/
1<html lang="en">
2<head>
3<title>Objfiles 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="Progspaces-In-Python.html#Progspaces-In-Python" title="Progspaces In Python">
10<link rel="next" href="Frames-In-Python.html#Frames-In-Python" title="Frames 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="Objfiles-In-Python"></a>
43<p>
44Next:&nbsp;<a rel="next" accesskey="n" href="Frames-In-Python.html#Frames-In-Python">Frames In Python</a>,
45Previous:&nbsp;<a rel="previous" accesskey="p" href="Progspaces-In-Python.html#Progspaces-In-Python">Progspaces In Python</a>,
46Up:&nbsp;<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.19 Objfiles In Python</h5>
51
52<p><a name="index-objfiles-in-python-2026"></a><a name="index-gdb_002eObjfile-2027"></a><a name="index-Objfile-2028"></a><span class="sc">gdb</span> loads symbols for an inferior from various
53symbol-containing files (see <a href="Files.html#Files">Files</a>).  These include the primary
54executable file, any shared libraries used by the inferior, and any
55separate debug info files (see <a href="Separate-Debug-Files.html#Separate-Debug-Files">Separate Debug Files</a>). 
56<span class="sc">gdb</span> calls these symbol-containing files <dfn>objfiles</dfn>.
57
58   <p>The following objfile-related functions are available in the
59<code>gdb</code> module:
60
61   <p><a name="index-gdb_002ecurrent_005fobjfile-2029"></a>
62
63<div class="defun">
64&mdash; Function: <b>gdb.current_objfile</b> ()<var><a name="index-gdb_002ecurrent_005fobjfile-2030"></a></var><br>
65<blockquote><p>When auto-loading a Python script (see <a href="Python-Auto_002dloading.html#Python-Auto_002dloading">Python Auto-loading</a>), <span class="sc">gdb</span>
66sets the &ldquo;current objfile&rdquo; to the corresponding objfile.  This
67function returns the current objfile.  If there is no current objfile,
68this function returns <code>None</code>. 
69</p></blockquote></div>
70
71   <p><a name="index-gdb_002eobjfiles-2031"></a>
72
73<div class="defun">
74&mdash; Function: <b>gdb.objfiles</b> ()<var><a name="index-gdb_002eobjfiles-2032"></a></var><br>
75<blockquote><p>Return a sequence of all the objfiles current known to <span class="sc">gdb</span>. 
76See <a href="Objfiles-In-Python.html#Objfiles-In-Python">Objfiles In Python</a>. 
77</p></blockquote></div>
78
79   <p>Each objfile is represented by an instance of the <code>gdb.Objfile</code>
80class.
81
82<div class="defun">
83&mdash; Variable: <b>Objfile.filename</b><var><a name="index-Objfile_002efilename-2033"></a></var><br>
84<blockquote><p>The file name of the objfile as a string. 
85</p></blockquote></div>
86
87<div class="defun">
88&mdash; Variable: <b>Objfile.pretty_printers</b><var><a name="index-Objfile_002epretty_005fprinters-2034"></a></var><br>
89<blockquote><p>The <code>pretty_printers</code> attribute is a list of functions.  It is
90used to look up pretty-printers.  A <code>Value</code> is passed to each
91function in order; if the function returns <code>None</code>, then the
92search continues.  Otherwise, the return value should be an object
93which is used to format the value.  See <a href="Pretty-Printing-API.html#Pretty-Printing-API">Pretty Printing API</a>, for more
94information. 
95</p></blockquote></div>
96
97<div class="defun">
98&mdash; Variable: <b>Objfile.type_printers</b><var><a name="index-Objfile_002etype_005fprinters-2035"></a></var><br>
99<blockquote><p>The <code>type_printers</code> attribute is a list of type printer objects. 
100See <a href="Type-Printing-API.html#Type-Printing-API">Type Printing API</a>, for more information. 
101</p></blockquote></div>
102
103<div class="defun">
104&mdash; Variable: <b>Objfile.frame_filters</b><var><a name="index-Objfile_002eframe_005ffilters-2036"></a></var><br>
105<blockquote><p>The <code>frame_filters</code> attribute is a dictionary of frame filter
106objects.  See <a href="Frame-Filter-API.html#Frame-Filter-API">Frame Filter API</a>, for more information. 
107</p></blockquote></div>
108
109   <p>A <code>gdb.Objfile</code> object has the following methods:
110
111<div class="defun">
112&mdash; Function: <b>Objfile.is_valid</b> ()<var><a name="index-Objfile_002eis_005fvalid-2037"></a></var><br>
113<blockquote><p>Returns <code>True</code> if the <code>gdb.Objfile</code> object is valid,
114<code>False</code> if not.  A <code>gdb.Objfile</code> object can become invalid
115if the object file it refers to is not loaded in <span class="sc">gdb</span> any
116longer.  All other <code>gdb.Objfile</code> methods will throw an exception
117if it is invalid at the time the method is called. 
118</p></blockquote></div>
119
120   </body></html>
121
122