|
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <!-- Copyright (C) 1988-2020 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." -->
- <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>GDB/MI File Commands (Debugging with GDB)</title>
-
- <meta name="description" content="GDB/MI File Commands (Debugging with GDB)">
- <meta name="keywords" content="GDB/MI File Commands (Debugging with GDB)">
- <meta name="resource-type" content="document">
- <meta name="distribution" content="global">
- <meta name="Generator" content="makeinfo">
- <link href="index.html#Top" rel="start" title="Top">
- <link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
- <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
- <link href="GDB_002fMI.html#GDB_002fMI" rel="up" title="GDB/MI">
- <link href="GDB_002fMI-Target-Manipulation.html#GDB_002fMI-Target-Manipulation" rel="next" title="GDB/MI Target Manipulation">
- <link href="GDB_002fMI-Symbol-Query.html#GDB_002fMI-Symbol-Query" rel="prev" title="GDB/MI Symbol Query">
- <style type="text/css">
- <!--
- a.summary-letter {text-decoration: none}
- blockquote.indentedblock {margin-right: 0em}
- blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
- blockquote.smallquotation {font-size: smaller}
- div.display {margin-left: 3.2em}
- div.example {margin-left: 3.2em}
- div.lisp {margin-left: 3.2em}
- div.smalldisplay {margin-left: 3.2em}
- div.smallexample {margin-left: 3.2em}
- div.smalllisp {margin-left: 3.2em}
- kbd {font-style: oblique}
- pre.display {font-family: inherit}
- pre.format {font-family: inherit}
- pre.menu-comment {font-family: serif}
- pre.menu-preformatted {font-family: serif}
- pre.smalldisplay {font-family: inherit; font-size: smaller}
- pre.smallexample {font-size: smaller}
- pre.smallformat {font-family: inherit; font-size: smaller}
- pre.smalllisp {font-size: smaller}
- span.nolinebreak {white-space: nowrap}
- span.roman {font-family: initial; font-weight: normal}
- span.sansserif {font-family: sans-serif; font-weight: normal}
- ul.no-bullet {list-style: none}
- -->
- </style>
-
-
- </head>
-
- <body lang="en">
- <a name="GDB_002fMI-File-Commands"></a>
- <div class="header">
- <p>
- Next: <a href="GDB_002fMI-Target-Manipulation.html#GDB_002fMI-Target-Manipulation" accesskey="n" rel="next">GDB/MI Target Manipulation</a>, Previous: <a href="GDB_002fMI-Symbol-Query.html#GDB_002fMI-Symbol-Query" accesskey="p" rel="prev">GDB/MI Symbol Query</a>, Up: <a href="GDB_002fMI.html#GDB_002fMI" accesskey="u" rel="up">GDB/MI</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>
- </div>
- <hr>
- <a name="GDB_002fMI-File-Commands-1"></a>
- <h3 class="section">27.19 <small>GDB/MI</small> File Commands</h3>
-
- <p>This section describes the GDB/MI commands to specify executable file names
- and to read in and obtain symbol table information.
- </p>
- <a name="The-_002dfile_002dexec_002dand_002dsymbols-Command"></a>
- <h4 class="subheading">The <code>-file-exec-and-symbols</code> Command</h4>
- <a name="index-_002dfile_002dexec_002dand_002dsymbols"></a>
-
- <a name="Synopsis-87"></a>
- <h4 class="subsubheading">Synopsis</h4>
-
- <div class="smallexample">
- <pre class="smallexample"> -file-exec-and-symbols <var>file</var>
- </pre></div>
-
- <p>Specify the executable file to be debugged. This file is the one from
- which the symbol table is also read. If no file is specified, the
- command clears the executable and symbol information. If breakpoints
- are set when using this command with no arguments, <small>GDB</small> will produce
- error messages. Otherwise, no output is produced, except a completion
- notification.
- </p>
- <a name="GDB-Command-69"></a>
- <h4 class="subsubheading"><small>GDB</small> Command</h4>
-
- <p>The corresponding <small>GDB</small> command is ‘<samp>file</samp>’.
- </p>
- <a name="Example-69"></a>
- <h4 class="subsubheading">Example</h4>
-
- <div class="smallexample">
- <pre class="smallexample">(gdb)
- -file-exec-and-symbols /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx
- ^done
- (gdb)
- </pre></div>
-
-
- <a name="The-_002dfile_002dexec_002dfile-Command"></a>
- <h4 class="subheading">The <code>-file-exec-file</code> Command</h4>
- <a name="index-_002dfile_002dexec_002dfile"></a>
-
- <a name="Synopsis-88"></a>
- <h4 class="subsubheading">Synopsis</h4>
-
- <div class="smallexample">
- <pre class="smallexample"> -file-exec-file <var>file</var>
- </pre></div>
-
- <p>Specify the executable file to be debugged. Unlike
- ‘<samp>-file-exec-and-symbols</samp>’, the symbol table is <em>not</em> read
- from this file. If used without argument, <small>GDB</small> clears the information
- about the executable file. No output is produced, except a completion
- notification.
- </p>
- <a name="GDB-Command-70"></a>
- <h4 class="subsubheading"><small>GDB</small> Command</h4>
-
- <p>The corresponding <small>GDB</small> command is ‘<samp>exec-file</samp>’.
- </p>
- <a name="Example-70"></a>
- <h4 class="subsubheading">Example</h4>
-
- <div class="smallexample">
- <pre class="smallexample">(gdb)
- -file-exec-file /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx
- ^done
- (gdb)
- </pre></div>
-
-
-
-
- <a name="The-_002dfile_002dlist_002dexec_002dsource_002dfile-Command"></a>
- <h4 class="subheading">The <code>-file-list-exec-source-file</code> Command</h4>
- <a name="index-_002dfile_002dlist_002dexec_002dsource_002dfile"></a>
-
- <a name="Synopsis-89"></a>
- <h4 class="subsubheading">Synopsis</h4>
-
- <div class="smallexample">
- <pre class="smallexample"> -file-list-exec-source-file
- </pre></div>
-
- <p>List the line number, the current source file, and the absolute path
- to the current source file for the current executable. The macro
- information field has a value of ‘<samp>1</samp>’ or ‘<samp>0</samp>’ depending on
- whether or not the file includes preprocessor macro information.
- </p>
- <a name="GDB-Command-71"></a>
- <h4 class="subsubheading"><small>GDB</small> Command</h4>
-
- <p>The <small>GDB</small> equivalent is ‘<samp>info source</samp>’
- </p>
- <a name="Example-71"></a>
- <h4 class="subsubheading">Example</h4>
-
- <div class="smallexample">
- <pre class="smallexample">(gdb)
- 123-file-list-exec-source-file
- 123^done,line="1",file="foo.c",fullname="/home/bar/foo.c,macro-info="1"
- (gdb)
- </pre></div>
-
-
- <a name="The-_002dfile_002dlist_002dexec_002dsource_002dfiles-Command"></a>
- <h4 class="subheading">The <code>-file-list-exec-source-files</code> Command</h4>
- <a name="index-_002dfile_002dlist_002dexec_002dsource_002dfiles"></a>
-
- <a name="Synopsis-90"></a>
- <h4 class="subsubheading">Synopsis</h4>
-
- <div class="smallexample">
- <pre class="smallexample"> -file-list-exec-source-files
- </pre></div>
-
- <p>List the source files for the current executable.
- </p>
- <p>It will always output both the filename and fullname (absolute file
- name) of a source file.
- </p>
- <a name="GDB-Command-72"></a>
- <h4 class="subsubheading"><small>GDB</small> Command</h4>
-
- <p>The <small>GDB</small> equivalent is ‘<samp>info sources</samp>’.
- <code>gdbtk</code> has an analogous command ‘<samp>gdb_listfiles</samp>’.
- </p>
- <a name="Example-72"></a>
- <h4 class="subsubheading">Example</h4>
- <div class="smallexample">
- <pre class="smallexample">(gdb)
- -file-list-exec-source-files
- ^done,files=[
- {file=foo.c,fullname=/home/foo.c},
- {file=/home/bar.c,fullname=/home/bar.c},
- {file=gdb_could_not_find_fullpath.c}]
- (gdb)
- </pre></div>
-
- <a name="The-_002dfile_002dlist_002dshared_002dlibraries-Command"></a>
- <h4 class="subheading">The <code>-file-list-shared-libraries</code> Command</h4>
- <a name="index-_002dfile_002dlist_002dshared_002dlibraries"></a>
-
- <a name="Synopsis-91"></a>
- <h4 class="subsubheading">Synopsis</h4>
-
- <div class="smallexample">
- <pre class="smallexample"> -file-list-shared-libraries [ <var>regexp</var> ]
- </pre></div>
-
- <p>List the shared libraries in the program.
- With a regular expression <var>regexp</var>, only those libraries whose
- names match <var>regexp</var> are listed.
- </p>
- <a name="GDB-Command-73"></a>
- <h4 class="subsubheading"><small>GDB</small> Command</h4>
-
- <p>The corresponding <small>GDB</small> command is ‘<samp>info shared</samp>’. The fields
- have a similar meaning to the <code>=library-loaded</code> notification.
- The <code>ranges</code> field specifies the multiple segments belonging to this
- library. Each range has the following fields:
- </p>
- <dl compact="compact">
- <dt>‘<samp>from</samp>’</dt>
- <dd><p>The address defining the inclusive lower bound of the segment.
- </p></dd>
- <dt>‘<samp>to</samp>’</dt>
- <dd><p>The address defining the exclusive upper bound of the segment.
- </p></dd>
- </dl>
-
- <a name="Example-73"></a>
- <h4 class="subsubheading">Example</h4>
- <div class="smallexample">
- <pre class="smallexample">(gdb)
- -file-list-exec-source-files
- ^done,shared-libraries=[
- {id="/lib/libfoo.so",target-name="/lib/libfoo.so",host-name="/lib/libfoo.so",symbols-loaded="1",thread-group="i1",ranges=[{from="0x72815989",to="0x728162c0"}]},
- {id="/lib/libbar.so",target-name="/lib/libbar.so",host-name="/lib/libbar.so",symbols-loaded="1",thread-group="i1",ranges=[{from="0x76ee48c0",to="0x76ee9160"}]}]
- (gdb)
- </pre></div>
-
-
-
-
- <a name="The-_002dfile_002dsymbol_002dfile-Command"></a>
- <h4 class="subheading">The <code>-file-symbol-file</code> Command</h4>
- <a name="index-_002dfile_002dsymbol_002dfile"></a>
-
- <a name="Synopsis-92"></a>
- <h4 class="subsubheading">Synopsis</h4>
-
- <div class="smallexample">
- <pre class="smallexample"> -file-symbol-file <var>file</var>
- </pre></div>
-
- <p>Read symbol table info from the specified <var>file</var> argument. When
- used without arguments, clears <small>GDB</small>’s symbol table info. No output is
- produced, except for a completion notification.
- </p>
- <a name="GDB-Command-74"></a>
- <h4 class="subsubheading"><small>GDB</small> Command</h4>
-
- <p>The corresponding <small>GDB</small> command is ‘<samp>symbol-file</samp>’.
- </p>
- <a name="Example-74"></a>
- <h4 class="subsubheading">Example</h4>
-
- <div class="smallexample">
- <pre class="smallexample">(gdb)
- -file-symbol-file /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx
- ^done
- (gdb)
- </pre></div>
-
-
-
- <hr>
- <div class="header">
- <p>
- Next: <a href="GDB_002fMI-Target-Manipulation.html#GDB_002fMI-Target-Manipulation" accesskey="n" rel="next">GDB/MI Target Manipulation</a>, Previous: <a href="GDB_002fMI-Symbol-Query.html#GDB_002fMI-Symbol-Query" accesskey="p" rel="prev">GDB/MI Symbol Query</a>, Up: <a href="GDB_002fMI.html#GDB_002fMI" accesskey="u" rel="up">GDB/MI</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>
- </div>
-
-
-
- </body>
- </html>
|