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-2021 Free Software Foundation, Inc. 4 5Permission is granted to copy, distribute and/or modify this document 6under the terms of the GNU Free Documentation License, Version 1.3 or 7any later version published by the Free Software Foundation; with the 8Invariant Sections being "Free Software" and "Free Software Needs 9Free Documentation", with the Front-Cover Texts being "A GNU Manual," 10and with the Back-Cover Texts as in (a) below. 11 12(a) The FSF's Back-Cover Text is: "You are free to copy and modify 13this GNU Manual. Buying copies from GNU Press supports the FSF in 14developing GNU and promoting software freedom." --> 15<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ --> 16<head> 17<title>Debugging with GDB: Objfiles In Guile</title> 18 19<meta name="description" content="Debugging with GDB: Objfiles In Guile"> 20<meta name="keywords" content="Debugging with GDB: Objfiles In Guile"> 21<meta name="resource-type" content="document"> 22<meta name="distribution" content="global"> 23<meta name="Generator" content="makeinfo"> 24<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 25<link href="index.html#Top" rel="start" title="Top"> 26<link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index"> 27<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> 28<link href="Guile-API.html#Guile-API" rel="up" title="Guile API"> 29<link href="Frames-In-Guile.html#Frames-In-Guile" rel="next" title="Frames In Guile"> 30<link href="Progspaces-In-Guile.html#Progspaces-In-Guile" rel="previous" title="Progspaces In Guile"> 31<style type="text/css"> 32<!-- 33a.summary-letter {text-decoration: none} 34blockquote.smallquotation {font-size: smaller} 35div.display {margin-left: 3.2em} 36div.example {margin-left: 3.2em} 37div.indentedblock {margin-left: 3.2em} 38div.lisp {margin-left: 3.2em} 39div.smalldisplay {margin-left: 3.2em} 40div.smallexample {margin-left: 3.2em} 41div.smallindentedblock {margin-left: 3.2em; font-size: smaller} 42div.smalllisp {margin-left: 3.2em} 43kbd {font-style:oblique} 44pre.display {font-family: inherit} 45pre.format {font-family: inherit} 46pre.menu-comment {font-family: serif} 47pre.menu-preformatted {font-family: serif} 48pre.smalldisplay {font-family: inherit; font-size: smaller} 49pre.smallexample {font-size: smaller} 50pre.smallformat {font-family: inherit; font-size: smaller} 51pre.smalllisp {font-size: smaller} 52span.nocodebreak {white-space:nowrap} 53span.nolinebreak {white-space:nowrap} 54span.roman {font-family:serif; font-weight:normal} 55span.sansserif {font-family:sans-serif; font-weight:normal} 56ul.no-bullet {list-style: none} 57--> 58</style> 59 60 61</head> 62 63<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> 64<a name="Objfiles-In-Guile"></a> 65<div class="header"> 66<p> 67Next: <a href="Frames-In-Guile.html#Frames-In-Guile" accesskey="n" rel="next">Frames In Guile</a>, Previous: <a href="Progspaces-In-Guile.html#Progspaces-In-Guile" accesskey="p" rel="previous">Progspaces In Guile</a>, Up: <a href="Guile-API.html#Guile-API" accesskey="u" rel="up">Guile API</a> [<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> 68</div> 69<hr> 70<a name="Objfiles-In-Guile-1"></a> 71<h4 class="subsubsection">23.3.3.14 Objfiles In Guile</h4> 72 73<a name="index-objfiles-in-guile"></a> 74<a name="index-_003cgdb_003aobjfile_003e"></a> 75<p><small>GDB</small> loads symbols for an inferior from various 76symbol-containing files (see <a href="Files.html#Files">Files</a>). These include the primary 77executable file, any shared libraries used by the inferior, and any 78separate debug info files (see <a href="Separate-Debug-Files.html#Separate-Debug-Files">Separate Debug Files</a>). 79<small>GDB</small> calls these symbol-containing files <em>objfiles</em>. 80</p> 81<p>Each objfile is represented as an object of type <code><gdb:objfile></code>. 82</p> 83<p>The following objfile-related procedures are provided by the 84<code>(gdb)</code> module: 85</p> 86<dl> 87<dt><a name="index-objfile_003f"></a>Scheme Procedure: <strong>objfile?</strong> <em>object</em></dt> 88<dd><p>Return <code>#t</code> if <var>object</var> is a <code><gdb:objfile></code> object. 89Otherwise return <code>#f</code>. 90</p></dd></dl> 91 92<dl> 93<dt><a name="index-objfile_002dvalid_003f"></a>Scheme Procedure: <strong>objfile-valid?</strong> <em>objfile</em></dt> 94<dd><p>Return <code>#t</code> if <var>objfile</var> is valid, <code>#f</code> if not. 95A <code><gdb:objfile></code> object can become invalid 96if the object file it refers to is not loaded in <small>GDB</small> any 97longer. All other <code><gdb:objfile></code> procedures will throw an exception 98if it is invalid at the time the procedure is called. 99</p></dd></dl> 100 101<dl> 102<dt><a name="index-objfile_002dfilename"></a>Scheme Procedure: <strong>objfile-filename</strong> <em>objfile</em></dt> 103<dd><p>Return the file name of <var>objfile</var> as a string, 104with symbolic links resolved. 105</p></dd></dl> 106 107<dl> 108<dt><a name="index-objfile_002dprogspace"></a>Scheme Procedure: <strong>objfile-progspace</strong> <em>objfile</em></dt> 109<dd><p>Return the <code><gdb:progspace></code> that this object file lives in. 110See <a href="Progspaces-In-Guile.html#Progspaces-In-Guile">Progspaces In Guile</a>, for more on progspaces. 111</p></dd></dl> 112 113<dl> 114<dt><a name="index-objfile_002dpretty_002dprinters"></a>Scheme Procedure: <strong>objfile-pretty-printers</strong> <em>objfile</em></dt> 115<dd><p>Return the list of registered <code><gdb:pretty-printer></code> objects for 116<var>objfile</var>. See <a href="Guile-Pretty-Printing-API.html#Guile-Pretty-Printing-API">Guile Pretty Printing API</a>, for more information. 117</p></dd></dl> 118 119<dl> 120<dt><a name="index-set_002dobjfile_002dpretty_002dprinters_0021"></a>Scheme Procedure: <strong>set-objfile-pretty-printers!</strong> <em>objfile printer-list</em></dt> 121<dd><p>Set the list of registered <code><gdb:pretty-printer></code> objects for 122<var>objfile</var> to <var>printer-list</var>. The 123<var>printer-list</var> must be a list of <code><gdb:pretty-printer></code> objects. 124See <a href="Guile-Pretty-Printing-API.html#Guile-Pretty-Printing-API">Guile Pretty Printing API</a>, for more information. 125</p></dd></dl> 126 127<dl> 128<dt><a name="index-current_002dobjfile"></a>Scheme Procedure: <strong>current-objfile</strong></dt> 129<dd><p>When auto-loading a Guile script (see <a href="Guile-Auto_002dloading.html#Guile-Auto_002dloading">Guile Auto-loading</a>), <small>GDB</small> 130sets the “current objfile” to the corresponding objfile. This 131function returns the current objfile. If there is no current objfile, 132this function returns <code>#f</code>. 133</p></dd></dl> 134 135<dl> 136<dt><a name="index-objfiles"></a>Scheme Procedure: <strong>objfiles</strong></dt> 137<dd><p>Return a list of all the objfiles in the current program space. 138</p></dd></dl> 139 140<hr> 141<div class="header"> 142<p> 143Next: <a href="Frames-In-Guile.html#Frames-In-Guile" accesskey="n" rel="next">Frames In Guile</a>, Previous: <a href="Progspaces-In-Guile.html#Progspaces-In-Guile" accesskey="p" rel="previous">Progspaces In Guile</a>, Up: <a href="Guile-API.html#Guile-API" accesskey="u" rel="up">Guile API</a> [<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> 144</div> 145 146 147 148</body> 149</html> 150